Created
August 3, 2017 21:31
-
-
Save pascalwhoop/6af35fa165b40c83cdcdca6857317198 to your computer and use it in GitHub Desktop.
Extracting and repackaging an android backup file
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
adb backup --noapk <your_apk_package_name> | |
#extract it, skipping the first 24. we'll use them later though, so keep the files | |
dd if=backup.ab bs=24 skip=1 | /usr/local/ssl/bin/openssl zlib -d > backup.tar | |
# do some stuff with it ... | |
#then repackage everything | |
/usr/local/ssl/bin/openssl zlib -e < ./newbackup.tar | dd of=newbackup.ab bs=24 seek=1 | |
#reapply the first 24 bit to the file | |
dd if=mybackup.ab bs=24 count=1 | dd of=backup.ab bs=24 conv=notrunc | |
adb restore newbackup.adb #and confirm on the device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I might be able to use this if it accepted the desktop backup password set on the device.