Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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);
— asked August 5th 2010 by Daniel Lim
  • android
  • file
  • filesystem
  • location
0 Comments

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.

    — answered August 5th 2010 by Don Thorp
    permalink
    0 Comments
  • 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

    — answered August 6th 2010 by Daniel Lim
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.