Comments (12)
Hi, I have same problem trying to recover Sony Companion encrypted backups... 😢
(I am 100% sure of my password since it works in Sony Companion when I try to export data from my backups, unfortunately their export process does not export SMS database which is what I need...)
Looking at licenses I suspect them to use Christophe Devine AES implementation:
FIPS-197 compliant AES implementation
Copyright © 2006-2007 Christophe Devine
Copyright © 2015 Sony Mobile Communications Inc.
I couldn't find original source but managed to find one here: AES Implementation - Christophe Devine
I'm not an AES expert but you seems to be one so maybe you can find something quickly that can explain this issue? And maybe write a workaround/patch? ❤️ 😀
Thanks a lot!
from android-backup-extractor.
I haven't tried it with 7.1, but extraction does work for 7.0.
Are you sure that the file is complete and the password is correct? BadPadding usually means the key is incorrect for some reason. Could happen if 7.1 changed the key derivation procedure somehow, or if the password is not correct (although the initial checksum check should catch this).
from android-backup-extractor.
I'll try to do the original backup again.
You're right, the checksum catches unless I use the right password, and it
makes a fairly large (3.3 GB) .tar file, but then throws the error and
extraction if the tar fails right at the end too.
Now that I think about it though, the original file could have ended early.
I'll try again tonight.
Thanks for your help! I'll report back either way.
On Mon, Nov 7, 2016, 6:07 PM Nikolay Elenkov [email protected]
wrote:
I haven't tried it with 7.1, but extraction does work for 7.0.
Are you sure that the file is complete and the password is correct?
BadPadding usually means the key is incorrect for some reason. Could happen
if 7.1 changed the key derivation procedure somehow, or if the password is
not correct (although the initial checksum check should catch this).—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#46 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADW8QmLrAIoJdARVbN3dAzM2E4glbrErks5q770pgaJpZM4KrpNA
.
from android-backup-extractor.
Still didn't work :/
I redid the backup and your right, it rejects incorrect passwords, and
looks to succeed with the correct one, but after the .tar is seemingly
finished, throws the bad passing errors and the tar can't be decompressed.
If it matters, I have two different versions of Abe that are throwing
different errors.
V20160710 returns this:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.io.IOException:
javax.crypto.BadPaddingException: Given final block not properly padded
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
at org.nick.abe.Main.main(Main.java:128)
... 5 more
Caused by: java.io.IOException: javax.crypto.BadPaddingException: Given
final block not properly padded
at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:121)
at javax.crypto.CipherInputStream.read(CipherInputStream.java:239)
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:397)
... 6 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly
padded
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.getMoreData(CipherInputStream.java:118)
... 11 more
And the other (downloaded as 'master') returns this for the same backup and
password:
Exception in thread "main" java.lang.RuntimeException:
java.io.IOException: javax.crypto.BadPaddingException: Given final block
not properly padded
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:210)
at org.nick.abe.Main.main(Main.java:40)
Caused by: java.io.IOException: javax.crypto.BadPaddingException: Given
final block not properly padded
at javax.crypto.CipherInputStream.getMoreData(CipherInputStream.java:121)
at javax.crypto.CipherInputStream.read(CipherInputStream.java:239)
at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:238)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:189)
... 1 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly
padded
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.getMoreData(CipherInputStream.java:118)
... 6 more
It could just be 7.1. But if there's anything I can try out help diagnose,
just let me know!
Thanks for your work!!
On Mon, Nov 7, 2016, 8:24 PM Jake Lehenbauer [email protected] wrote:
I'll try to do the original backup again.
You're right, the checksum catches unless I use the right password, and it
makes a fairly large (3.3 GB) .tar file, but then throws the error and
extraction if the tar fails right at the end too.
Now that I think about it though, the original file could have ended early.
I'll try again tonight.
Thanks for your help! I'll report back either way.
On Mon, Nov 7, 2016, 6:07 PM Nikolay Elenkov [email protected]
wrote:
I haven't tried it with 7.1, but extraction does work for 7.0.
Are you sure that the file is complete and the password is correct?
BadPadding usually means the key is incorrect for some reason. Could happen
if 7.1 changed the key derivation procedure somehow, or if the password is
not correct (although the initial checksum check should catch this).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#46 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADW8QmLrAIoJdARVbN3dAzM2E4glbrErks5q770pgaJpZM4KrpNA
.
from android-backup-extractor.
Where did you download the jar from? You should really build from source, if possible, there are a few old versions distributed by third parties.
You could try backing app a single app by specifying the package name. That would let you test if this is related to backup size, or if it is a problem related to 7.1.
Also could you post the header of your file? The first ten or so files are plain text, you can scrub the key/checkum values.
from android-backup-extractor.
I built from source this time!
It works when doing just the SD card, or backing up one app at a time! But for some reason the complete backup still fails unpacking into a .tar.
from android-backup-extractor.
Hi, I don't see anything obvious in the code that will make it fail for large files.
What version of Java are you using? Try using the latest 1.8.x if your is older than current.
You could try setting DEBUG to true here to see if it maybe reads less bytes than expected:
from android-backup-extractor.
I am having this problem. I am using master, and openjdk 1.8.0_111. The .db file is encrypted and was created via the following command:
adb backup -noapk com.tomorrowcorporation.humanresourcemachine
When I try to unpack it, I get the following:
ben@tigger:~/Programs/android-backup-extractor$ java -jar abe.jar unpack backup.ab backup.tar
This backup is encrypted, please provide the password
Password:
Exception in thread "main" java.lang.RuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:210)
at org.nick.abe.Main.main(Main.java:40)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:975)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2165)
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:128)
... 1 more
from android-backup-extractor.
Note, I am using master because the released version at sourceforge also had a similar exception.
from android-backup-extractor.
See my comments above. BadPaddingException usually means truncated archive or problem with password.
What version of Android did you create the archive with, and how big is it?
from android-backup-extractor.
from android-backup-extractor.
I have the same problem.
Backup via adb on Android 6.0
Device: Samsung S5
from android-backup-extractor.
Related Issues (20)
- Backup convert fail HOT 3
- [BUG] unpack worked, but can't extract .tar, any help appreciated HOT 1
- 求解 HOT 3
- Unpacked tar files are corrupt when unpacking a backup of com.mountainproject.android
- Error when installing the latest version
- 求动中文的朋友帮忙看下
- 求懂中文的朋友帮忙看下
- Problem with Non-English notes
- Convert Titanium Backup To ADB Backup
- Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "" HOT 1
- ERROR: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: org/nick/abe/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 HOT 4
- adb backup file extraction
- stuck at 3% when unpacking a .ab HOT 1
- Exception in thread "main" java.lang.RuntimeException HOT 1
- How to use in Ubuntu 22.04? HOT 3
- Password? HOT 8
- Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException: For input string: " 3☺←c" HOT 4
- Wrong version?? HOT 1
- Xiaomi MIUI health HOT 2
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-backup-extractor.