• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[TWRP][3.4.0-10][raphael]Off/Unoff TWRP for Xiaomi Mi 9T Pro/Redmi K20 Pro (Stable)

Search This thread

arielugose

Member
Oct 11, 2013
28
1
In TWRP, it's a common problem that "extracttarfork() process ended with error=255" when attempting restore data from backup, and it would not be fixed unless TWRP officially rewrites the recovery envoronment from the code. There's a solution might help, at least
I faced same issue but solved by doing this:

1. Before formatting data partition, copy all files from internal storage to a computer because you will lose files as you proceed. (including TWRP folder, which stores backup files)

2. In TWRP, select wipe --> advanced wipe --> choose data --> repair or change file system --> change file system --> select f2fs --> swipe to change, then revert the file system of data partition back to ext4 in the same way.

3. Transfer your files back to internal storage and do the restoration.

Reboot and see if it's work.

still have error.
 

hrdlw

Senior Member
Jan 10, 2020
151
11
Which version between 3.3.1-1 to 3.3.1-32 should i flash bcuz there are some of them

---------- Post added at 10:41 PM ---------- Previous post was at 10:33 PM ----------

And what are the benefits of decryption?
 

BlueSky_Vincent

Senior Member
Apr 8, 2013
226
61
Pahang
In TWRP, it's a common problem that "extracttarfork() process ended with error=255" when attempting restore data from backup, and it would not be fixed unless TWRP officially rewrites the recovery envoronment from the code. There's a solution might help, at least
I faced same issue but solved by doing this:

1. Before formatting data partition, copy all files from internal storage to a computer because you will lose files as you proceed. (including TWRP folder, which stores backup files)

2. In TWRP, select wipe --> advanced wipe --> choose data --> repair or change file system --> change file system --> select f2fs --> swipe to change, then revert the file system of data partition back to ext4 in the same way.

3. Transfer your files back to internal storage and do the restoration.

Reboot and see if it's work.


This issue usually because u have dual app enabled during backup. You should remove/deactivate dual app before proceeding with backup.
 

arielugose

Member
Oct 11, 2013
28
1
Send logs after you tried to restore the backup and i can check.

adb shell cat /tmp/recovery.log

here is what i found
==> extracting: //data/data/com.android.theme.icon_pack.circular.android/ (mode 40700, directory)
tar_extract_file(): restoring android user.inode_cache xattr to //data/data/com.android.theme.icon_pack.circular.android/
setting user.inode_cache on //data/data/com.android.theme.icon_pack.circular.android/ pointing to //data/data/com.android.theme.icon_pack.circular.android//cache
tar_extract_file(): restoring android user.inode_code_cache xattr to //data/data/com.android.theme.icon_pack.circular.android/
setting user.inode_code_cache on //data/data/com.android.theme.icon_pack.circular.android/ pointing to //data/data/com.android.theme.icon_pack.circular.android//code_cache
==> extracting: //data/data/com.android.theme.icon_pack.circular.android/code_cache/ (mode 42771, directory)
*** using existing directory
==> extracting: //data/data/com.android.theme.icon_pack.circular.android/cache/ (mode 42771, directory)
*** using existing directory
==> extracting: //data/data/com.breel.wallpapers19/ (mode 40700, directory)
tar_extract_file(): restoring android user.inode_cache xattr to //data/data/com.breel.wallpapers19/
setting user.inode_cache on //data/data/com.breel.wallpapers19/ pointing to //data/data/com.breel.wallpapers19//cache
tar_extract_file(): restoring android user.inode_code_cache xattr to //data/data/com.breel.wallpapers19/
setting user.inode_code_cache on //data/data/com.breel.wallpapers19/ pointing to //data/data/com.breel.wallpapers19//code_cache
==> extracting: //data/data/com.breel.wallpapers19/code_cache/ (mode 42771, directory)
*** using existing directory
==> extracting: //data/data/com.breel.wallpapers19/cache/ (mode 42771, directory)
*** using existing directory
==> extracting: //data/local/ (mode 40751, directory)
restoring policy 1DK > '80e26fb974000000' to '//data/local/'
failed to set policy for '//data/local/'
tar_extract_file(): failed to restore EXT4 crypt policy to dir '//data/local/' '80e26fb974000000'!!!
==> extracting: //data/local/traces/ (mode 40777, directory)
restoring policy 1DK > '80e26fb974000000' to '//data/local/traces/'
failed to set policy for '//data/local/traces/'
tar_extract_file(): failed to restore EXT4 crypt policy to dir '//data/local/traces/' '80e26fb974000000'!!!
==> extracting: //data/local/tmp/ (mode 40771, directory)
restoring policy 1DK > '80e26fb974000000' to '//data/local/tmp/'
failed to set policy for '//data/local/tmp/'
tar_extract_file(): failed to restore EXT4 crypt policy to dir '//data/local/tmp/' '80e26fb974000000'!!!
==> extracting: //data/ota/ (mode 40771, directory)
restoring policy 1DK > '80e26fb974000000' to '//data/ota/'
failed to set policy for '//data/ota/'
tar_extract_file(): failed to restore EXT4 crypt policy to dir '//data/ota/' '80e26fb974000000'!!!
==> extracting: //data/vendor_de/ (mode 40771, directory)
==> extracting: //data/vendor_de/0/ (mode 40771, directory)
Cannot find key for 0
error looking up proper e4crypt policy for '//data/vendor_de/0/' - 1DE0
tar_extract_file(): failed to extract //data/vendor_de/0/ !!!
I:Unable to extract tar archive '/data/media/TWRP/BACKUPS/22fd0d91/2020-01-24--20-05-22_QQ1B200105004/data.ext4.win001'
Error during restore process.
I:Error extracting '/data/media/TWRP/BACKUPS/22fd0d91/2020-01-24--20-05-22_QQ1B200105004/data.ext4.win001' in thread ID 0
I:Error extracting split archive.
Error during restore process.
extractTarFork() process ended with ERROR: 255
I:Set page: 'action_complete'
I:TWFunc::Set_Brightness: Setting brightness control to 204
I:Cannot find file /sys/class/timed_output/vibrator/enable
I: operation_end - status=1
Truncating string cache entries.
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
I:TWFunc::Set_Brightness: Setting brightness control to 204
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
 

LuCa™

Member
Nov 11, 2014
7
1
Campos dos Goytacazes
Hello everyone!
My K20 Pro 12/512 Chinese version (unlocked by Xiaomi Store in AliExpress) arrived today.
After updating via OTA it is with the Global version 11.0.1.0 stable (QFKMIXM).
After following all the procedures with fastboot, I successfully installed version 3.3.1-32 of TWRP.
After accessing TWRP I installed Magisk version 20.3.
When selecting to boot the system it returns to TWRP.
I then installed the previous version of Magisk: 20.1.
Upon rebooting to the system it logs in normally, but Magisk is not installed.
TWRP remained, I try to access it again, I did a successful Backup. But Magisk (although there is no error) does not install.

Can someone help me?

Thanks!
 

wizzman

Senior Member
Apr 26, 2011
70
6
Senlis
Hello everyone!
My K20 Pro 12/512 Chinese version (unlocked by Xiaomi Store in AliExpress) arrived today.
After updating via OTA it is with the Global version 11.0.1.0 stable (QFKMIXM).
After following all the procedures with fastboot, I successfully installed version 3.3.1-32 of TWRP.
After accessing TWRP I installed Magisk version 20.3.
When selecting to boot the system it returns to TWRP.
I then installed the previous version of Magisk: 20.1.
Upon rebooting to the system it logs in normally, but Magisk is not installed.
TWRP remained, I try to access it again, I did a successful Backup. But Magisk (although there is no error) does not install.

Can someone help me?

Thanks!
Retry install magisk 20.3 if again bootloop TWRP or magisk not installed , format data (with yes) reinstall your rom, reboot TWRP then flash magisk and reboot
 
  • Like
Reactions: LuCa™

LuCa™

Member
Nov 11, 2014
7
1
Campos dos Goytacazes
Retry install magisk 20.3 if again bootloop TWRP or magisk not installed , format data (with yes) reinstall your rom, reboot TWRP then flash magisk and reboot

Okay. More questions from a newbie: :eek:

Is this version that came installed the best (Global) or is another version recommended?

What about my current ROM, could you please tell me where to download? Do you have a special version to use with TWRP?

Another question from those who don't understand much. Will I lose my data in this procedure?

thank you

(Update)

I find this solution and now is all Ok!

"Go to /data/adb/magisk/chromeos find "futility" file. Permission 644 for it.
Go to /data/adb/magisk find "BusyBox" file and permission 664 for it.
Reboot and done.
In future, when you flash any rom on k20 pro. Remember that do it if you flash magisk.
Good luck!
(Solution from 4pda)"
 
Last edited:
  • Like
Reactions: Maxissc

Kevindiepenmaat

Senior Member
May 26, 2008
539
150
Borne
Hey guys

I got a question is it possible already to create an backup and restore it when 2 profile's are configured?

Like private and work profile?

I was able to use this with my previous phone, that's why I ask.
 

Top Liked Posts