Skip to content

Instantly share code, notes, and snippets.

@toidiu
Last active November 5, 2015 21:52
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 toidiu/6ce321c08c749d5a5ee0 to your computer and use it in GitHub Desktop.
Save toidiu/6ce321c08c749d5a5ee0 to your computer and use it in GitHub Desktop.
# as
PACKAGENAME = "com.toidiu.app"
COPY_LOCATION = "~/Desktop/db"
adb shell "run-as PACKAGENAME chmod -R 777 /data/data/PACKAGENAME/databases"
adb shell "mkdir -p /sdcard/tempDB"
adb shell "cp -r /data/data/PACKAGENAME/databases/ /sdcard/tempDB/."
adb pull sdcard/tempDB/ COPY_LOCATION
adb shell "rm -r /sdcard/tempDB/*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment