How do I copy the trained libsvm model (I have a file called data.txt) from MATLAB to my phone? I don't know the folders I should save it to and how to load it in my actual app.
I am running the adb shell command via my computer and I am in the directory /data/data/edu.umich.eecs.androidlibsvm
I can only see these folders:
shell@A0001:/data/data/edu.umich.eecs.androidlibsvm $ ls
cache
lib
shell@A0001:/data/data/edu.umich.eecs.androidlibsvm $ cd lib
shell@A0001:/data/data/edu.umich.eecs.androidlibsvm/lib $ ls
libjnilibsvm.so
shell@A0001:/data/data/edu.umich.eecs.androidlibsvm/lib $
From what I can understand from your question, you basically want to do 2 things
So I am going to answer as per the above stages
Use adb push command to transfer the file from your system to the device
adb push filename.extension /sdcard/0/<public_folder>
where <public_folder> could be Download
To read/load this file you only need to use Environment.getExternalStoragePublicDirectory()
Reference Link from Android Docs
Note : The whole process can be adapted to work with internal storage too, but I am assuming you want the file to be publically available to apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With