Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

debug android : connect to sqlite db on phone

Tags:

android

I'm building an application with a SQLite db in it. Some data is not erased as it should be, I'd like to run ad hoc queries in the existing db to debug.

Is there a way to connect to the SQLite db on the phone (or the emulator) while in debug mode?

like image 206
user410932 Avatar asked Aug 19 '11 10:08

user410932


1 Answers

Yes, you can connect to your device (or the emulator) using this manual. Use adb to connect to the emulator:

$ adb -s emulator-5554 shell

and then launch the sqlite3 application with the database you need:

# sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.db

Then you can run any SQL query you want.

like image 141
Ivan Gromov Avatar answered Sep 21 '22 23:09

Ivan Gromov