Created
January 26, 2015 16:18
-
-
Save fuho/e3ab24ad457b7f374ad3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/env bash | |
# Setup | |
PACKAGE_NAME="###################################################" | |
DB_PATH="/data/data/$PACKAGE_NAME/databases" | |
DB_FILENAME="####################################################" | |
#cleanup after old runs(just in case) | |
adb shell "su -c \"rm /sdcard/$DB_FILENAME\"" | |
adb shell "su -c \"cp $DB_PATH/$DB_FILENAME /sdcard/\"" | |
DATETIME=$(date +%Y-%m-%d@%H-%M-%S) | |
LOCAL_PATH=/tmp/adb_db_pulls/$DATETIME_$DB_FILENAME | |
adb pull /sdcard/$DB_FILENAME $LOCAL_PATH | |
#cleanup | |
adb shell "su -c \"rm /sdcard/$DB_FILENAME\"" | |
sqlitebrowser $LOCAL_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment