255 error with TWRP backup/restore (999)

Search This thread

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.

Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.

If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.

/storage/emulated
/data/system/
data/system_ce/
data/system_de/
data/misc/
data/misc_ce/
data/misc_de/
data/user/
data/user_ce/
data/user_de/

If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.

Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.

Install Terminal Emulator from the play store
Open Terminal and type

su

Press enter and grant root permission
Next type

pm remove-user 999

Press enter
Close Terminal and reboot
Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.
 
Last edited:

dracoboss

Member
Jul 26, 2017
38
5
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?

I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"

Any help is appreciated. Thanks
 
  • Like
Reactions: cirrusiukas

[email protected]

Senior Member
Sep 27, 2014
203
22
Samsung Galaxy S21 Ultra
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?

I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"

Any help is appreciated. Thanks
Try to remove your security pin code first before install new firmware.
 

ysco

Senior Member
Oct 23, 2013
541
237
Thanks for sharing the info :good:

Stupid question about backup ,

I normally use root essentials to make a system backup but I think with op6 it will not backup al the required files anymore I think.

So I want to make the backup true twrp but can someone list the files to backup. As there are also vendor partition listed. So please let me know what to backup exactly to make the correct backup.


Thanks in advance.

Regards ysco..
 
  • Like
Reactions: MrSlatts12

DaveHTC200

Senior Member
Oct 2, 2008
1,635
423
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?

I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"

Any help is appreciated. Thanks
Make sure you're doing "su" then enter first and its getting root permissions
 
  • Like
Reactions: MrSlatts12

geenyous

Inactive Recognized Themer
Oct 20, 2007
1,785
853
Shanghai
I'm on official TWRP.
I have a backup of Renovate 2.0, which worked without any errors, but after I ran into issues with the 2.1 flash (bootloop) I wanted to restore my backup, which fails with the 255 error at the Data partition, the rest restores fine.

Now I was in TWRP terminal to do the above, but I couldn't find / delete any of the 999 folders. I also didn't have any other IDs on 2.0, nor did I have any security features active at the time of my backup.

What will this operation do for me with a complete but unrestorable backup anyway, surely it won't delete folders out of my backup?
What triggers the error, the destination (ROM) or the backup file?
Is there a way to get into my backup from TWRP terminal?

Any other ideas?
Thanks for any input!
 

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
I'm on official TWRP.
I have a backup of Renovate 2.0, which worked without any errors, but after I ran into issues with the 2.1 flash (bootloop) I wanted to restore my backup, which fails with the 255 error at the Data partition, the rest restores fine.

Now I was in TWRP terminal to do the above, but I couldn't find / delete any of the 999 folders. I also didn't have any other IDs on 2.0, nor did I have any security features active at the time of my backup.

What will this operation do for me with a complete but unrestorable backup anyway, surely it won't delete folders out of my backup?
What triggers the error, the destination (ROM) or the backup file?
Is there a way to get into my backup from TWRP terminal?

Any other ideas?
Thanks for any input!

The directions that are listed above are to be used inside terminal emulator once your phone is booted up and before you make the backup. I'm not sure if you can actually take files out of the backup especially from your device. That may be something you have to pull from the device and put onto your computer to accomplish
 
Last edited:

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
Thanks for sharing the info :good:

Stupid question about backup ,

I normally use root essentials to make a system backup but I think with op6 it will not backup al the required files anymore I think.

So I want to make the backup true twrp but can someone list the files to backup. As there are also vendor partition listed. So please let me know what to backup exactly to make the correct backup.


Thanks in advance.

Regards ysco..

If you want to make a full and complete backup of your entire system then you go into backup in TWRP and you check mark every box and then make your backup.
 

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?

I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"

Any help is appreciated. Thanks

Please if you could report back to us on this thread and let us know if the instructions you were given above help you or not
 

ysco

Senior Member
Oct 23, 2013
541
237
If you want to make a full and complete backup of your entire system then you go into backup in TWRP and you check mark every box and then make your backup.

Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.

Thanks.

Regards ysco..
 

Flying Fox

Senior Member
Dec 21, 2010
627
784
Vienna
OnePlus 9 Pro
Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.

Thanks.

Regards ysco..

boot, system image, vendor image, data.. and you are on the safe side.
Once I made a backup of boot, system, vendor, data (no images) I had to flash OOS afterwards. I don´t completely understand the difference between first and second way, finally both worked. But for sure it is not necessary to mark all partitions.
 

ysco

Senior Member
Oct 23, 2013
541
237
boot, system image, vendor image, data.. and you are on the safe side.
Once I made a backup of boot, system, vendor, data (no images) I had to flash OOS afterwards. I don´t completely understand the difference between first and second way, finally both worked. But for sure it is not necessary to mark all partitions.


Thanks for pointing out the steps for a successful backup.

Regards ysco..
 
  • Like
Reactions: Gborg3

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.

Thanks.

Regards ysco..

I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS
 
Last edited:
  • Like
Reactions: Gborg3

ysco

Senior Member
Oct 23, 2013
541
237
I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS

Ahh good to know mate ;):cowboy:

Thanks.

Regards ysco..
 
  • Like
Reactions: Gborg3 and dgunn

Flying Fox

Senior Member
Dec 21, 2010
627
784
Vienna
OnePlus 9 Pro
I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS
Actually you don't have to make a backup of system AND system image as well as you usually don't buy apples AND apples and pears. You just need the system image (and boot, vendor, data) to perform a complete and success backup.
 

angadsingh

Member
Mar 4, 2011
8
1
UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.

Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.

If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.

/storage/emulated
/data/system/
data/system_ce/
data/system_de/
data/misc/
data/misc_ce/
data/misc_de/
data/user/
data/user_ce/
data/user_de/

If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.

Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.

Install Terminal Emulator from the play store
Open Terminal and type

su

Press enter and grant root permission
Next type

pm remove-user 999

Press enter
Close Terminal and reboot
Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.

I don't have parallel apps or multi-user. What I have is a "work profile" (latest feature by gsuite which is mandated by my organization). Work profiles isolate work/company account data into a separate encrypted/remote wipable silo. Android creates copies of the apps for the work profile. This is causing a folder called "/data/system_ce/10" which is failing to backup. Any solution for TWRP to work with work profiles? Ideally, can I "ignore" folders to not be backed up so that TWRP nandroid backups can work.
 
  • Like
Reactions: keen36

dgunn

Senior Member
Apr 23, 2011
579
240
OnePlus 8 Pro
I don't have parallel apps or multi-user. What I have is a "work profile" (latest feature by gsuite which is mandated by my organization). Work profiles isolate work/company account data into a separate encrypted/remote wipable silo. Android creates copies of the apps for the work profile. This is causing a folder called "/data/system_ce/10" which is failing to backup. Any solution for TWRP to work with work profiles? Ideally, can I "ignore" folders to not be backed up so that TWRP nandroid backups can work.


You will have to remove those folders from the system before you can do a backup. Maybe cut and paste them onto an OTG drive, do the backup and then replace the folders. Twrp will not backup any multi-user accounts and that is exactly what gsuite has made.

See here for more info similar to your issue.

https://forum.xda-developers.com/pixel/development/twrp-alpha1-pixel-devices-t3500314/page56
 

PeterGuru

Senior Member
Mar 23, 2008
1,627
1,339
Mississauga, Ontario, Canada
Restore does not work ...

I'm having the same problem. I simply cannot restore a TWRP backup. It always produces an error 255.

No, I do not have any "999" folder/files, nor do I have any lockscreen security. I also do not have parallel apps or anything involving multi-user.

I'm extremely experienced at flashing ROMs, as well as performing Nandroids and restoring them.

Nothing I've done is working. As I said, I simply cannot restore the data partition. That's when I get the 255 error. System restores fine, but that's it.

Any ideas?

Thank you,
Peter
 

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.

    Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.

    If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.

    /storage/emulated
    /data/system/
    data/system_ce/
    data/system_de/
    data/misc/
    data/misc_ce/
    data/misc_de/
    data/user/
    data/user_ce/
    data/user_de/

    If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.

    Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.

    Install Terminal Emulator from the play store
    Open Terminal and type

    su

    Press enter and grant root permission
    Next type

    pm remove-user 999

    Press enter
    Close Terminal and reboot
    Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.
    4
    I see where you said you did not backup vendor images. I can't say for sure if that's the problem but when I make a backup include everything every box is checked. OnePlus 6 is a different beast and is not like any other phone that I've ever had or backed up or restored. I have even jumped over to the Google pixel forums and was reading numerous issues and not even they have answers to some of the questions that the OnePlus 6 is having. Given it is on the same partitioning and it should be very similar the phones act different and why I don't know. I can't tell you exactly what the problem is because my backup and restore work fine however I am still on 5.1.6. There is no need for me to jump to a new update this version is stable and working properly for me with no issues

    Okay, everything's up-and-running again. I'm too tired to try my idea in the 2nd up-date above. Perhaps I'll do it tomorrow.

    Peter

    Hi, i recieved my op6 few day ago, so i rooted and use custom ROM on all my devices for 5 years now.

    So, i decided to root my op6 with this tutorial :
    https://forums.oneplus.com/threads/...r-flash-twrp-root-nandroid-efs-backup.836005/

    So i've OOS 5.1.8 on my op6 when i root it, and i've the same problem with the wifi and call doesen't work anymore.
    I try factory reset and its not work too. So after that i try to wipe everything ( data, system, internal storage, cache) and flash the stock OOS 5.1.8.
    I use adb push to load the OOS 5.1.8 full zip in the internal storage, and when i want to flash the ROM i've the error 255 So i try to change the slot a/b but i've the same problem.

    So i don't know what can i do now, i don't do a nandroid backup, because i was thinking its better to do a backup when the rom is fully functional and i didn't except to have this problem.
    I see an official version of TWRP is appear, i don't know if i can flash it, or if i need to flash something else to have an OS on my op6.

    Thanks for your help.

    I'm surprised about the 255 error message, as I assume that you read # 1 and, if you've ever just clicked on "parallel apps" in settings, followed the instructions to get rid of the mentioned folders.

    For twrp-backup I can say the following:
    There is no need to backup system AND system-image. Myself, as I've already mentioned, make a backup of the following partitions:
    boot
    data
    system-image
    vendor-image

    Always successful. The image just in case, if I intend to wipe system or perform a factory reset before the next restore. If you dirty restore without wiping anything, a backup of system (ie without "image") is sufficient. Otherwise you would have to flash the OOS again, so my experience. I have been "corrected" in another thread in this regard. But for me, after wiping system a backup of only boot, system, vendor and data resulted in a bootloop. I had to reboot into twrp and to flash the OOS afterwards. This helped me out.

    However altogether a somewhat different starting situation, since I had no 255 error message that time.
    Anyway, as I said, a backup of system AND system-image makes no sense at all.

    PS: I had the 255 error message very well, after I wanted to look at the parallel apps. That was no longer reparable by starting from scratch. I had to use the "Fastboot-Rom" method.
    https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665

    Later I totally started from scratch by re-locking the bootloader and unlocking it again. By trying things out, I got some issues, “sitting” deep in the system, and there was no other way getting rid of them. Since then I never had problems anymore with backups, restoring nandroids, twrp etc..
    3
    UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.

    Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.

    If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.

    /storage/emulated
    /data/system/
    data/system_ce/
    data/system_de/
    data/misc/
    data/misc_ce/
    data/misc_de/
    data/user/
    data/user_ce/
    data/user_de/

    If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.

    Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.

    Install Terminal Emulator from the play store
    Open Terminal and type

    su

    Press enter and grant root permission
    Next type

    pm remove-user 999

    Press enter
    Close Terminal and reboot
    Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.

    just wanted to say thank you. it worked perfectly. if anyone is having the same problem, just follow the instructions and it should work.
    3
    I just want to share my experience and how I solved this message when backing up TWRP.
    First try to understand that what you need to backup is mentioned here to this you are using, the TWRP official website.
    https://twrp.me/faq/whattobackup.html


    It says clearly, devices Android 6 and up backup boot,data,system image, vendor image.
    devices lower than Android 6 boot,data, system, image.


    It's stupid to backup everything. You backup this or the other depending android version.


    I go on how I solved this 255 f***ing thing.
    Settings>System>Multiple users>Guest>(Switching to guest)>START>
    Now on the guest system > Settings>System>Multiple users>Remove guest>Yes Remove guest.


    Now go to Nandroid TWRP backup what I suggest above. It will finish ok.
    2
    I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?

    I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"

    Any help is appreciated. Thanks
    Try to remove your security pin code first before install new firmware.