Created
December 25, 2023 19:22
-
-
Save timrach/256095c285baa7f322da0bfa4d19a27a to your computer and use it in GitHub Desktop.
Convert Android Backup file to tarball
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
import zlib | |
# Read the android backup file 'backup.ab' and | |
# convert it to a tar archive file 'backup.tar' | |
with open("backup.ab", "rb") as input: | |
_skip = input.read(24) | |
_bytes = input.read() | |
data = zlib.decompress(_bytes) | |
open("backup.tar", "wb").write(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment