views:

2138

answers:

2

Hi,

I created a SQLite database on Android device. The program can read/write to database so the database file has obviously been created. The SQLiteDatabase.mPath is set to

db.mPath = "/data/data/dev.client.android/databases/clientDB.db"

but when I browse the directories on the device I can't locate the file clientDB.db. I looked inside data directory but it appears to be empty.

Does anyone know what could be wrong here?

+6  A: 

If you mean you visited /data and found nothing in it, and you are examining an ordinary piece of Android hardware, that is expected. DDMS does not have permission to browse through /data.

However, at least if your app is compiled in debug mode, you can use the adb pull command at the console to download your file directly.

CommonsWare
+1  A: 

In debug mode you can use adb shell and browse the directory content. In the shell you can call sqlite3 /data/data/dev.client.android/databases/clientDB.db to analyse the DB.

kuester2000