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

Android 8.0 not working #53

Closed
shanij89 opened this Issue Jun 28, 2017 · 14 comments

Comments

Projects
None yet
7 participants
@shanij89

shanij89 commented Jun 28, 2017

Hi, I tried to see the .ab file from a coolpad android 7.0 version, in vain. The ab file shows version 5.Please resolve the issue at your best.

@nelenkov

This comment has been minimized.

Show comment
Hide comment
@nelenkov

nelenkov Jun 28, 2017

Owner

Can you paste the exception you are getting and the backup header?

Also, are you having problems with Android 7 (Nougat) or 8 (O, in preview)

Owner

nelenkov commented Jun 28, 2017

Can you paste the exception you are getting and the backup header?

Also, are you having problems with Android 7 (Nougat) or 8 (O, in preview)

@shanij89

This comment has been minimized.

Show comment
Hide comment
@shanij89

shanij89 Jun 28, 2017

Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgument
Exception: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:232)
at org.nick.abe.Main.main(Main.java:40)
Caused by: java.lang.IllegalArgumentException: Don't know how to process version
5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:72)
... 1 more

shanij89 commented Jun 28, 2017

Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgument
Exception: Don't know how to process version 5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:232)
at org.nick.abe.Main.main(Main.java:40)
Caused by: java.lang.IllegalArgumentException: Don't know how to process version
5
at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:72)
... 1 more

@shanij89

This comment has been minimized.

Show comment
Hide comment
@shanij89

shanij89 Jun 28, 2017

Android Backup version shows 5.1 in the header

shanij89 commented Jun 28, 2017

Android Backup version shows 5.1 in the header

@shanij89

This comment has been minimized.

Show comment
Hide comment
@shanij89

shanij89 Jun 28, 2017

ANDROID BACKUP.5.1.AES-256.F087F781BBBF7B5CC575145DF90067FC6AE9A2E76517149BB403799ABEE3855444A14FF4F283913ACC6F6FAD0B4018BD1BD30BC2DA9B67F76CDBE40B3F8E1E76.11EFF532D53B8F833024E4E749FA13E450C4EE95065F2A5AEA5052F3B6B5F797A115993E5D0A3DE2A3EE30B9CB7654F109C437CCC55CDA1923B6D961EF31B682.10000.48B1D9E79249ADE23A4EDDBE219501E0.DCCD4F2A995B91B40A0A79C6869B448C1FA00DF397284D9AA3E28667785ADEDCCB9A2793735FD21B7E8C94B791CFDA70D0037935EE0F5292FA768CFD26890D379F6D585BFF5F08975DEEBBE7E6DB34EF75DB08A1EEF30921085144C995443D71..

shanij89 commented Jun 28, 2017

ANDROID BACKUP.5.1.AES-256.F087F781BBBF7B5CC575145DF90067FC6AE9A2E76517149BB403799ABEE3855444A14FF4F283913ACC6F6FAD0B4018BD1BD30BC2DA9B67F76CDBE40B3F8E1E76.11EFF532D53B8F833024E4E749FA13E450C4EE95065F2A5AEA5052F3B6B5F797A115993E5D0A3DE2A3EE30B9CB7654F109C437CCC55CDA1923B6D961EF31B682.10000.48B1D9E79249ADE23A4EDDBE219501E0.DCCD4F2A995B91B40A0A79C6869B448C1FA00DF397284D9AA3E28667785ADEDCCB9A2793735FD21B7E8C94B791CFDA70D0037935EE0F5292FA768CFD26890D379F6D585BFF5F08975DEEBBE7E6DB34EF75DB08A1EEF30921085144C995443D71..

@shanij89

This comment has been minimized.

Show comment
Hide comment
@shanij89

shanij89 Jun 28, 2017

I backed up from Android 8.0

shanij89 commented Jun 28, 2017

I backed up from Android 8.0

@sovikstepan

This comment has been minimized.

Show comment
Hide comment
@sovikstepan

sovikstepan Jul 24, 2017

Hi Nelenkov,

is there any plan to fix this? :) I'm running into same issue with "Exception: Don't know how to process version 5" with Developer preview of Android O (Google Pixel C). I have no issue with Android 7 (Nougat) at all (Google Pixel C & Nexus 9).

Thx & Have a nice day.

sovikstepan commented Jul 24, 2017

Hi Nelenkov,

is there any plan to fix this? :) I'm running into same issue with "Exception: Don't know how to process version 5" with Developer preview of Android O (Google Pixel C). I have no issue with Android 7 (Nougat) at all (Google Pixel C & Nexus 9).

Thx & Have a nice day.

@mhoran

This comment has been minimized.

Show comment
Hide comment
@mhoran

mhoran Aug 10, 2017

I removed the version check from AndroidBackup.java, recompiled, and extracted a backup just fine. So likely it is compatible and this check just needs to be changed. YMMV.

mhoran commented Aug 10, 2017

I removed the version check from AndroidBackup.java, recompiled, and extracted a backup just fine. So likely it is compatible and this check just needs to be changed. YMMV.

@kribjo

This comment has been minimized.

Show comment
Hide comment
@kribjo

kribjo Sep 5, 2017

Same issue here. It would be lovely to see an update for those who can't compile their own.

kribjo commented Sep 5, 2017

Same issue here. It would be lovely to see an update for those who can't compile their own.

@treed593

This comment has been minimized.

Show comment
Hide comment
@treed593

treed593 Sep 6, 2017

@mhoran can you upload your version of the jar with the 8.0 fix

treed593 commented Sep 6, 2017

@mhoran can you upload your version of the jar with the 8.0 fix

@mhoran

This comment has been minimized.

Show comment
Hide comment
@mhoran

mhoran Sep 7, 2017

Attached -- though I wouldn't recommend running jar files from random folks on the Internet.

Here's the diff:

diff --git a/src/org/nick/abe/AndroidBackup.java b/src/org/nick/abe/AndroidBackup.java
index b27986f..dc333ee 100644
--- a/src/org/nick/abe/AndroidBackup.java
+++ b/src/org/nick/abe/AndroidBackup.java
@@ -38,6 +38,7 @@ public class AndroidBackup {
     private static final int BACKUP_FILE_V2 = 2;
     private static final int BACKUP_FILE_V3 = 3;
     private static final int BACKUP_FILE_V4 = 4;
+    private static final int BACKUP_FILE_V5 = 5;
 
     private static final String ENCRYPTION_MECHANISM = "AES/CBC/PKCS5Padding";
     private static final int PBKDF2_HASH_ROUNDS = 10000;
@@ -68,7 +69,7 @@ public class AndroidBackup {
                 System.err.println("Version: " + versionStr);
             }
             int version = Integer.parseInt(versionStr);
-            if (version < BACKUP_FILE_V1 || version > BACKUP_FILE_V4) {
+            if (version < BACKUP_FILE_V1 || version > BACKUP_FILE_V5) {
                 throw new IllegalArgumentException(
                         "Don't know how to process version " + versionStr);
             }

abe.zip

mhoran commented Sep 7, 2017

Attached -- though I wouldn't recommend running jar files from random folks on the Internet.

Here's the diff:

diff --git a/src/org/nick/abe/AndroidBackup.java b/src/org/nick/abe/AndroidBackup.java
index b27986f..dc333ee 100644
--- a/src/org/nick/abe/AndroidBackup.java
+++ b/src/org/nick/abe/AndroidBackup.java
@@ -38,6 +38,7 @@ public class AndroidBackup {
     private static final int BACKUP_FILE_V2 = 2;
     private static final int BACKUP_FILE_V3 = 3;
     private static final int BACKUP_FILE_V4 = 4;
+    private static final int BACKUP_FILE_V5 = 5;
 
     private static final String ENCRYPTION_MECHANISM = "AES/CBC/PKCS5Padding";
     private static final int PBKDF2_HASH_ROUNDS = 10000;
@@ -68,7 +69,7 @@ public class AndroidBackup {
                 System.err.println("Version: " + versionStr);
             }
             int version = Integer.parseInt(versionStr);
-            if (version < BACKUP_FILE_V1 || version > BACKUP_FILE_V4) {
+            if (version < BACKUP_FILE_V1 || version > BACKUP_FILE_V5) {
                 throw new IllegalArgumentException(
                         "Don't know how to process version " + versionStr);
             }

abe.zip

@treed593

This comment has been minimized.

Show comment
Hide comment
@treed593

treed593 Sep 7, 2017

Thanks mhoran, agreed you shouldnt randomly run jars from people on the internet, at least not on a live machine...a sandbox however

treed593 commented Sep 7, 2017

Thanks mhoran, agreed you shouldnt randomly run jars from people on the internet, at least not on a live machine...a sandbox however

@Bohne2017

This comment has been minimized.

Show comment
Hide comment
@Bohne2017

Bohne2017 Oct 24, 2017

Hello mhoran,

I have a little problem that I don't quite understand. The abe. jar you provide is unpacked to a different folder than I want. Actually, the folder to which the backup. ab is unpacked should be different, as you can see in the following batch file:

@echo off

cd Data
java -jar abe.jar unpack adb/Sicherung/backup.ab adb/Sicherung/backup.tar
tar -xvf adb/Sicherung/backup.tar
tar -tf adb/Sicherung/backup.tar > adb/Sicherung/backup.list

pause

The abe. jar unpacks the backup. off to the "Data\adb\S Backup"folder, but then unpacks the backup. tar not to the same folder, but to the "Data\adb\apps"folder. Why is that, and can I do something about it?

Thank you for your help!

Bohne2017 commented Oct 24, 2017

Hello mhoran,

I have a little problem that I don't quite understand. The abe. jar you provide is unpacked to a different folder than I want. Actually, the folder to which the backup. ab is unpacked should be different, as you can see in the following batch file:

@echo off

cd Data
java -jar abe.jar unpack adb/Sicherung/backup.ab adb/Sicherung/backup.tar
tar -xvf adb/Sicherung/backup.tar
tar -tf adb/Sicherung/backup.tar > adb/Sicherung/backup.list

pause

The abe. jar unpacks the backup. off to the "Data\adb\S Backup"folder, but then unpacks the backup. tar not to the same folder, but to the "Data\adb\apps"folder. Why is that, and can I do something about it?

Thank you for your help!

@mhoran

This comment has been minimized.

Show comment
Hide comment
@mhoran

mhoran Oct 25, 2017

Hmm, I'm surprised about that. I'd expect backup.tar to extract to the current directory (e.g. Data/apps). I don't have a backup to test this out with at the moment, but I'm fairly certain that's what I saw in the past. a-b-e doesn't, so far as I know, use the local filesystem hierarchy to create the backup.tar.

mhoran commented Oct 25, 2017

Hmm, I'm surprised about that. I'd expect backup.tar to extract to the current directory (e.g. Data/apps). I don't have a backup to test this out with at the moment, but I'm fairly certain that's what I saw in the past. a-b-e doesn't, so far as I know, use the local filesystem hierarchy to create the backup.tar.

@nelenkov

This comment has been minimized.

Show comment
Hide comment
@nelenkov

nelenkov Oct 25, 2017

Owner

ABE doesn't do anything with the tar file itself. Differences in behaviour are probably due to the tar variant you are using.

In any case, 8.0 should be supported now, so closing this.

Owner

nelenkov commented Oct 25, 2017

ABE doesn't do anything with the tar file itself. Differences in behaviour are probably due to the tar variant you are using.

In any case, 8.0 should be supported now, so closing this.

@nelenkov nelenkov closed this Oct 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment