Android View SQLite Database from Command Line

This post assumes your on Mac OS X. First navigate to your adb path

cd /Users/<User name>/Library/Android/sdk/platform-tools

Start adb shell

./adb shell

Go to data directory

cd /data/data

Find your project

ls
cd <project name>
cd databases

Find name of database you want to use

ls

Start sqlite3

sqlite3 <database-name>

To get list of commands

.help

To view tables

.tables

To query

select * from <table-name>;

Don’t forget to add semicolon after your commands, otherwise it won’t execute.