Wednesday, June 03, 2009

sqlite3 cli

Android gets better and better! I had a few minutes tonight to take a look at my current Android app and wanted to check the state of the DB. Expecting to find nothing, I Googled sqlite cli android and found that there are 2 methods. Beauty.

Term in Emulator


I thought that this would be the coolest but it was actually a paid because the UID is not root. The end result is that there are annoying permissions issues. It was pretty fun to be able to use the Term to check the DB:


Shell via ADB


jjohnson:~ jjohnson$ adb shell
# cd /data/data/org.mrtidy.nb2db1/databases
# sqlite3 data.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .tables
bucket
sqlite> select * from bucket;
0|testing 0|3|
1|testing|42|2009-05-05
3|testing 3|55|2009-05-0
5|testing null|66|
6|moo|4|
sqlite>

No comments: