ZipException: invalid stored block lengths
Exception during unpack with PW from 5GB backup create with oreo 8.0.0, adb 1.0.40 via adb backup -apk -shared -all adb restore fails, too Thanks for your work!
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% Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: invalid stored block lengths 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 stored block lengths at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:165) at java.base/java.io.FilterInputStream.read(FilterInputStream.java:107) at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:205) ... 1 more
Still having the issue?
I experienced the same error.
However I think it is caused by adb backup creating a broken backup-file. When I try to adb restore the file, it crashes as well (seemingly at a similar progress).
Maybe it is possible to use android-backup-extractor to skip "faulty blocks" (at this point I have no idea what I am talking about anymore) and therefore just lose partial data but at least not make it crash?
java -jar abe.jar unpack ./bak.ab ./bak.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% 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%
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: invalid stored block lengths
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:232)
at org.nick.abe.Main.main(Main.java:40)
Caused by: java.util.zip.ZipException: invalid stored block lengths
at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:165)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:105)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:206)
... 1 more
check abarms https://github.com/Own-Data-Privateer/abarms
Thank you! I will check it out.
Pull requests always welcome, but at the very least, consider sharing a sample file that reproduces the issue. Nearly impossible to fix otherwise.
@zlyfer did you check it, any error or message?
@zlyfer did you check it, any error or message?
Sorry for the late reply. Yes I checked it and it has the same issue. It unwraps for a bit and then just crashes. It did recover some data though.
I can not share this backup file as this is a personal backup including sensitive data. However on the weekend I may tinker around a bit and see if I can reproduce this issue with another backup file.
Here is an error log if anyone is interested. I may create an issue at Own-Data-Privateer/abarms in the next days.
~\TEMP > abarms unwrap bak.ab bak2.tar
Writing output to `bak2.tar`... 86%Traceback (most recent call last):
File "/home/zlyfer/.local/bin/abarms", line 8, in <module>
sys.exit(main())
File "/home/zlyfer/.local/lib/python3.9/site-packages/abarms/__main__.py", line 866, in main
cfg.func(cfg)
File "/home/zlyfer/.local/lib/python3.9/site-packages/abarms/__main__.py", line 619, in ab_unwrap
copy_input_to_output(cfg)
File "/home/zlyfer/.local/lib/python3.9/site-packages/abarms/__main__.py", line 418, in copy_input_to_output
data = cfg.input.read(BUFFER_SIZE)
File "/home/zlyfer/.local/lib/python3.9/site-packages/abarms/__main__.py", line 63, in read
self._buffer += self._handle_data(data)
File "/home/zlyfer/.local/lib/python3.9/site-packages/abarms/__main__.py", line 121, in _handle_data
return self._decompressor.decompress(data)
zlib.error: Error -3 while decompressing data: invalid stored block lengths
Thy this too, report the bug the the developers also. https://sourceforge.net/projects/android-backup-processor/