Enter the command adb devices to get the list of your devices:
~/Android/Sdk/platform-tools/adb devices
Connect a shell to your device:
~/Android/Sdk/platform-tools/adb -s emulator-5584 shell
Navigate to the folder containing your db file:
cd data/data/<your-package-name>/databases/
Type su
if you ran into any permisson issue; just type su
to gain root access
Run sqlite3 to connect to your db:
sqlite3 vidura.db
There are a few steps to see the tables in an SQLite database:
- List the tables in your database:
.tables
- List how the table looks:
.schema tablename
- Print the entire table:
SELECT * FROM tablename;
- List all of the available SQLite prompt commands:
.help
reference: http://stackoverflow.com/questions/28220636/view-sqlite-database-on-device-in-android-studio
i did the same as u mentioned but when i put the command sqlite3 database_name, i get an error "sqlite3 not found".btw i have sqlite installed and it works perfectly outside the adb shell terminal