nelenkov / android-backup-extractor

Android backup extractor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure "incorrect data check" & Damaged tar archive

jeffmikels opened this issue · comments

My phone died, but I had a backup made with adb backup -shared, so I wasn't worried about it.
I got a new phone, but I don't want to do a full restore because it's a different model.

I'm using abe to extract the backup into a tar file, tar-bin-split to split it into multiple tar files, and then abe to pack the individual files back into restorable backups.

However, the backup is quite large, and the abe step fails when handling the shared contents.

This error shows up after the counter hits 100%:

Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: incorrect data check
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
	at org.nick.abe.Main.main(Main.java:40)
Caused by: java.util.zip.ZipException: incorrect data check
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:205)

The resulting tar file is about the same size as the original backup, but when I try to extract its contents, I get the following output:

...
shared/0/com.appyet.feedplus/cache/ImageFit/a60e4d802cb8068c824a5e762c99521a
shared/0/com.appyet.feedplus/cache/ImageFit/aa3c5f5651f41b2cd41eb42e4ea0d61b
shared/0/com.appyet.feedplus/cache/ImageFit/b77565301ef59124b8dee4c46a9eb68d
shared/0/com.appyet.feedplus/cache/ImageFit/eebf292d25be4ecb707af54530a3d855
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
tar: Damaged tar archive
tar: Retrying...
...

The tar file is damaged somewhere in the middle of the shared files.

I read somewhere that there is a bug in adb backup where only part of the backup is encrypted or only part of the file is deflated or something like that, but I don't remember where I found that information. Can anyone help me fix my extracted tar file?

I am encountering this error on a fresh backup.ab file containing a single app.