TeamWin / Team-Win-Recovery-Project

Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/
http://twrp.me
1.95k stars 741 forks source link

Cannot restore compressed ADB backup #936

Open haffmans opened 7 years ago

haffmans commented 7 years ago

I used adb backup --twrp --compress to create a backup using TWRP 3.1.0 (Device is a Wileyfox Swift/crackling). However I'm unable to restore the backup or to extract any data out of it. 'adb restore' shows this on the TWRP log (backup containing 2 partitions):

Restoring Data (excl. storage)...
E:Unable to find file system (first period).
E:Unknown restore method for '/sdcard1'
E:ADB Restore failed.
Done processing script file

I am able to extract the raw (compressed) .win partition files from the streamed file. Using gzip/pigz I can also extract the first 128K out of it:

printf "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00" | cat - sdcard1.ext4.win.tgz | pigz -d > sdcard1.ext4.win.tar

The resulting tar file is 131072 bytes large (exactly 128K, which seems to correspond to 1 chunk as written by pigz). Tar is able to read the first few entries out of the tar file without problems.

This is exactly the same for multiple partitions in the backup. Getting the files from a similar backup without compression is no problem at all.

Is there any (easy) way to get the data back?

ICHx commented 6 years ago

I was so unfortunately that I didnt read this beforehand