Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does application data file actually stored on android device?

Tags:

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.

like image 245
Bowie Avatar asked May 30 '12 06:05

Bowie


2 Answers

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.

like image 170
papaiatis Avatar answered Sep 21 '22 11:09

papaiatis


On Android 4.4 KitKat, I found mine in: /sdcard/Android/data/<app.package.name>

like image 27
bizi Avatar answered Sep 22 '22 11:09

bizi