Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid block type #63

Open
davispuh opened this issue Mar 29, 2018 · 7 comments
Open

invalid block type #63

davispuh opened this issue Mar 29, 2018 · 7 comments

Comments

@davispuh
Copy link

davispuh commented Mar 29, 2018

I created a non-encrypted backup with $ adb backup -apk -shared -all -system on LG V20 (Android 7.0)

but it fails to convert it to tar

$ abe unpack backup.ab backup.tar
0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: invalid block type
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
        at org.nick.abe.Main.main(Main.java:40)
Caused by: java.util.zip.ZipException: invalid block type
        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)
        ... 1 more
@nelenkov
Copy link
Owner

Does it work if leave out -shared? Is the header the same format?
It is possible that LG customized the backup logic, you may need to do some digging.

@davispuh
Copy link
Author

Different error then

0% 1% 2% 3% 4% 5% 6% Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: invalid bit length repeat
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
        at org.nick.abe.Main.main(Main.java:40)
Caused by: java.util.zip.ZipException: invalid bit length repeat
        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)
        ... 1 more

@davispuh
Copy link
Author

Maybe it's because for some reason it gets interrupted/corrupted while adb is creating it... but still weird.

With debug build

Magic: ANDROID BACKUP
Version: 4
Compressed: 1
Algorithm: none

Tried with tar

gzip: stdin: invalid compressed data--format violated
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

and

tar: Skipping to next header
tar: Exiting with failure status due to previous errors

@davispuh
Copy link
Author

I think it stops making backup when screen goes off

With another try

0% 1% 2% 3% 4% 5% 6% 7% 8% 9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20% 21% 22% 23% 24% 25% 26% 27% 28% 29% 30% 31% 32% 33% 34% 35% 36% 37% 38% 39% 40% 41% 42% 43% 44% 45% 46% 47% 48% 49% 50% 51% 52% 53% 54% 55% 56% 57% 58% 59% 60% 61% 62% 63% 64% 65% 66% 67% 68% 69% 70% 71% 72% 73% 74% 75% 76% 77% 78% 79% 80% 81% 82% 83% 84% 85% 86% 87% 88% 89% 90% 91% 92% 93% 94% 95% 96% 97% 98% 99% 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)
        ... 1 more

@nelenkov
Copy link
Owner

nelenkov commented Apr 1, 2018

No sure, either it's an error, or they use a different compression algorithm.

@gsgrippal
Copy link

gsgrippal commented Apr 8, 2018

@davispuh Probably it's an issue with your phone. Try running adb logcat while backup and watch for letter capital E.

  • adb logcat -s BackupManagerService

Open another console and backup

  • adb backup -apk -shared -all -system

@diegocr
Copy link

diegocr commented Apr 27, 2019

Having the same issue here... ran the logcat command as suggested (thanks) and found this:

04-27 22:15:39.673 5039 16381 V BackupManagerService: Requesting backup: apks=true obb=true shared=false all=true system=true includekeyvalue=true pkgs=[Ljava.lang.String;@183e824

Is that Ljava.lang.String;@ supposed to be there? sorry, java noob here.

I.e. i did not specified any specific packages to backup, only ran adb backup -apk -obb -keyvalue -all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants