Saturday, October 12, 2013

Android - Connecting to SQLite through adb

This will only work for the Android emulator or a rooted phone. In unrooted/unlocked phones, the data files are locked.

cd into your platform-tools directory in your terminal
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
Start the emulator and check if adb can detect the emulator
adb devices
Start Shell
adb shell
Connect to sqlite
sqlite3 /data/data/{your_package_name}/databases/{your_db}