For development , sometimes we need for a faster programming , the SQLite database state of our programs . But i can only extract database if it's on emulator , not mobile .
Then my exactly question is ¿Is there a way to see the android sqlite db or a way to extract it?
If there isn't a good answer to that question . How do you manage with that programming issues when you need to know the db state of the tables?
You can do this from shell as
vbence
mentioned. Another way is to copy the database file to sd card programatically. Call this inonStop()
:For exploring the SQLite database you can use the addon of mozilla firefox named SQLite Manager. And after running the app pull the database to your system using file explorer and open the firefox-->Tools-->SQLite Manager. A window will come and on that there is an option to open the database, click on that and direct to the path where you have pulled your DB. Open that DB you can see the tables created and the values you have entered. Also you have the option to add, edit, delete and update the values.
You can use
to get a root shell of the device, then use anything you like directly on the DB. Export it, run scripts etc etc.
You can check out this link for details:
developer.android.com/studio/command-line/sqlite3.html
Abount SQLite commands: http://www.sqlite.org/sqlite.html