FORUMS

Sunday Debate: Are Smaller Bezels Better or Worth It?

Bezels have been getting smaller and smaller as the years go by, and while devices … more

LG G4 First Impressions and Unboxing – XDA TV

The latest in LG’s signature line of “G phones” has been released. … more

Galaxy S6 Weekly Shooting Challenge

Over in our forums this weekend, XDA Forum member DevonSloan has started a thread for talented … more

Which Features from Apple Watch Do You Think Android Wear Will Copy?

The Apple Watch and Android Wear are both growing platforms. Now … more
Post Reply Subscribe to Thread Email Thread

[Q] Android Backup Extractor java.lang.RuntimeException: java.util.zip.ZipException

15th April 2014, 04:00 AM |#1  
OP Junior Member
Thanks Meter: 5
 
More
I created a backup of my LG Motion 4G using Holo Backup on Windows 7. I would now like to view/extract the contents.

Following step 1 from this guide: http://forum.xda-developers.com/show....php?t=2011811

I am using Android Backup Extractor in Windows 7 64-bit from here: http://sourceforge.net/projects/adbe...?source=navbar

When I run the following command (using either Java 32-bit or 64-bit, after replacing the two files related to encryption as per the README states):

Code:
java -jar abe.jar unpack backup.ab backup.tar MyPassword
It begins extracting, then I get:

Code:
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: invalid store
d block lengths
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:320)
        at org.nick.abe.Main.main(Main.java:58)
        ... 5 more
Caused by: java.util.zip.ZipException: invalid stored block lengths
        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:299)
        ... 6 more
 
 
17th May 2014, 10:00 PM |#2  
Junior Member
Thanks Meter: 0
 
More
I'm having the exact same problem, except I'm using Windows 8.1. I'm also using 64-bit Java and replaced the encryption files according to the instructions.

Quote:
Originally Posted by mmortal03

I created a backup of my LG Motion 4G using Holo Backup on Windows 7. I would now like to view/extract the contents.

Following step 1 from this guide: http://forum.xda-developers.com/show....php?t=2011811

I am using Android Backup Extractor in Windows 7 64-bit from here: http://sourceforge.net/projects/adbe...?source=navbar

When I run the following command (using either Java 32-bit or 64-bit, after replacing the two files related to encryption as per the README states):

Code:
java -jar abe.jar unpack backup.ab backup.tar MyPassword
It begins extracting, then I get:

Code:
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: invalid store
d block lengths
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:320)
        at org.nick.abe.Main.main(Main.java:58)
        ... 5 more
Caused by: java.util.zip.ZipException: invalid stored block lengths
        at java.util.zip.InflaterInputStream.read(Unknown Source)
        at java.io.FilterInputStream.read(Unknown Source)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:299)
        ... 6 more

30th April 2015, 06:30 PM |#3  
OP Junior Member
Thanks Meter: 5
 
More
I'm trying this again. I'm using Java 8 64-bit with the corresponding Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for JDK/JRE 8
from here: http://www.oracle.com/technetwork/ja...ads/index.html

It starts to create the .tar file, gets about a 1GB in, then throws the following error:
Code:
Strong AES encryption enabled
Magic: ANDROID BACKUP
Version: 1
Compressed: 1
Algorithm: AES-256
IV: 0ECF671B3AE6432810E61BF5C43591D0
MK: 64BEFD995F94A4856FB5D90AED1A6B2AD144D51F3E07A880DFD8A7D3A6DB762A
MK checksum: DC98AE58FFC7855C083C7218E463C1FFF88F8C8795DBD928357B2BE05CB7F31B
key bytes: 64BEFD995F94A4856FB5D90AED1A6B2AD144D51F3E07A880DFD8A7D3A6DB762A
salt bytes: FBD35CDB1180D3A30FBD21037FF0335F8A36F601EE7C9DF378A92354DB664BB62322
F65A3054850ACB3C84A981F2ACD52202115DED983C388A648134882038A5
MK as string: [d???_???o??
?→k*?D?▼>????????v*]
Key format: RAW
Calculated MK checksum: DC98AE58FFC7855C083C7218E463C1FFF88F8C8795DBD928357B2BE0
5CB7F31B
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: java.io.IOException: javax.crypto.BadPadd
ingException: Given final block not properly padded
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:320)
        at org.nick.abe.Main.main(Main.java:58)
        ... 5 more
Caused by: java.io.IOException: javax.crypto.BadPaddingException: Given final bl
ock not properly padded
        at javax.crypto.CipherInputStream.close(CipherInputStream.java:321)
        at java.util.zip.InflaterInputStream.close(Unknown Source)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:311)
        ... 6 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padd
ed
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:966)
        at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:824)
        at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:436)
        at javax.crypto.Cipher.doFinal(Cipher.java:2048)
        at javax.crypto.CipherInputStream.close(CipherInputStream.java:314)
        ... 8 more

I see that someone else has run into the same issue in the past over on github, but there wasn't a good solution, other than restoring to another device (which I don't have): http://github.com/nelenkov/android-b...ctor/issues/10
Last edited by mmortal03; 3rd May 2015 at 09:29 PM. Reason: fixing URLs
30th April 2015, 07:47 PM |#4  
OP Junior Member
Thanks Meter: 5
 
More
The issue might be the following, regarding how the backup is created (a bug in ICS): http://github.com/nelenkov/android-b...omment-6957651

I'm going to have to do some more tests to verify.
Last edited by mmortal03; 3rd May 2015 at 09:28 PM. Reason: fixing URL
30th April 2015, 11:31 PM |#5  
OP Junior Member
Thanks Meter: 5
 
More
Yep, that seems to be it. Any backup which used the -shared argument with adb backup won't extract properly. There may be a procedure using a perl script (tarfix.pl) that may help.
Last edited by mmortal03; 30th April 2015 at 11:33 PM.
1st May 2015, 06:59 PM |#6  
OP Junior Member
Thanks Meter: 5
 
More
On these backups, after running "perl backupdecrypt.pl --nocompress backup.ab test.tar",
I then run "perl tarfix.pl test.tar | tar xv", and I get a bunch of garbage as output (see below). I've tested this both on Windows and on Linux, with the same result, so it isn't a platform issue. I'd post over in the applicable tarfix.pl thread, but I don't have 10 posts yet to be able to do so.

Excerpt output:

Code:
Illegal binary digit '■┐┐┐╛' ignored at tarfix.pl line 107.
Illegal hexadecimal digit 'k' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐╕' ignored at tarfix.pl line 107.
Illegal hexadecimal digit 'g' ignored at tarfix.pl line 107.
Illegal binary digit ';' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐╛╜' ignored at tarfix.pl line 107.
Illegal hexadecimal digit 'i' ignored at tarfix.pl line 107.
Illegal binary digit '%' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '&' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐┐┤' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Unicode non-character 0xfffffffe is illegal for interchange at tarfix.pl line 10
7.
Illegal binary digit '■┐┐┐┐╛' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '☼' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐╛╕' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '♂' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐┐₧' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐╛' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐╛' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal octal digit '9' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal binary digit '■┐┐┐╛⌐' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal octal digit '8' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '^' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐┐' ignored at tarfix.pl line 107.
Illegal hexadecimal digit '■┐┐┐╛' ignored at tarfix.pl line 107.
3rd May 2015, 09:26 PM |#7  
OP Junior Member
Thanks Meter: 5
 
More
Nevermind, I see that this issue was also described in the other thread: http://forum.xda-developers.com/show...15&postcount=3
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes