Examining sqlite3 Databases from a Remote Shell
From an adb remote shell, you can use the command-line program to manage SQLite databases created by Android applications. The sqlite3tool includes many useful commands, such as .dumpto print out the contents of a table and .schemato print the SQL CREATE statement for an existing table. The tool also gives you the ability to execute SQLite commands on the fly.
To usesqlite3, enter a remote shell on the emulator instance, as described above, then invoke the tool using thesqlite3command. Optionally, when invokingsqlite3you can specify the full path to the database you want to explore. Emulator/device instances store SQLite3 databases in the folder/data/data/<package_name>/databases/.
Here's an example:
$ adb -s emulator-5554 shell# sqlite3 /data/data/com.example.google.rss.rssexample/databases/rssitems.dbSQLite version 3.3.12Enter ".help" for instructions.... enter commands, then quit...sqlite> .exit
Once you've invokedsqlite3, you can issuesqlite3commands in the shell. To exit and return to the adb remote shell, useexitorCTRL+D.