Skip to content

Instantly share code, notes, and snippets.

@NielsMasdorp
Last active April 13, 2018 07:43
Show Gist options
  • Save NielsMasdorp/b3b0450fe9914142f6339970dbd01165 to your computer and use it in GitHub Desktop.
Save NielsMasdorp/b3b0450fe9914142f6339970dbd01165 to your computer and use it in GitHub Desktop.
How to connect to SQlite database on Android emulator
adb devices
sudo adb -s emulator-xxx shell
run-as {package-name}
cd databases/
ls
sqlite3 {database name}
.databses -> view databases
.tables -> view tables
.schema -> view schema of table
.quit -> quit sqlite
Example query:
Select * from purchases where customer = 'Niels Masdorp';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment