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.94k stars 740 forks source link

The backup was created on an encrypted partition and cannot be restored on an unencrypted partition. process ended with ERROR: 255 #1586

Open dianjuchen opened 3 years ago

dianjuchen commented 3 years ago

Device codename: TWRP version: Mi mix2s@TWRP 3.4.0-0

WHAT STEPS WILL REPRODUCE THE PROBLEM?

Create a backup on one phone with encryption enabled. and restore on another phone with encryption disabled.

WHAT IS THE EXPECTED RESULT?

…… Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode Invalid encryption mode file /data/unencrypted/mode …… ==> extracting: //*** (mode 40770, directory)

The first file encountered during the restoration process failed, the directory can be restored tar_extract_file(): failed to extract !!! I:Unable to extract tar archive Error during restore process. I:Error extracting '*/data.ext4.win000' in thread ID 0 I:Error extracting split archive. Error during restore process. extractTarFork() process ended with ERROR: 255

WHAT HAPPENS INSTEAD?

It should be possible to recover, or at least suggest the cause of the error.

Finding this cause wasted a lot of time.

ADDITIONAL INFORMATION

Make the recovered mobile phone in encryption mode, and the file can be restored successfully I guess that in turn, if files created on an unencrypted phone are restored on an encrypted phone, the same error may occur

/tmp/recovery.log: dmesg:

Aholicknight commented 3 years ago

I'm having this same error does anyone know how to fix this??

EDIT: I gave up and started from scratch but what I learned is that it randomly works sometimes it shows that error and sometimes it doesn't, this does not make any sense.

sieger007 commented 2 years ago

I had this issue. Prev install was encrypted and this one so far isn't but in both cases force encryption is disabled . Ran into 255 tar fork error even after wiping +formating partitions. Only way I could restore is re-flash stock with flashtool & then run /data/ restore. But after that it will bootloop ( restore to new install instance which is encrypted and UN-ecrypted - same result ) . Restore is a functionality given by TWRP so please give us a fix . Here is the kernel log & logcat