So I had the md5 mismatch error and the easiest solution was to use a text editor and delete the contents of the nandroid.md5 file under Clockworkmod/Backup/(NameofBackup).
Well I did that but now when I try to restore I get the md5 mismatch error INSTANTLY, so I'm assuming that just made things worse. How can I fix this?
elite_newb said:
So I had the md5 mismatch error and the easiest solution was to use a text editor and delete the contents of the nandroid.md5 file under Clockworkmod/Backup/(NameofBackup).
Well I did that but now when I try to restore I get the md5 mismatch error INSTANTLY, so I'm assuming that just made things worse. How can I fix this?
Click to expand...
Click to collapse
What were you attempting to do when you received the error message? Flashing from CWM recovery?
Hello, i recently installed TWRP 3.1.1-1 as well as LineageOS, everything was working fine and i did a backup of the ROM (with root, xposed and all my settings and datas).
For some reasons i wanted to restore this backup but i cannot do that, the process stops at 54-55% while restoring datas :/ I get error 255 and when i look at the twrp log i see that "dataf2fs.win001" is the archive that cannot be extracted, when i delete it i can restore just fine but this is a 1,5 Gb file which contains important files.
Here is the end of the log:
extracting: //data/user_de/ (mode 40711, directory)
I:Unable to extract tar archive '/external_sd/TWRP/BACKUPS/73QDU16909001751/new lineage/data.f2fs.win001'
Error during restore process.
I:Error extracting '/external_sd/TWRP/BACKUPS/73QDU16909001751/new lineage/data.f2fs.win001' in thread ID 0
I:Error extracting split archive.
Error during restore process.
extractTarFork() process ended with ERROR: 255
Then i installed a clean EMUI version and i did a backup without any issue but I get the same error when i try to restore this backup and it comes from the same file.
i tried many things like mounting/unmounting datas, format datas, multiple reboots, factory reset before restoring...
I can restore the backup without the datas but the ROM isn't working properly...
Either TWRP is corrupted and cannot extract these files or the backups made are corrupted.
I installed a fresh version of LineageOS but i would like to restore my old backup which was fully customized and btw understand where this issue come from.
Thanks a lot for any help/advice :fingers-crossed:
Hi, i am trying to create a backup of my phone but it says error backup error code 255. Any ideas?
https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632/amp/
NOTE THIS IS NOT "UNABLE TO BACK UP" THIS IS "UNABLE TO RESTORE"
Lots of people on this forum, and lots of people on the internet have errors trying to back up because of this dreaded error 255. But, for me, the backup was fine, but now I can't restore. This is a huge problem because I just tried out a custom ROM (which turned out to be a huge fail), and I want to go back to stock.
So I switched back to the other slot (A/B ftw), wiped all data, formatted SD card, set up the OS to have the same lock pattern as the backup, transferred the backup onto the phone and tried to restore, and, well, fuck.
Code:
[RESTORE STARTED]
Restore folder: '/data/media/0/TWRP/2020-11-08--22-06-46 PRE-RR'
Skipping Digest check based on user setting.
Calculating restore details...
Restoring 4 partitions...
Total restore size is 11276MB
Restoring Vendor Image...
[Vendor Image done (3 seconds)]
Restoring Boot...
[Boot done (0 seconds)]
Wiping Data (excl. storage)
Wiping data without wiping /data/media ...
Done.
Restoring Data (excl. storage)...
extractTarFork() process ended with ERROR: 255
It failed, and there is absolutely nothing I can do about it. TWRP is using buggy commands to extract the backup and I don't know what's triggering the bug.
As a result, right now all my data is in limbo. TWRP cannot restore this backup as-is. I can't just go back in time and use `pm remove-user 999` or `pm remove-user 10` because the backup has already been created. Any solution that has to be done before the backup phase is inaccessible to me now.
My hope is that some smart person here can help me find a way to get this backup back onto the phone. Right now the internet does not have a solution to this problem, no matter how many naive users spam discussion boards with "pm remove-user 999 totally worked". Serious answers only.
Relevant section in the recovery log:
Code:
==> extracting: //data/vendor_de/10/ (mode 40771, directory)
Cannot find key for 10
error looking up proper e4crypt policy for '//data/vendor_de/10/' - 1DE10
tar_extract_file(): failed to extract //data/vendor_de/10/ !!!
I:Unable to extract tar archive '/data/media/0/TWRP/2020-11-08--22-06-46 PRE-RR/data.ext4.win000'
Error during restore process.
I:Error extracting '/data/media/0/TWRP/2020-11-08--22-06-46 PRE-RR/data.ext4.win000' in thread ID 0
I:Error extracting split archive.
Error during restore process.
pigz: write error code 32
pigz: abort: write error on <stdout>
extractTarFork() process ended with ERROR: 255
I suppose the solution is to make it "find a key for 10", but how? Do I just need to somehow recreate the 10 user before restoring the backup?
EDIT NOTICE: THIS DIDN'T WORK, DON'T MAKE IT WORSE BY TRYING
ORIGINAL POST IS BELOW
Alright. Well, I found a solution. That was quick.
The error is triggered by the backup containing a user that isn't present during the restore, I think. One solution is (theoretically) to create the missing user... another solution is to remove the missing user from the backup.
Turns out, backups are not so hard to modify, even in their compressed form. However, it is a little bit unintuitive at first.
You can't use the `tar` command to modify the backup, at all. TWRP's tar doesn't even support the --delete flag, nor does the BSD tar command (what ships with macOS). Even after installing GNU tar, it still refuses to work on a compressed archive (probably for the better).
You either need a Windows system with WinRAR/7zip (allows opening/modifying compressed files without extracting them), or a macOS/Linux system with FUSE and archivemount. If you're on Windows, you will have to manually search every single folder for 10 or 999 folders and delete every single one. If you're on macOS/Linux, the process is a bit more technical but also a bit more automated. And in both cases you will have to do this many times, and it can easily take half an hour or more and many restore attempts.
First and foremost, you need the recovery log to find out where the process failed. Every time it fails you will need to go to Advanced > Copy Log, copy them to the SD card, then use the flipping horrible Android File Transfer program to transfer the recovery.log to your PC, then use the cat/tail command or a text editor of your choice to read the log file.
Somewhere around the end of that file you will find something that looks like this:
Code:
==> extracting: //data/misc_de/10/ (mode 41771, directory)
Cannot find key for 10
error looking up proper e4crypt policy for '//data/misc_de/10/' - 1DE10
tar_extract_file(): failed to extract //data/misc_de/10/ !!!
I:Unable to extract tar archive '/data/media/0/TWRP/2020-11-08--22-06-46 PRE-RR/data.ext4.win003'
This contains all the info you need: the archive where the tar command gave up, and the file it gave up on.
Destroy that file with extreme prejudice.
Make a mount point with `mkdir mnt`, and mount the archive with `sudo archivemount data.ext4.win003 mnt`. (Of course, substitute data.ext4.win003 with the culprit archive file.)
If you're like me and have this problem with 10 folders, or 999 folders, you can find every single one of its kind with `sudo find mnt -name 10`. You can then use `sudo rm -rf` to delete every one of them. If you're brave, try `sudo find data -name 10 -exec sudo rm -rf \{\} \;`. I'm not responsible for any data losses incurred by using powerful commands that don't prompt you for confirmation.
Notice how I'm repeatedly using `sudo` for this: FUSE is kind of quirky and so is the kernel about multi-user filesystems. If you don't use sudo to mount the archive, then the user won't have permission to represent files it doesn't own, even if root is the one asking. You'll get weird "No such file or directory" errors for files and directories that are contained in parent directories' file listings. If you don't use sudo for the find or rm commands, you won't have permission to look inside folders or delete folders. Really, do everything with sudo because it's the only way to do this correctly.
Once you're done scrubbing the problem files away (be careful, do not use a file explorer of any kind, especially macOS's, which generally craps .DS_Store files all over your filesystem), unmount and save the archive with `sudo umount mnt`.
The next part is very important because recompressing files is not instant.
You will need to run `watch -n 1 du -hs data.ext4.win003` and WAIT.
Watch the file size slowly grow; only continue once it has stayed the exact same for at least one minute. Yes, it can definitely stop for 30 seconds at a time and then resume. You will need to give it time to recompress. It's also probably normal for the recompressed file to be about half the size of the initial file; that's just an artifact of TWRP not using very good compression to begin with. archivemount will create a backup of the archive with .orig appended, so you can try again if your backup ends up getting corrupted. (I just created an entirely separate copy of the backup to use archivemount on)
Of course, if you're on Windows you can skip all this and simply delete the problem file from WinRAR/7zip, and it'll be gone instantly and you can just proceed to copy the archive over to your device and retry the backup. You will have to do all the searching manually though, or perhaps you could try your luck with WSL. (Does WSL support FUSE?)
Expect this process to fail multiple times, but all at different points; whenever it fails at a different file, you know it got past the one you just removed. all you need to do is repeat this process over and over, slowly fixing your backup until it restores properly. This is what needs to be done if you can't reproduce the event that created that user in the first place. I'm sure if the user is important, it'll get created again.
Also, looks like user 10 is what happens when Google Play updates Device Personalization Services. Is this the generic "updates for system apps" user or is it specifically for that app?
EDIT: But updating that app doesn't create user 10. Interesting...
EDIT 2: User 10 is the guest user!! All I needed to do was create user 10 and that allowed me to restore my backup!
My post above is still good to see what I tried at first but it actually bricked my device until I factory reset it again, so :/
LoganDark said:
Also, looks like user 10 is what happens when Google Play updates Device Personalization Services. Is this the generic "updates for system apps" user or is it specifically for that app?
EDIT: But updating that app doesn't create user 10. Interesting...
EDIT 2: User 10 is the guest user!! All I needed to do was create user 10 and that allowed me to restore my backup!
My post above is still good to see what I tried at first but it actually bricked my device until I factory reset it again, so :/
Click to expand...
Click to collapse
Glad you managed to get your device back!
I had the same problem on another phone. The reason I got the error was because I tried to restore a decrypted backup on an encrypted device. After choosing the option "Format" in TWRP and typing 'yes' to confirm the decryption process, I was able to restore my backup.
Im having the same error in my realme xt...
sir..please help me.. I have a twrp backup of system image vendor image data boot recovery persist but im unable to recover because it shows an "error extract tar fork process ended up with error 255".during backup i had a pincode for screenlock.
i also have a backup of my internal storage in twrp but im not able to restore because of this error
LoganDark said:
Also, looks like user 10 is what happens when Google Play updates Device Personalization Services. Is this the generic "updates for system apps" user or is it specifically for that app?
EDIT: But updating that app doesn't create user 10. Interesting...
EDIT 2: User 10 is the guest user!! All I needed to do was create user 10 and that allowed me to restore my backup!
My post above is still good to see what I tried at first but it actually bricked my device until I factory reset it again, so :/
Click to expand...
Click to collapse
Hi. Did you create user 10 in Source, or in destination?
How did you do that in source?
If in destination, then is it possible to do it via TWRP?
EDIT: disregard. Mine user in the error path is 0 :-( '//data/system_de/0/'
just use option format data when entering wipe selection
erosman23 said:
just use option format data when entering wipe selection
Click to expand...
Click to collapse
doesnt work
redmi k20 davinci
Hello,
I have Huawei Mediapad T5 tablet AGS2-W09 with Lineage 16.0 installed. I wanted to do backup in TWRP but I’m getting the error : createTarFork() process ended with ERROR : 255
I browsed to the backup location and found in the recovery.log that the problem is with the file :
/data/misc/bluedroid/pwxCDGSOXfhjCjV95kpJ7B
When I browse to /data/misc/bluedroid/ folder with Root Explorer, I see 3 files in it: bt_config.bak , bt_config.conf , macbt
When I browse to /data/misc/bluedroid/ folder with TWRP file explorer, I see again 3 files but names are completely changed, files are : pwxCDGSOXfhjCjV95kpJ7B , Fxe1ZW1HOXwv5qJD9v2MGD , yoVsIPDhhbKzaMIWc7rggD
I tried to delete this file through adb, but I get a message : permission denied. I tried to delete the file with TWRP file manager, but it didn’t work (there is no error message while deleting but the file is still there). Now after trying to delete this file, another problem appeared: when I’m in TWRP and want to do backup, the size of my data partition is now shown as 6969766643856MB !!!. Obviously it doesn’t let me do the backup because there is no enough space on my storage.
Is it safe to remove these 3 files by Root Explorer ?
Or at least the file “macbt” (same as pwxCDGSOXfhjCjV95kpJ7B) which is causing the problem ?
Is it safe to remove complete bluedroid folder ?
Any idea how to solve this without formatting the tablet ?
Look inside here:
createTarFork() process ended with ERROR=255
OOS 5 Oreo, non rooted, stock kernel, TWRP 3.2.1 blue_spark 8.61 every time i try to make a nandroid backup i get this error: createTarFork() process ended with ERROR=255 and backup fails any ideas?
forum.xda-developers.com
jwoegerbauer said:
Look inside here:
createTarFork() process ended with ERROR=255
OOS 5 Oreo, non rooted, stock kernel, TWRP 3.2.1 blue_spark 8.61 every time i try to make a nandroid backup i get this error: createTarFork() process ended with ERROR=255 and backup fails any ideas?
forum.xda-developers.com
Click to expand...
Click to collapse
Yes, I saw this before. It is a problem related to multiple users, I do not have them.
I checked many threads and I couldn’t find similar one. My problem is related to files in the folders /data/misc/bluedroid/ which are maybe corrupted.
Can I just delete this folder ? Or the files which are inside? What does bluedroid folder and files inside do ?
having the exactly same problem as you, could not backup data in twrp because it errors out
I:Error adding file '/data/misc/bluedroid/8h7VnJk1nlucU5cHQERctB' to '/external_sd/TWRP/BACKUPS/8UE5T18301007382/2021-10-03--10-27-53/data.f2fs.win000'
Did you find a solution. I've the same problem on the same device.