Skip to content
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

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 this issue Oct 25, 2020 · 2 comments

Comments

@dianjuchen
Copy link

  • [ T] I am running an official build of TWRP, downloaded from https://twrp.me/Devices/
  • [ T] I am running the latest version of TWRP
  • [ T] I have read the FAQ (https://twrp.me/FAQ/)
  • [ T] I have searched for my issue and it does not already exist

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
Copy link

Aholicknight commented Feb 4, 2021

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants