Database not visible in DDMS folder when real device used instead of emulator

6.5k Views Asked by At

I am creating a sample application which will create a database, Inserts data and finally displays it in a spinner.

For testing I am using my android phone instead of Emulator (As I am fedup with its slow response).

My problem is application running succesfully but spinner is not displaying any result also I am unable to view any folder structure under DDMS->data.

I am confused whether database created or not, Please suggest me how to view the database if we use real device instead of emulatpor

3

There are 3 best solutions below

2
On

U just goto File Explorer Windows>show view>File explorer>data>package>database name to see your database in emulator

0
On

You must start you emulator, browse the emulator files in the DDMS view then select File explorer then go to data > data > com.your.package > databases > your_database_name and a new tab will appear with your data! It won't work on a real device.

You can even pull/export the database and analyse it more effectively with SQLite Browser

enjoy !

2
On

You can't get SQLite databse file from an Android real device if it is not rooted. Because to access the data folder of your application you have to provide the permission for it.

But you can run your application in an android emulator and following is the way:

  1. From DDMS, in Devices menu select your emulator.

  2. You can see data folder in File Explorer.

    Path is: data->data->Application Package Name->Databases->Database Name