Where does application data file actually stored on android device?

Bowie picture Bowie · May 30, 2012 · Viewed 117.7k times · Source

I have developed an Android app using Appcelerator Titanium. This app will create a file in applicationDataDirectory and install a database as well.

If run on emulator, I can locate those files using "adb" command. But how about on Android device? Can I use the "My Files" app to view those file I created? (since I can see files created by other application there.)

Moreover, I expect once I removed the app on device, it will automatically remove the related files and database. Is that true?

Because I found that even I removed the app from the device, the database seems left behind. I can tell because after deleting app and re-run on device(from Titanium), it show previous data.

I am using Ti SDK 2.0.1GA2, Android Runtime V8. And using Samsung Galaxy Tab for testing. Thanks in advance.

Answer

papaiatis picture papaiatis · May 30, 2012

Application Private Data files are stored within <internal_storage>/data/data/<package>

Files being stored in the internal storage can be accessed with openFileOutput() and openFileInput()

When those files are created as MODE_PRIVATE it is not possible to see/access them within another application such as a FileManager.