Created
March 27, 2018 21:55
-
-
Save AlD/cb443fe4ba152e1de8a42fa72721552b 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
inf = open('backup.ab', 'rb') | |
out = open('backup.tar', 'wb') | |
buf = inf.read(512) | |
while buf != '': | |
if buf[:8] == 'TWRP\x00\x00\x00\x00': | |
print "Skipping %r" % buf[:16] | |
buf = inf.read(512) | |
continue | |
out.write(buf) | |
buf = inf.read(512) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For people having problem with python3
use this: