Created
December 3, 2016 17:44
-
-
Save timrijckaert/291cb8cdeee49e7529e0fd160e86c1c7 to your computer and use it in GitHub Desktop.
Pulls the default.realm file from a (rooted) device or emulator. Ideal for testing
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/sh | |
# Only works on rooted devices and emulators | |
packageName="${1:-be.vrt.mobile.android.deredactie.debug}" | |
realmNameOnDevice="${2:-default.realm}" | |
outputLocation="${3:-.}" | |
adb start-server | |
adb shell mkdir /sdcard/tempdata | |
adb shell "su -c 'cp data/data/$packageName/files/default.realm /sdcard/tempdata/$realmNameOnDevice'" | |
adb pull /sdcard/tempdata/default.realm $outputLocation | |
adb shell rm -r /sdcard/tempdata | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment