0

For 2 days, I've desperately been trying to recover a very important, accidentally deleted text conversation from Message+. Let me say, I know NOTHING about tech! After trying questionable softwares that could not assist without rooting (and I felt doubtful they be helpful even if I had rooted), it seemed like the best option was to try to find the deleted files by downloading ADB and doing a backup. After a lot of frustration, I was finally successful in creating a backup.ab file. The phone did require be to encrypt it. But the issue that has plagued me today is unpacking that to a .tar file. After tons more research, I have installed Android Backup Extractor and java. While I have found a couple people ask similar questions on the web, my error message appears to be different. I was praying for some help in translating it and figuring out what to do next. Here is what I typed along with the error message. BTW, my phone is a Galaxy S10+ running on Android Version 12. And the backup file has over 40,000 kb.

C:\Program Files\Java\jdk-21\bin>java -jar abe.jar unpack backup.ab [password]

This backup is encrypted, please provide the password
Password:

Calculated MK checksum (use UTF-8: true): 37BDEBD1C840E3B9C82E9EE3D221758E8358AC92DF1C2FD274BBDC525066311D
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: [password] (Access is denied)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
        at org.nick.abe.Main.main(Main.java:40)
Caused by: java.io.FileNotFoundException: [password] (Access is denied)
        at java.base/java.io.FileOutputStream.open0(Native Method)
        at java.base/java.io.FileOutputStream.open(FileOutputStream.java:289)
        at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:230)
        at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:118)
        at org.nick.abe.AndroidBackup.getOutputStream(AndroidBackup.java:314)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:199)
        ... 1 more

Update 1

After fixing the missing tar file argument problem the error message changed:

C:\Program Files\Java\jdk-21\bin>java -jar abe.jar unpack backup.ab backup.tar [belle]

Exception in thread "main" java.lang.RuntimeException: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:233)
        at org.nick.abe.Main.main(Main.java:40)
Caused by: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
        at java.base/com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:861)
        at java.base/com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:941)
        at java.base/com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:734)
        at java.base/com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
        at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2244)
        at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:131)
        ... 1 more

Thank you so much for any help!

Update 2

I also just tried using android tools processor instead.

C:\Program Files\Java\jdk-21\bin>java -jar abp.jar unpack backup.ab backup.tar
Backup encrypted, enter password (will NOT be displayed):
Password:

No error message was produced, so I thought it might have worked. Yet no .tar file in sight!

3
  • Crypt errors usually mean that the password was wrong. After update 2 of your question you use abp.jar - what is it? Also make sure there is no fixed backup password set in developer options. Otherwise the backup password may work different than you expect, see e.g. last comment of android.stackexchange.com/a/255843/2241
    – Robert
    Feb 25 at 22:47
  • abp.jar was the file included in android backup processor. It doesn't give error messages, but doesn't seem to do anything. I did check, and no password had been set, so it should have been using the password I entered when prompting. However, I tried creating a permanent backup password through developer tools and redid the whole process, yet got the same results (same error with abe.jar, same nothingness with abp.jar).
    – jt122777
    Feb 25 at 23:45
  • GOT IT! I ran the command prompt as an administrator and it worked. I then had to run 7-zip as admin to extract. Needed another java program to convert into readable text. Sadly, the deleted texts ARE NOT there.
    – jt122777
    Feb 26 at 2:16

1 Answer 1

2

You have a little error in your command, the output tar file-name is missing.

If you look at the unpack syntax in the abe README.md you find this:

abe unpack  <backup.ab> <backup.tar> [password]

As you have not provided a backup.tar file name abe uses the password you supplied and wants to write the output tar file untm that file. It seems that you password is of high quality with special characters the Windows file-system does not support or a similar effect that leads to the access denied error.

A second problem is that you execute everything in C:\Program Files\Java\jdk-21\bin. Directories below C:\Program Files are usually only writable for users with Administrator permissions. Therefore I would strongly recommend not to place user data files like Android .ab backup file there.

2
  • Please make sure the .ab files has a size of 1KB or more. If not the ab files is empty. Also it would be better not to execute your command in Program Files subdirectory where only admins have write permissions.
    – Robert
    Feb 25 at 21:35
  • Oh, and to your advice about the subdirectory...the only way I could get it to recognize java existed was to copy abe.jar and backup.ab files into the java bin folder. I'm sure there's a better way, but again, I have no tech knowledge/skills.
    – jt122777
    Feb 25 at 23:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .