Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to view Android application Database running on my phone

I am installing and running an android application on my phone and for some testing purpose i want to see the databases of my application that is on my phone. now my question how to get those databases and the tables???? please reply thank you in advance.....

like image 597
Jpm Avatar asked Dec 16 '22 21:12

Jpm


2 Answers

To view the contents of your local database you need to download a software called Sqlite Studio: http://sqlitestudio.one.pl/

1.) Download and install Sqlite Studio on your computer

2.) Connect your phone to your computer, make sure you turn on USB Debugging. USB Debugging can be activated from Settings -> Applications -> USB Debugging (or Settings -> Developer Options -> USB Debugging if you are using Ice cream sandwich).

3.) Open DDMS view in Eclipse and open the File Explorer tab in DDMS and then go to data -> data -> (name-of-your-application) -> databases. Now pull the data file from the databases folder onto your computer.

4.) Open Sqlite Studio and import the data file that you have just pulled from your android phone.

5.) View the contents of your database!

Hope this helped. Don't hesitate to clarify if you didn't understand!

like image 177
Vishwa Patel Avatar answered Dec 28 '22 06:12

Vishwa Patel


The steps described by Vishwa is correct if we run on emulator. But for real devices we don't have access to data folder using DDMS. You need to have a phone with root access in order to browse the data folder on an Android phone. That means either you have a developer device (ADP1 or an ION from Google I/O) or you've found a way to 'root' your phone some other way.

like image 28
Dennis Mathew Avatar answered Dec 28 '22 07:12

Dennis Mathew