• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

255 error with TWRP backup/restore (999)

Search This thread

4ndr0x

Senior Member
May 27, 2012
148
50
Berlin
Ok here is how I (probably) fixed it:

I was using Island, which activated the work profile and added a user with ID 11.

I edited the backup via 7-Zip:

In data.f2fs.win000 there were "11" files and folders in \data\misc\user\ and \data\vendor_de\
In data.f2fs.win012 I found these files in data\misc_de\

I deleted them, copied both tar files back to my phone and restored the backup. Phone booted, seems to work.
 
Last edited:
  • Like
Reactions: henningsieh

Cicilloni

Member
Aug 7, 2009
9
1
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.

Hi, have you tested to restore the backup? My issue is always on restoring.
Thanks
 

MrSlatts12

Member
Apr 18, 2021
34
7
Samsung Galaxy A51
I have a rooted Samsung A51 followed instructions, was granted Super User in the terminal emulator, typed pm remove-user 999 and got back "Error: couldn't remove user id 999" Why and where do I go from here - Any advice?
 

Alpha_Geek1

Member
Apr 6, 2020
28
1
OnePlus 7 Pro
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.
Exactly. Did this, copied the backup to the device after booting into TWRP, tried to restore, get error 255 on the /data. What gives? Isn't TWRP making (at least conceptually) a bit-for-bit image of the entire storage device? Why can't I ever seem to restore a TWRP backup? Like another poster said, what is the point of making a backup if you can't restore it?
 

tiga016

Senior Member
May 20, 2015
240
42
Exactly. Did this, copied the backup to the device after booting into TWRP, tried to restore, get error 255 on the /data. What gives? Isn't TWRP making (at least conceptually) a bit-for-bit image of the entire storage device? Why can't I ever seem to restore a TWRP backup? Like another poster said, what is the point of making a backup if you can't restore it?
From what I know you need your device to be decrypted before restoring from custom recovery.
 

Alpha_Geek1

Member
Apr 6, 2020
28
1
OnePlus 7 Pro
From what I know you need your device to be decrypted before restoring from custom recovery.
That makes absolutely no sense unless I am not understanding something very fundamental. I have a 'daily driver' OnePlus 7 Pro which is not encrypted. I made a full TWRP backup. I bought a second OnePlus 7 Pro as a sandbox device because I can NEVER get things to work the way I expect them to (mostly because I cannot get the information I need to really understand what is actually going on (https://forum.xda-developers.com/t/questions-on-using-twrp-and-a-b-slot-switching.4286595/).

I copied the not encrypted TWRP backup to my 'sandbox' device and hit restore. Everything failed. I am *not* trying to read anything. I am trying to *write* an image of the storage system (I *think* that's what this is, and if it's not.. WHY ISN'T IT? and what is it then (https://forum.xda-developers.com/t/flashed-twrp-over-boot-slot-b.4032399/post-85333199) and why would it matter if the data that is on the storage system, which I am trying to overwrite, is encrypted or not? I don't understand why I would need to decrypt something I don't want to read?

FWIW, I unlocked the bootloader on the sandbox device, issued: fastboot boot twrp-3.5.2_9-0-guacamole.img. This did not work. I tried multiple times. The device simply would not boot the recovery image from fastboot. Eventually, I got it to run TWRP, but I do not know why it would or wouldn't. Everything I get or don't get to work is pure happenstance because I cannot find anyone who actually knows how it all works to explain it so I can understand it myself well enough to know exactly what to do at any given point and why. All my success is SWAG plus luck. I just keep trying different things with some delusional sense of personal logic until something works, and it really seems that is what everyone else essentially does too! I keep seeing these 'magic recipes' with specific steps that anecdotally worked for the poster, but the why is basically conjecture and supposition. I digress.
 

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.