1

I have a Nexus 4 with Android 4.4.1 … I've read that we could root it without wiping the data … well didn't work for me!

I wasn't scared, because I made a full backup using:

adb backup -apk -shared -all --nosystem

Two things I forgot

  • SMS are not restored
  • Google Authenticator data are not restored (the same week I switch all my accounts to two-step auth, like MtGOX …)

However, the problem is this :

Almost everything is restored, except the Pictures ..

Here is a part of the logs from log cat during the restore process

 adb shell logcat

I/BackupManagerService(  605): File in shared storage: 0/DCIM/Camera/IMG_20130731_170638.jpg
D/BackupManagerService(  605): [discarding file content]
I/BackupManagerService(  605): File in shared storage: 0/DCIM/Camera/IMG_20130731_170235.jpg
D/BackupManagerService(  605): [discarding file content]
I/BackupManagerService(  605): File in shared storage: 0/DCIM/Camera/IMG_20130731_170116.jpg
D/BackupManagerService(  605): [discarding file content]
I/BackupManagerService(  605): File in shared storage: 0/DCIM/Camera/IMG_20130731_170110.jpg

My question is, how to restore the pictures ? There is no "adb restore -shared" option ..

In addition, it seem that all the android backup extractor solutions abe, perl, and the last version Titanium Pro, are not able to open encrypted android 4.4 backups …

Any ideas ?

UPDATE

Got a reply from Android Backup Developer (abe.jar) and this change + recompilation fixed the problem of extracting the backup. But this is not answering my initial question, why the photos are not restored using adb restore.

Full discussion here: https://github.com/nelenkov/android-backup-extractor/issues/7

This is the result of the change described here: http://android-developers.blogspot.jp/2013/12/changes-to-secretkeyfactory-api-in.html

and can be probably treated as an Android bug, because restring backups made with 4.3 will most likely fail on 4.4. File one at b.android.com if you can confirm this.

The fix is to replace PBEParametersGenerator.PKCS5PasswordToBytes(pwArray) in AndroidBackup.java:413 with PBEParametersGenerator.PKCS5PasswordToUTF8Bytes(pwArray). There probably needs to be some flag to switch behaviour for 4.4 and prior versions.

  • I was just about recommending those "backup extractors". Have you been able to use them before (so it's something changed with Android 4.4 causing the trouble)? They should be able to work with encrypted backups in general. – Izzy Dec 16 '13 at 7:56
  • I tried backupdecrypt.pl abe.jar and Titanium Backup PRO, they all failed like I have the wrong password. But with either perl or abe, the messages are different (verbiage) when I put the wrong password. Keep in mind that the restore is working (except pictures), so my password is right :) – jflaflamme Dec 16 '13 at 8:48
  • Yes, I've noticed that. My point was rather if there were changes concerning encryption, introduced with 4.4 (if you have a <4.4 encrypted backup to verify), so it's not a generic encryption problem, but one specific to 4.4+. – Izzy Dec 16 '13 at 9:01
  • Sorry about that then. I don't have any adb backups from before 4.4.1 – jflaflamme Dec 16 '13 at 11:46
  • 1
    just added an update from android backup extractor developer – jflaflamme Dec 19 '13 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.