Skip to content

Instantly share code, notes, and snippets.

@KarlNosworthy
Created July 18, 2015 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KarlNosworthy/acba2452a67617ee079b to your computer and use it in GitHub Desktop.
Save KarlNosworthy/acba2452a67617ee079b to your computer and use it in GitHub Desktop.
Pulling a sqlite databases from a non rooted android device
#
# Copy the database from its standard location to the sd card
#
adb -d shell "run-as <app.package.name.here> cat /data/data/<app.package.name.here>/databases/<app.database.name.here> /sdcard/<output.filename.here>"
#
# Pull the database from the sdcard to a specified local filename or the current directory if not
#
adb pull /sdcard/<remote.filename.here> [<local.filename.here>]
#
# Tidy up and delete the copied file from the sdcard.
#
adb -d shell rm /sdcard/<remote.filename.here>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment