Android : where's the Physical file location write to application?
Using filesystem write to app, on iphone version, I know where to look for the physical file written when running the simulator. But i can't locate the file on android version, anyone knows where to look for it? Thanks
var f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'data.xml');
f.write(this.responseData);
3 Answers
-
It's on the emulator. You have to use the
adb
command to interact with it.adb -e shell
then you can cd to
/data/data/YOUR.APP.ID/app_data
to see your file. -
Thanks, It works!
Just in case anyone's looking for this, you will need to twist a little to make it work.
This is under OSX.
The utility is under your android sdk folder/tools/1)Open terminal, go to that folder. In my case is "/Developer/android-sdk-mac_86/tools"
2)PWD –> This list the current directory path for next step
3)PATH=$PATH:/Developer/android-sdk-mac_86/tools
Now you should be able to access it
adb -e shell— go to the file folder then type "cat myfile.name", this print file on the terminal
cat data.xml
-
I found a more complete answer here:
(the other answers are still correct)