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 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
dracoboss said:
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
Click to expand...
Click to collapse
Try to remove your security pin code first before install new firmware.
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..
dracoboss said:
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
Click to expand...
Click to collapse
Make sure you're doing "su" then enter first and its getting root permissions
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!
geenyous said:
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!
Click to expand...
Click to collapse
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
ysco said:
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..
Click to expand...
Click to collapse
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.
dracoboss said:
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
Click to expand...
Click to collapse
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
dgunn said:
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.
Click to expand...
Click to collapse
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..
dgunn said:
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
Click to expand...
Click to collapse
Oh sorry lol. Turns out I just had to use official twrp to flash the full zip instead of the unofficial one I was using. After that it was smooth sailing
ysco said:
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..
Click to expand...
Click to collapse
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.
Flying Fox said:
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.
Click to expand...
Click to collapse
Thanks for pointing out the steps for a successful backup.
Regards ysco..
ysco said:
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..
Click to expand...
Click to collapse
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
dgunn said:
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
Click to expand...
Click to collapse
Ahh good to know mate
Thanks.
Regards ysco..
dgunn said:
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
Click to expand...
Click to collapse
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.
dgunn said:
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.
Click to expand...
Click to collapse
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.
angadsingh said:
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.
Click to expand...
Click to collapse
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
Hello. Can you tell me how to properly restore a backup on TWRP? Do I have to change slots oraz something?
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
Related
Hi, I'm restoring from a nandroid backup but once it starts restoring data it fails with error 255. I have no 999 files, and ran the steps here: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632 to remove 999 folders (it didn't work but I looked in those folders and saw no 999 folders) and have NEVER used Paralell Apps.
Is the backup salvageable?
NateDev said:
Hi, I'm restoring from a nandroid backup but once it starts restoring data it fails with error 255. I have no 999 files, and ran the steps here: https://forum.xda-developers.com/oneplus-6/how-to/255-error-twrp-backup-restore-999-t3801632 to remove 999 folders (it didn't work but I looked in those folders and saw no 999 folders) and have NEVER used Paralell Apps.
Is the backup salvageable?
Click to expand...
Click to collapse
Can you still boot into your OS?
mikex8593 said:
Can you still boot into your OS?
Click to expand...
Click to collapse
No, because I was on the P beta, but wiped everything including system. I tested a restore with everything else except data and it worked, just data failes, and recovery.log says "==> extracting: //data/reserve-lib/com.oneplus.soundrecorder/ (mode 40755, directory)
tar_extract_file(): failed to extract //data/reserve-lib/com.oneplus.soundrecorder/ !!!" so I'm assuming that's the issue, but I don't think there's any way to edit nandroid backup files like a filesystem, is there?
Edit: So I made the data backup into a .tar file and I can see the offending folder, but can't delete it from within WinRar, but I can make it a folder and delete it. Once I have that, how do I make it back into a .win000 file?
NateDev said:
No, because I was on the P beta, but wiped everything including system. I tested a restore with everything else except data and it worked, just data failes, and recovery.log says "==> extracting: //data/reserve-lib/com.oneplus.soundrecorder/ (mode 40755, directory)
tar_extract_file(): failed to extract //data/reserve-lib/com.oneplus.soundrecorder/ !!!" so I'm assuming that's the issue, but I don't think there's any way to edit nandroid backup files like a filesystem, is there?
Edit: So I made the data backup into a .tar file and I can see the offending folder, but can't delete it from within WinRar, but I can make it a folder and delete it. Once I have that, how do I make it back into a .win000 file?
Click to expand...
Click to collapse
I think you may be able to just rename .tar to .win000, try it and see.
JazzieBoi said:
I think you may be able to just rename .tar to .win000, try it and see.
Click to expand...
Click to collapse
Yea I editited it saying I did that, but can't figure out how to make it back into .win000. I guess I will just transfer it onto the phone, backup that and then restore (as just transfering will probably mess something up)
i'm having hte same problem , i never used parallel apps and i'm getting the same error on a restore for no freaking reason!
I need to restore so badly, i can get into OS just fine now but i didn't backup my apps prior to doing the wipe after the backup.. any ideas please?
NateDev said:
Yea I editited it saying I did that, but can't figure out how to make it back into .win000. I guess I will just transfer it onto the phone, backup that and then restore (as just transfering will probably mess something up)
Click to expand...
Click to collapse
Did you get this working? I'm not very good with TWRP yet so I don't know all the lingo, but I too made a backup and receive the error 255 when trying to restore using TWRP. When I restored the backup and unchecked data like you mentioned, it finishes without error but get this error "Your device is corrupt. It can’t be trusted and may not work properly" when I try to boot it. Restoring the backup without the data box checked still doesn't restore everything obviously. I'd like to restore the data too. Did you get it all working to where you can restore all?
R0ttenB4ndit said:
Did you get this working? I'm not very good with TWRP yet so I don't know all the lingo, but I too made a backup and receive the error 255 when trying to restore using TWRP. When I restored the backup and unchecked data like you mentioned, it finishes without error but get this error "Your device is corrupt. It can’t be trusted and may not work properly" when I try to boot it. Restoring the backup without the data box checked still doesn't restore everything obviously. I'd like to restore the data too. Did you get it all working to where you can restore all?
Click to expand...
Click to collapse
So I edited the backup and removed the offending files and then put the file back into the backup but that didn't work because I guess it broke the signature or something but it wouldn't restore data at all once I edited it. Idk.
I just don't bother with backups anymore, too much of a hassle haha, and it makes no sense why it fails, since I have no parallel apps or anything
Thanks very much for the response and info! No backup at all? Bummer. I've tried to backup several times using twrp and keep asking around. In the root directions it's said how to backup and restore. Surely it's been done in this os since instructions are there.
The second time I tried, I was able to backup and restore all partitions "successfully" using the newest bluespark twrp version from a couple days ago... But I get this boot issue saying the device can't be trusted and doesn't boot.
Does anyone know if this is possible? I've had my phone for a couple weeks and want to root but don't really want to reinstall and setup everything again. If not, can someone point me to a reliable non-root full backup option?
TIA!
no. oem unlock is needed first and that pre-step is the bad boy that does the wipe.
d3athsd00r said:
Does anyone know if this is possible? I've had my phone for a couple weeks and want to root but don't really want to reinstall and setup everything again. If not, can someone point me to a reliable non-root full backup option?
TIA!
Click to expand...
Click to collapse
You should probably Google "TIA." Hehe.
d3athsd00r said:
Does anyone know if this is possible? I've had my phone for a couple weeks and want to root but don't really want to reinstall and setup everything again. If not, can someone point me to a reliable non-root full backup option?
TIA!
Click to expand...
Click to collapse
Google is your backup option. It can restore settings, apps and data. Just restore from cloud. You need root to have a perfect backup.
mikex8593 said:
Google is your backup option. It can restore settings, apps and data. Just restore from cloud. You need root to have a perfect backup.
Click to expand...
Click to collapse
You don't need to root you just need to have twrp installed.
se7ensde said:
You don't need to root you just need to have twrp installed.
Click to expand...
Click to collapse
Well, to backup apps and data in the OS, like OP wants before unlocking bootloader.
I did this with titanium backup on my previous phone to go from non-root to root and worked like a charm.
I can't post a link to the url...anywhay search for titanium backup non-root and you will see how to make a backup that can later be restored with titanium.
1. How to make your first backup WITHOUT root:
Before beginning, you need to setup your ADB and have your device detected. You must also running Android version 4.0 and above. Also, make sure you have a file manager installed. Our favorite is the ES File Explorer.
Connect your device and make sure its listed with the following command:
adb devices
Run a FULL backup with the following command:
adb backup -f FullBackup.ab -apk -all
This will create a “package” called “FullBackup.ab” on the current location in your command prompt. This is your backup package.
Now you can root your phone.
Once finished rooting, insert the “FullBackup.ab” package on your sdcard
Hit the menu button and look for “Extract from ADB backup” option. This will prompt you to search for the file. Use the file manager that you installed earlier and navigate to the directory and select the FullBackup.ab file.
Now restore like as if the backup was made with Titanium Backup. Don’t forget to make a fresh copy of the backup using Titanium Backup. You’re Done!
Click to expand...
Click to collapse
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Thank you for making the time writing this, it is relief to hear that you figure this out. Will try this first in the morning.
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
This guide can also be used to restore from other roms;
b217260 said:
I did a bad mistake running the flash-all.bat thinking it will only flash the partitions of the system.
Well it is all gone now...Dam if only I wait until the morning I might not made this mistake.
Click to expand...
Click to collapse
What did you do?
---------- Post added at 02:14 PM ---------- Previous post was at 02:13 PM ----------
petran07 said:
This guide can also be used to restore from other roms;
Click to expand...
Click to collapse
I guess so. I never had to use a backup to restore on a custom ROM yet.
tabletalker7 said:
What did you do?
Click to expand...
Click to collapse
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
b217260 said:
After extracting the stock zip flasher, there is file "flash-all.bat" on the root of the folder. (Guess I needed to use the "flash-all-partitions-fastboot.bat)
Thinking it will only flash the android system partitions I've run it and realize that my internal stoarge was formatted.
Really stupid mistake from my part, sorry for couldn't verify your guide.
Hoping that someone who read this in the future won't do my mistake.
Click to expand...
Click to collapse
It's my bad. I always store my backups on an SD card with my OTG card reader. I forget others don't think like I do sometimes
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
b217260 said:
So I have the OP6 for a while now. Everytime a new version released I download the new official zip file and then flash it with twrp. (follow this post - https://forum.xda-developers.com/showpost.php?p=76596833&postcount=3)
So I did it for 9.0.4, I first took nandroid backup, flash the new firmware, flash twrp, reboot to recovery, flash magisk. And then when I tried to reboot the system I got a message "Shutting down..." when the android system tried to load so I was stuck at bootlooping.
I thought that maybe something in the installation went wrong, so I might just get it restored. I did the restore using the latest twrp (v9.91) and now the system is completly corrupt, the phone no longer able to load anyhing (no oneplus loading screen with the rolling dot) and I when it boot to twrp it no longer can decrypt the filesystem (doesn't ask for my password).
I don't know I could I meesed this up, I did the same step every new upgrade. Apperiate any insight to my situasion.
What do you think caused this? Can I decrypt the files on my phone somehow and restore them?
Thank you in advanced.
Click to expand...
Click to collapse
Had faced this many times. ...after trying diff options and failed Qualcome MSM method works perfectly.
Yep, You cant restore data i think as it being already formated as per knowd based on your steps above on diff posts
ahacker said:
tabletalker7, can you please explain a little technical detail? If i follow your procedure, what is the difference from me just restoring boot, system and data from a Nandroid backup of a system that used to boot? What causes the restored system to no longer boot?
Because you seem to be suggesting a solution for the the problem I had. I normally do plenty of backups and play around with the system quite a lot, but Op6 burned me: I was unable to restore from a backup like I always did on other phones. I tried suggestions from other posters to no avail. So I set up a clean system from a fastboot rom and reinstalled everything from Titanium. I wonder, after I set pretty much identically, should I just risk and to once more try to restore from that Nandroid that was failing to restore (that only had system and data btw)? I'd greatly appreciate if you can enlighten.
Click to expand...
Click to collapse
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
tabletalker7 said:
1. Changing Android security updates makes changes to phone encryption. It will make the data itself on the backup unreadable to the operating system. That is why people playing with many different custom ROMs had problems with data stored on their phones.
2. By using the fastboot rom you ensure that both partitions have the same operating system. A/B partitioning seems like a great idea on paper but it seems to be executed in the most horrible way possible.
Click to expand...
Click to collapse
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
ahacker said:
Thanks a lot. It is plausible and I remeber seeing folder names to which random hex strings were appended (I did not see file contents though). But after last restores I verified that the folder names in /data/data folder were looking allright. Twrp apparently could decrypt the data partition, but the system would still not boot. If I were to encypr the data partition I'd use the whole partition as one encrypted block and not bother doing it on file or folder basis, which is more error-prone. Another sourse of doubt is that I never played with OS version upgrades nor with installing other roms.
Can you also please answer the following? Do you think I can try to restore my boot+system to a different slot and then come back to my original slot if my playing there is unsuccesfull? Being scared that restoring a previous state can fail is a major problem.
Click to expand...
Click to collapse
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
tabletalker7 said:
I would not recommend doing that. While you may have different roms on different partitions you only have one data partition. That is asking for trouble
Click to expand...
Click to collapse
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
ahacker said:
I would have data backed up, sure.
What bothers me is that an essential property of a digital automaton is that if you start it from the same state it will continue the same. Nandroid used to capture all that mattered for identical runs. It no longer does, something is missing, such as some encryption keys for data partition, as you seem to suggest. This bothers me.
Click to expand...
Click to collapse
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
tabletalker7 said:
What bothers you here are things I call "security". If the nandroid backup has the encryption keys to decrypt it, then the data is not secure.
Click to expand...
Click to collapse
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
ahacker said:
Nandroid backups should be encrypted when created with a user supplied key. Twrp allowed this since ages ago. Not allowing the user to restore a backup is not a right substitution for this.
Click to expand...
Click to collapse
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
tabletalker7 said:
TWRP didn't do this. Android didn't do this. Ya know, if this is anywhere near as horrible for you as you are making it sound, my advise for you would be to buy Apple products. Bottom line is a new feature was added to Android, and your backup does work.
Click to expand...
Click to collapse
-It is as horrible as not being able to restore a full backup. No more, no less.
-Twrp has an ability to encrypt your backups, with your experience you must know this.
-You are suggesting someone to switch to iphone only because they point out that the things are wrong or dont add up.
-It is quite a common knowlege that you get good security out of encryption if you make things explicit and clear. And not how you may think it is. Cause you don't seem to know where the keys are stored for the data partition. Obviousely, because the phone eventually decrypts your data, the keys must be stored somewhere or derived from you swipe pattern.
tabletalker7 said:
Ok this is a giant pain in the backside but I have done this before and I know it works. Here is a step by step guide to restore.
1. https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665 go here and download the fastboot rom for the rom YOU HAD ON THE PHONE WHEN YOU MADE THE NANDROID BACKUP. Step by step on how to install it is there.
2. Install the rom and boot up the phone. Don't bother signing in to google or downloading apps or any of that. Just get through all the menus.
3. Install TWRP. Bluspark TWRP is recommended.
4. Install Magisk, but make sure IT IS THE SAME VERSION OF MAGISK AS WAS INSTALLED IN THE NANDROID BACKUP
5. Reboot to system and make sure the phone still works, then reboot to TWRP
6. Restore Nandroid backup.
I know this is a giant hassle, but it works every time. I haven't found a better way to restore a backup since this whole A/B partitioning started.
Click to expand...
Click to collapse
Following these instructions seems to be the only way of restoring a nandroid backup (at least for my Op6 bought on AliExpress from China). Important: step 1 wipes your sdcard, so the backup you want to restore must be on otg usb stick.
After spending many hours I managed to restore a backup at least once. Fortunately for me I have no plans of upgarding Android and will likely forever stick with the following set:
1) 5.1.11-OREO-OnePlus6Oxygen_22_OTA_015_all_1808102118_770880-FASTBOOT.zip (found here)
2) twrp-3.2.3-x_blu_spark_v9.85_op6.img + twrp-3.2.3-x_blu_spark_v9.85_op6.zip (found here)
3) Magisk-v18.1.zip (found here)
My plan is to fully debloat the phone and then I will keep everything unchanged for years, because nowadays updates are more about twisting your arms than giving you usefull features. I almost got to that state, but one little glitch forced me to roll back and the whole hell with the Nandoid backups on Op6 started.
PS: It's very interesting what is really going on with this A/B system. There must be a storage where the encryption keys are stored (if it is the encryption that does prevent the phone from restoring. Which I doubt because Twrp sees the files fine). There also probbaly stored what slot is used. That information does not get captured by the Nandroid backup.
(Btw, It seems that blu_spark Twrp is really NOT encrypting your backups with the passwod you supply. Official Twrp does. I have plenty of old encypted backups, from wich I could not extract any personal data (/data/data folder) but yesterday I could extract my private information from a backup done by blu_spark Twrp. This is serious iussue. I'll double check and will post if confirmed.)
Not confirmed, I was looking at unencrypoted file.
Greetings,
I had lineageos 17 on my one+6 and after making a twrp backup and making sure i had all my files that i wanted i took the plunge and upgraded to lineage 18.
This would have been great except that I didnt actually have all the files I wanted. I critically forgot to make a manual separate backup of signal messenger. I need to get the history of signal messenger back. The only way i can think to do this, is to restore the twrp backup i made before upgrading and then making a backup with signal messenger app and then restoring the signal backup in lineage 18.
I attempted to restore my TWRP backup. When I made the TWRP backup I had checked ALL the boxes and saw no errors on the screen. When i attempted to restore i checked all the boxes on the screen and got what appears to be a fairly common error (255) when attempting to restore data (not sd/usb).
After, when i went to reboot twrp notified me that there was no OS installed. I rebooted anyway. I ended up stuck in a bootloader loop. I then downloaded
10.3.6-OnePlus6Oxygen_22.J.48_OTA_048_all_2010042239_c0c1fee2ee-FASTBOOT.zip
Click to expand...
Click to collapse
Then i unzipped that file and typed in the linux terminal:
fastboot -w update images.zip
Click to expand...
Click to collapse
I now have a working phone again.
I would like to know how do i restore the TWRP recovery image that I made at the beginning of the whole process. I'm pretty sure if I can do that I can then make a new Signal backup and be fine.
While doing lots of trouble shooting for the last 36 hours or so, it seems relevant to mention that my phone used to require I enter a PIN in order to use it, and I had to enter that same PIN in TWRP before I made the backup. The temporary OxygenOS I installed to just have a working phone number for work does not have a pin.
I have never had any success restoring TWRP backups so I eventually gave up relying on them after the 4th failed attempt.
But I distinctly remember reading this piece of advice:
0. Copy the TWRP backups onto a separate storage (I assume you have already done that)
1. Install the original ROM that is present in the backup; don't restore the System partition
2. Once installation has completed, restore only the Data partition and ignore all the rest such as cache, system, boot, etc.
3. Reboot
Personally, I have never tried it. But just from reading it, it seems like it may just work. Or it might not.
adeklipse said:
I have never had any success restoring TWRP backups so I eventually gave up relying on them after the 4th failed attempt.
But I distinctly remember reading this piece of advice:
0. Copy the TWRP backups onto a separate storage (I assume you have already done that)
1. Install the original ROM that is present in the backup; don't restore the System partition
2. Once installation has completed, restore only the Data partition and ignore all the rest such as cache, system, boot, etc.
3. Reboot
Personally, I have never tried it. But just from reading it, it seems like it may just work. Or it might not.
Click to expand...
Click to collapse
I appreciate the reply.
It's the data partition that's throwing this 255 error, which it seems to have something to do with it being encrypted i'd guess? In the future, is it possible to just dd the whole thing somehow?
karenmcd said:
I appreciate the reply.
It's the data partition that's throwing this 255 error, which it seems to have something to do with it being encrypted i'd guess? In the future, is it possible to just dd the whole thing somehow?
Click to expand...
Click to collapse
Have you tried wiping the /data partition from TWRP's Advance Wipe?
karenmcd said:
Greetings,
I had lineageos 17 on my one+6 and after making a twrp backup and making sure i had all my files that i wanted i took the plunge and upgraded to lineage 18.
This would have been great except that I didnt actually have all the files I wanted. I critically forgot to make a manual separate backup of signal messenger. I need to get the history of signal messenger back. The only way i can think to do this, is to restore the twrp backup i made before upgrading and then making a backup with signal messenger app and then restoring the signal backup in lineage 18.
I attempted to restore my TWRP backup. When I made the TWRP backup I had checked ALL the boxes and saw no errors on the screen. When i attempted to restore i checked all the boxes on the screen and got what appears to be a fairly common error (255) when attempting to restore data (not sd/usb).
After, when i went to reboot twrp notified me that there was no OS installed. I rebooted anyway. I ended up stuck in a bootloader loop. I then downloaded
Then i unzipped that file and typed in the linux terminal:
I now have a working phone again.
I would like to know how do i restore the TWRP recovery image that I made at the beginning of the whole process. I'm pretty sure if I can do that I can then make a new Signal backup and be fine.
While doing lots of trouble shooting for the last 36 hours or so, it seems relevant to mention that my phone used to require I enter a PIN in order to use it, and I had to enter that same PIN in TWRP before I made the backup. The temporary OxygenOS I installed to just have a working phone number for work does not have a pin.
Click to expand...
Click to collapse
For what I know you need your device to be decrypted to restore from custom recovery.
I've had some luck in similar situations using Titanium Backup to extract an app and data from TWRP backup.
Your mileage may vary.
I'm looking for an app that will allow me to back up the entire contents of my phone to one single .zip file which I could then flash back if needed. It would be best if there was an app that could transfer the backup to my computer where I would store the individual backups. I should add that I have root access, but even so, I haven't found any application that backs up the entire system to a single file. I don't have a custom recovery, only the stock one. Is there any app for that? Ideally for Windows, where I would connect the phone with a cable and perform the backup setup from there.
CaptainFedora said:
I'm looking for an app that will allow me to back up the entire contents of my phone to one single .zip file which I could then flash back if needed. It would be best if there was an app that could transfer the backup to my computer where I would store the individual backups. I should add that I have root access, but even so, I haven't found any application that backs up the entire system to a single file. I don't have a custom recovery, only the stock one. Is there any app for that? Ideally for Windows, where I would connect the phone with a cable and perform the backup setup from there.
Click to expand...
Click to collapse
What are "the entire contents of your phone"? All partitions + personal data, apps and so on?
Oh yes, exactly. For a case like system update potentially messing up the device - (oh, I just realized that if my device would softbricked i would need to restore that image or zip file through the recovery anyway), so i guess without a custom recovery this isn't doable right?
CaptainFedora said:
Oh yes, exactly. For a case like system update potentially messing up the device - (oh, I just realized that if my device would softbricked i would need to restore that image or zip file through the recovery anyway), so i guess without a custom recovery this isn't doable right?
Click to expand...
Click to collapse
As long as no custom ROM gets installed you only need a backup of your data. The remaining images are part of your firmware.
Without a custom recovery like TWRP you can backup your data only during the running system. Your stock recovery can't access /data as a filesystem, because it's not mounted. Also an entire image of that partition wouldn't be possible.
Now I learned something. Thank you. That'll do. Titanium Backup it is then.
CaptainFedora said:
Now I learned something. Thank you. That'll do. Titanium Backup it is then.
Click to expand...
Click to collapse
Titanium Backup is outdated, I suggest NeoBackup (open source) or Swift Backup (closed source, you can't decrypt the backup on your own).
Thanks again!
TheNewHEROBRINE said:
Swift Backup (closed source, you can't decrypt the backup on your own).
Click to expand...
Click to collapse
It doesn't make any sense to encrypt MY own data. Swift Backup gets access to the data by Magisk and that's me. I don't need an app that makes my own data inaccessible for me without any reason.
CaptainFedora said:
I'm looking for an app that will allow me to back up the entire contents of my phone to one single .zip file which I could then flash back if needed. It would be best if there was an app that could transfer the backup to my computer where I would store the individual backups. I should add that I have root access, but even so, I haven't found any application that backs up the entire system to a single file. I don't have a custom recovery, only the stock one. Is there any app for that? Ideally for Windows, where I would connect the phone with a cable and perform the backup setup from there.
Click to expand...
Click to collapse
You can look at this thread for variants of backup software options.
Alternative to Titanium Backup?
Hey everyone, I've been using Titanium backup for a few weeks now but one thing irks me about it.. even though it successfully backs up my apps and I assume my data - when it comes to restoring the backup, it always re-installs the apps in a...
forum.xda-developers.com
WoKoschekk said:
It doesn't make any sense to encrypt MY own data. Swift Backup gets access to the data by Magisk and that's me. I don't need an app that makes my own data inaccessible for me without any reason.
Click to expand...
Click to collapse
That's the reason why I gave NeoBackup as an alternative, although it doesn't have all the features of Swift Backup like restoring SSAIDs.
TheNewHEROBRINE said:
That's the reason why I gave NeoBackup as an alternative
Click to expand...
Click to collapse
That seems to be a good alternative for Titanium Backup.