Created
October 6, 2015 11:26
-
-
Save pietrocaselani/327c3bb5521e7fb9a6fa to your computer and use it in GitHub Desktop.
Get Android database from device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PKG=$1 | |
DB=$2 | |
adb shell "run-as $PKG chmod 755 /data/data/$PKG/databases" | |
adb shell "run-as $PKG chmod 666 /data/data/$PKG/databases/$DB" | |
adb shell "rm /sdcard/$DB" | |
adb shell "cp /data/data/$PKG/databases/$DB /sdcard/$DB" | |
rm -f /tmp/${DB} | |
adb pull /sdcard/${DB} /tmp/${DB} | |
open /tmp/${DB} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment