[ACCEPTED]-Android: Where are database files stored?-sqlite
try getDatabasePath on ContextWrapper ( http://developer.android.com/reference/android/content/ContextWrapper.html ). If 5 you are in an Activity or Application class 4 try:
File dbFile = getDatabasePath(MY_DB_NAME);
Log.i(dbFile.getAbsolutePath());
Just assuming its in /data/data/my.package.name/databases/
is bad as there 3 is no guarantee the data has not been moved 2 to the SD card or the device/OS has just 1 decided on a different data directory.
If you mean you visited /data
and found nothing 6 in it, and you are examining an ordinary 5 piece of Android hardware, that is expected. DDMS 4 does not have permission to browse through 3 /data
.
However, at least if your app is compiled 2 in debug mode, you can use the adb pull
command 1 at the console to download your file directly.
In debug mode you can use adb shell and browse the 2 directory content. In the shell you can 1 call sqlite3 /data/data/dev.client.android/databases/clientDB.db to analyse the DB.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.