Skip to content

Instantly share code, notes, and snippets.

@jmfayard
Created January 7, 2016 09:53
Show Gist options
  • Save jmfayard/26b6602ccf210d47e441 to your computer and use it in GitHub Desktop.
Save jmfayard/26b6602ccf210d47e441 to your computer and use it in GitHub Desktop.
old things in bash config
android_screenshot() {
adb devices
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "$DESKTOPFOLDER/androidscreenshot-$(filetimestamp).png"
open "$DESKTOPFOLDER"
}
android_jmrecordscreencast() {
adb devices
echo "Press Ctrl-C to stop screencast"
echo "then type: $ android_pullscreencast"
echo
adb shell screenrecord --verbose "$ANDROIDFOLDER/screenrecord.mp4"
}
android_jmpullscreencast() {
adb pull "$ANDROIDFOLDER/screenrecord.mp4" "$DESKTOPFOLDER/androidscreencast-$(filetimestamp).mp4"
open $DESKTOPFOLDER
}
android_backup() {
echo "Here a trick to pull the sqlite database and actually everything out of the .apk you are debugging"
echo "http://stackoverflow.com/questions/9997976/android-pulling-sqlite-database-android-device"
echo
echo
echo '$ adb backup -f data.ab -noapk de.huethig.elektrotechnik.debug'
echo "On your device connected by USB, confirm that you want to proceed to the backup"
echo '$ dd if=data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf -'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment