Fix error 255 on TWRP backup/restore

Ho annoyed are you with Oneplus Oreo Update

  • Very annoyed

    Votes: 6 31.6%
  • SUPER annoyed

    Votes: 13 68.4%

  • Total voters
    19

krumbman0wnz

Senior Member
Nov 15, 2007
71
8
0
Im using the newest blu_spark TWRP with my OP5 OEM unlocked rooted with magisk running the 5.01 OOS.
BACKUP
Before running a backup do the following in TWRP/Advanced/Terminal

(enter exactly into terminal, if 999 'doesn't exist' move on to the next)
cd /data/system/
rm -r 999
cd data/system_ce/
rm -r 999
cd data/system_de/
rm -r 999
cd data/misc/
rm -r 999
cd data/misc_ce/
rm -r 999
cd data/misc_de/
rm -r 999
cd data/user/
rm -r 999
cd data/user_ce/
rm -r 999
cd data/user_de/
rm -r 999

You will successfully be able to backup!!

RESTORE:
@simo6 Gave me the solution. You need to go into the TWRP terminal before doing a restore and delete:

(enter exactly into terminal, if 999 'doesn't exist' move on to the next)
cd /data/system/
rm -r 999
cd data/system_ce/
rm -r 999
cd data/system_de/
rm -r 999
cd data/misc/
rm -r 999
cd data/misc_ce/
rm -r 999
cd data/misc_de/
rm -r 999
cd data/user/
rm -r 999
cd data/user_ce/
rm -r 999
cd data/user_de/
rm -r 999

then restore your backup!
 
Last edited:

simo6

Senior Member
Aug 12, 2009
222
49
58
arezzo
www.facebook.com
Im using the newest blu_spark with my phone OEM unlocked rooted with magisk running the 5.01 OOS.
Click backup have 'createTarFork() process ended with ERROR=255'. copied log and found :

data/system/999
data/system_ce/999
data/misc/999
data/misc_ce/999
data/user/999
data/user_ce/999

Were unable to be backed up. so after deleting these folders through TWRP terminal i can backup without error.
However i cannot restore, as i keep getting the 'extractTarFork() process ended with ERROR=255' error on restoring. why cant our recovery just work? Ever since oreo launched on OP its been nothing but headaches. Every update triggers my encryption and forces me to totally wipe the phone and start from fresh install. (no matter how many of these xda update guides i follow). Ive been rooting and "modding" phones since the G1 and ive never had so many issues.
Even before restoring u need to delete those folders. Worked for me.
 
  • Like
Reactions: krumbman0wnz

krugm0f0

Senior Member
Feb 17, 2010
562
91
58
36
Im using the newest blu_spark TWRP with my OP5 OEM unlocked rooted with magisk running the 5.01 OOS.
BACKUP
Before running a backup do the following in TWRP/Advanced/Terminal

(enter exactly into terminal, if 999 'doesn't exist' move on to the next)
cd /data/system/
rm -r 999
cd data/system_ce/
rm -r 999
cd data/system_de/
rm -r 999
cd data/misc/
rm -r 999
cd data/misc_ce/
rm -r 999
cd data/misc_de/
rm -r 999
cd data/user/
rm -r 999
cd data/user_ce/
rm -r 999
cd data/user_de/
rm -r 999

You will successfully be able to backup!!
I'm using latest by_ibe twrp and it's not working. No 999 folders found. Backup fails at system partition with error 255.

Will try bluspark twrp.
 
  • Like
Reactions: Mibuix0r

Sc4r3Crow

Senior Member
May 18, 2017
1,018
189
63
Hey guys,

after some struggle I was able to restore my backup. When I selected reboot system, my phone was stuck on the oneplus scree...so I powered it off, started recovery and dirty flashed rom to be able to boot. It booted normaly with restored settings, layout and stuff. But then I recognized that some data was missing. I have 2 apps with important (personally important for me) statistical data, but the data is lost.
Is there a possibility to restore this data somehow?
When I've created the mentioned backup, I've checked every point, so everything should have been stored.

Thanks in advance.
 

pmbonea

Senior Member
Mar 30, 2011
80
30
0
dar es salaam
Sorry but the only permanent solution for these errors while backup or restore is to factory reset your device and never touch the parallel app in setting....so far that's what solve my problem and now i can make backup and restore without any problem!
 

larpoux

Senior Member
Mar 17, 2014
125
50
0
Paris
I could resolve my nandroid /data backup error on my EMUI 8.0 Mediapad M5 device with those following steps:

1 - Use a correct TWRP implementation
TWRP need to access the uncyphered partition /data.
There no possibility to backup it, if TWRP does not implement deciphering user data partition.

2 - Remove all users except user 0 (the administrator)
You can verify that there is no unwanted users, looking at directory /data/user : the only subdirectory should be "0".
To remove the others users :
  • Remove the PrivateSpace if you have one (Settings > Security & Privacy > PrivateSpace, and tap on the garbage can).
  • Remove all the secondary users (Settings > Users & accounts > users, and tap on each users to delete them). Keep just the main administrator user.
  • On EMUI, remove all twins applications (Settings > Apps & Notifications > App Twin, and disable all twin apps).
  • On OxygenOS, remove all parallel apps (Settings > Apps > Parallel Apps, and disable all parallel apps).
  • On MIUI, remove all dual apps (Settings > Dual Apps, and disable all dual apps)
  • On others devices ... you must find all parameters that create those unwanted users.
  • If you are not able to get the correct settings to suppress those users, in last resort you can try this command : "pm remove-user user-no. (For example "pm remove-user 999").

3 - Do not forget to protect your backups by a password
This would be stupid to cipher your /data partition and keep backups of this partition unprotected.

These steps fixed the nandroid backup problem for /data partition on my Huawei Mediapad M5 device.
I post on this forum because I hope that this will be helpful for others devices owners.
 
  • Like
Reactions: igorkst

exgtigsr

Senior Member
Aug 13, 2010
77
5
38
hi guys,
i've read all the thread in XDA related to ERROR 255, can't find anything to solve my problem trying to backup on TWRP ending with this error 255.?

I'm not using any parallel apps, not using Apps Locker, don't have any folder 999 (searched using Root Browser).
I've tried deleting all fingerprint, face unlock and screenlock as well.
No joy.

I'm using latest TWRP 3.2.2-1, OOS 5.1.7, Rooted.

Appreciate any help or sharing experience.
 

murcianista

Member
Nov 13, 2013
42
7
0
hello i have the Oneplus6T with OxygenOs and i having the same problem, i cant do a nandroido backup from twrp having the same problem 255, i have deleted the parallel app and the account but there is no luck at the moment.
any other advice ?
 

akeshma

Senior Member
May 12, 2016
72
13
0
QATIF
Im using the newest blu_spark TWRP with my OP5 OEM unlocked rooted with magisk running the 5.01 OOS.
BACKUP
Before running a backup do the following in TWRP/Advanced/Terminal

(enter exactly into terminal, if 999 'doesn't exist' move on to the next)
cd /data/system/
rm -r 999
cd data/system_ce/
rm -r 999
cd data/system_de/
rm -r 999
cd data/misc/
rm -r 999
cd data/misc_ce/
rm -r 999
cd data/misc_de/
rm -r 999
cd data/user/
rm -r 999
cd data/user_ce/
rm -r 999
cd data/user_de/
rm -r 999

You will successfully be able to backup!!

RESTORE:
@simo6 Gave me the solution. You need to go into the TWRP terminal before doing a restore and delete:

(enter exactly into terminal, if 999 'doesn't exist' move on to the next)
cd /data/system/
rm -r 999
cd data/system_ce/
rm -r 999
cd data/system_de/
rm -r 999
cd data/misc/
rm -r 999
cd data/misc_ce/
rm -r 999
cd data/misc_de/
rm -r 999
cd data/user/
rm -r 999
cd data/user_ce/
rm -r 999
cd data/user_de/
rm -r 999

then restore your backup!
did not work with op5t oos 9!!
 

hachamacha

Senior Member
Jun 15, 2010
1,333
739
133
I just ran into this too. I'm looking here after the fact and the way I fixed it and don't see what I did so this is it:

- for me, it was the presence of multi-user directories in numerous places. I don't use multi-users on pie so not sure why they're there, but it hurts nothing to delete them.
- if I only deleted 999, that'd not have worked for me
- First: I read the recovery.log file after rebooting after the failed backup. It's a big file, so I transferred it to a laptop and used notepad+ --
- Look in there for the error (tarfork) and then look for the file/directory that began the chain of errors. Mine happened to be /data/vendor_ce/10
- Go to your /data/ folder in root explorer (or equiv):
- Do an ls */10 to find out all the places the 10 user occurs or you'll then get the error on the next 10 file. For me it was 5 other dirs.
- All you should have for user number directories in those places is 0 (unless you use multiple users and then I don't know).
- delete each one. I did it all from adb on a booted op5. so like this: "rm -r /data/{folder}/xx" where {folder} is where you found the 10 11 whatever, and xx is user-numbers other than 0
- when you've got them all gone, reboot directly into recovery so you have no chance of the system recreating them (so for me: adb reboot recovery)
- Backup. Mine worked no errors and was actually faster too because the errors take time to timeout.
- reboot system

Careful when using 'rm -r' that you only delete what you want to or you can mess up your phone. - cheers.

Edit: Twrp Version: Probably should mention SW versions: Twrp, latest 991 blu_spark twrp, OS: 9.0.3 Pie, Other: xXx noLimits Rom/Module
-
 
Last edited:

whatnoww

Member
May 12, 2013
31
3
8
How to fix error 255 twrp oneplus 5

I just ran into this too. I'm looking here after the fact and the way I fixed it and don't see what I did so this is it:

- for me, it was the presence of multi-user directories in numerous places. I don't use multi-users on pie so not sure why they're there, but it hurts nothing to delete them.
- if I only deleted 999, that'd not have worked for me
- First: I read the recovery.log file after rebooting after the failed backup. It's a big file, so I transferred it to a laptop and used notepad+ --
- Look in there for the error (tarfork) and then look for the file/directory that began the chain of errors. Mine happened to be /data/vendor_ce/10
- Go to your /data/ folder in root explorer (or equiv):
- Do an ls */10 to find out all the places the 10 user occurs or you'll then get the error on the next 10 file. For me it was 5 other dirs.
- All you should have for user number directories in those places is 0 (unless you use multiple users and then I don't know).
- delete each one. I did it all from adb on a booted op5. so like this: "rm -r /data/{folder}/xx" where {folder} is where you found the 10 11 whatever, and xx is user-numbers other than 0
- when you've got them all gone, reboot directly into recovery so you have no chance of the system recreating them (so for me: adb reboot recovery)
- Backup. Mine worked no errors and was actually faster too because the errors take time to timeout.
- reboot system

Careful when using 'rm -r' that you only delete what you want to or you can mess up your phone. - cheers.

Edit: Twrp Version: Probably should mention SW versions: Twrp, latest 991 blu_spark twrp, OS: 9.0.3 Pie, Other: xXx noLimits Rom/Module
-
Please pin this as the answer. This is the right answer.
 
  • Like
Reactions: PattayaGlock

gesaugen

Senior Member
Oct 5, 2009
85
5
0
ERROR 255 FACT AND FIX:
The error 255 is caused due insufficient space on the phone
I've discovered that while trying to restore backup on my S6. System part was around 3gb, data aroud 9gb, efs and modem few hundred mb. While trying to restore every thing at once, i would get error 255 (While data was recovering). So while phone being in TWRP, I've deleted everything from backup and phone that i can copy afterwards, except data part of backup and tried to restore only data and it worked! After data restore, i haven't rebooted but have deleted data backup and copied system, efs and modem part of backup from my pc to phone and restored them and everything went fine
Then I've rebooted and phone works like charm!

So, to fix error 255 you have to free space, especially if your backup files are huge