BIG trouble when trying to un-root - OnePlus 3 Questions & Answers

I've just screwed up, big time. Was trying to un-root using the SuperSU app's "Full unroot" function, unaware that my device was encrypted.
Soo, now it won't boot. I can access both recovery and bootloader, but not the internal memory, which is the big problem here (pictures etc.).
When trying to boot I got the dm-verity error, and then the phone shuts off. In twrp I can't access the internal memory, so I can't backup my stuff.
I tried flashing stock boot, (does it have to be from the exakt OOS version as i have?), stock recovery and also re-flashing SuperSU, but nothing works. When flashing SuperSU i can boot my phone, but then I get the message "Can't encrypt your phone", and it tells me that I have to do a factory reset (which I don't want to atm)
Is there any hope of fixing this?
Thank you!

Try using adb to pull your files on your computer. Though since TWRP can't access internal storage, I doubt adb will.
You could also try to dirty flash the full ROM of whatever version of OOS you were using before (flash full rom in TWRP, wipe cache/dalvik, flash SuperSU or Magisk). This should restore most of your corrupted system and boot images. Since you tripped DM-verity, you will have to root again before rebooting. The no-verity/encript zip that's floating around the forums might also work? This shouldn't delete any of your user data, though I can't be certain if the dirty flashed ROM would be able to decrypt it.

Anova's Origin said:
Try using adb to pull your files on your computer. Though since TWRP can't access internal storage, I doubt adb will.
You could also try to dirty flash the full ROM of whatever version of OOS you were using before (flash full rom in TWRP, wipe cache/dalvik, flash SuperSU or Magisk). This should restore most of your corrupted system and boot images. Since you tripped DM-verity, you will have to root again before rebooting. The no-verity/encript zip that's floating around the forums might also work? This shouldn't delete any of your user data, though I can't be certain if the dirty flashed ROM would be able to decrypt it.
Click to expand...
Click to collapse
Try to dirty flash the rom you have now instaled. If you can't from TWRP, then try sideloading it. Good luck

Thank you for your tips, but didn't work
Tried wipe cache/dalvik -> sideload 4.0.2 -> sideload SuperSU -> fastboot twrp 3.0.3-0 (all of these I had before). And also only wipe cache/dalvik with a sideload of just the ROM, but I still get "Can not encrypt phone" when booting.
What does the SuperSU change in the system? And why does it not trigger dm-verity when flashing SuperSU, but when i remove it? I'm so confused. Is it even possible to get the phone in the same state as before uninstalling SuperSU, so it's bootable?

Systemless SuperSU modifies the /boot partition. Scripts have been added to the SuperSU installer to prevent dm-verity from detecting changes, which is why it doesn't get triggered when you root your phone after enabling system access in TWRP. Whenever you flash OOS (which has dm-verity enabled by default), you must root immediately before rebooting or it will replace TWRP with the stock recovery. Future attempts to enable TWRP without rooting will trigger dm-verity.
It's odd that you phone states that it cannot encrypt storage rather than decrypt it at boot. If you still have access to TWRP, try clean flashing OOS on your phone (use the wipe feature in TWRP). This will wipe /data and all your apps, but leave behind user files such as music and photos. Then flash OOS and immediately root before rebooting. Both SuperSU and Magisk will prevent OOS from attempting to encrypt /data on boot, which it does by default.
You didn't by any chance make a nandroid backup before unrooting did you?

Anova's Origin said:
Systemless SuperSU modifies the /boot partition. Scripts have been added to the SuperSU installer to prevent dm-verity from detecting changes, which is why it doesn't get triggered when you root your phone after enabling system access in TWRP. Whenever you flash OOS (which has dm-verity enabled by default), you must root immediately before rebooting or it will replace TWRP with the stock recovery. Future attempts to enable TWRP without rooting will trigger dm-verity.
It's odd that you phone states that it cannot encrypt storage rather than decrypt it at boot. If you still have access to TWRP, try clean flashing OOS on your phone (use the wipe feature in TWRP). This will wipe /data and all your apps, but leave behind user files such as music and photos. Then flash OOS and immediately root before rebooting. Both SuperSU and Magisk will prevent OOS from attempting to encrypt /data on boot, which it does by default.
You didn't by any chance make a nandroid backup before unrooting did you?
Click to expand...
Click to collapse
Sorry, I was wrong there, of course it's decrypt, NOT encrypt
I can flash twrp with fastboot and use it partially (says phone is encrypted, so limited options). I do not have access to /data or /system i belive, but I can sideload with the ADB function in TWRP. Tried to access files from twrp, but no go.
If dm-verity is not triggered when just flashing for example 4.0.2, why do I need to root it and install twrp? Is that so that I in some way could get it "un-triggered"?
Yep, I did a nandroid before, but was so stupid that I didn't backup to my computer. It's sitting inside the phone, encrypted

Dude I tried to unroot the N5X of my girlfriend the other day as snapchat didn't let us login with root. Phone was also decrypted, but after you boot it it will encrypt. If you stop the process (because you thought it was bootlooping, as those little motherf*****s don't tell when they are busy encrypting) and I am sure you did, the data is lost. That's exactly what happened to me. Don't try to encrypt or rescue anything. It wont work. Wipe the filesystem and start all over.
I am sorry though.
EDIT: I might be a little late, didn't check the date. But that encrypting stuff is serious, It should at least display a text with "ENCRYPTING..." or so. I let my phones encrypted since that day.

orreborre said:
I've just screwed up, big time. Was trying to un-root using the SuperSU app's "Full unroot" function, unaware that my device was encrypted.
Soo, now it won't boot. I can access both recovery and bootloader, but not the internal memory, which is the big problem here (pictures etc.).
When trying to boot I got the dm-verity error, and then the phone shuts off. In twrp I can't access the internal memory, so I can't backup my stuff.
I tried flashing stock boot, (does it have to be from the exakt OOS version as i have?), stock recovery and also re-flashing SuperSU, but nothing works. When flashing SuperSU i can boot my phone, but then I get the message "Can't encrypt your phone", and it tells me that I have to do a factory reset (which I don't want to atm)
Is there any hope of fixing this?
Thank you!
Click to expand...
Click to collapse
I don't understand why unrooting will have any problem with phone being encrypted.
I have done this unrooting process without a hiccup and my phone is also factory-encrypted so there's that.
What version of TWRP were you using? Try flashing the full OOS zip in TWRP but please flash the latest TWRP before doing so.

mharis05 said:
I don't understand why unrooting will have any problem with phone being encrypted.
I have done this unrooting process without a hiccup and my phone is also factory-encrypted so there's that.
What version of TWRP were you using? Try flashing the full OOS zip in TWRP but please flash the latest TWRP before doing so.
Click to expand...
Click to collapse
I believe what they meant was they were unaware their phone was decrypted. Unrooting will cause the phone to begin encrypting on boot, and I imagine OP cancelled it (as the phone does not say when it is encrypting)

orreborre said:
I've just screwed up, big time. Was trying to un-root using the SuperSU app's "Full unroot" function, unaware that my device was encrypted.
Soo, now it won't boot. I can access both recovery and bootloader, but not the internal memory, which is the big problem here (pictures etc.).
When trying to boot I got the dm-verity error, and then the phone shuts off. In twrp I can't access the internal memory, so I can't backup my stuff.
I tried flashing stock boot, (does it have to be from the exakt OOS version as i have?), stock recovery and also re-flashing SuperSU, but nothing works. When flashing SuperSU i can boot my phone, but then I get the message "Can't encrypt your phone", and it tells me that I have to do a factory reset (which I don't want to atm)
Is there any hope of fixing this?
Thank you!
Click to expand...
Click to collapse
I had a different issue but same like this....
i unrooted my phone and my device was decrypted.....
after reboot the phone encrypted automatically and all my datas were lost...
the dm-verity was are triggered....

Related

boot loop after installing twrp 2.8.7.2

so after i unlocked my bootloader, installed twrp 2.8.7.2, rebooted boot loader and went into recovery, i was greeted by twrp but it asked me for a decryption password (which i never set up) and Heisnberg said I wouldn't have worry about here under section 3 of how to decrypt the data partition "This is no longer necessary as long as you use TWRP 2.8.7.1 or newer". So I tried making a nandroid backup as normal, but that failed because twrp couldn't get to the data partition, unlike what Heisnberg said. So i just restarted the phone, and now I'm in a boot loop (about to flash factory image now).
So what I want to know is what twrp ppl use, do you have to do the decrypt data partition step, and the practical differences between systemless and nonsystemless root? why would anyone want to do systemless root if it doesn't work with all root apps?
Thank you so much for anyone who replies :angel:

Systemless root, custom boot.img, no longer applies?

Hi guys, the last time I rooted my 5X was a very long time ago when I did a "traditional" root by using a modified boot.img. I checked out Heisenberg's guide to rooting thread and I no longer see references to systemless root or modified boot.img files. Is the current rooting method no longer requiring these things? Is the only root now systemless? I would like to update to the most recent stock rom and then re-root. Thanks.
When you install SuperSU (through TWRP) it will detect your nexus 5x needs systemless root and on the fly it will patch your boot.img (and backup your original boot.img to /data).
It will also install /data/su.img which is a mountable image containing SuperSUs main files.
If you do a factory reset, it will wipe out /data (and thus su.img) so you'll lose root, but you will still have the patched boot.img (meaning dm-verity verifying of /system and /vendor is disabled, /data is not forceencrypt, and some se contexts were adjusted)
To reinstall root in the case of factory reset, just reinstall SuperSU-*.zip. It will complain that it can't restore your boot.img (because it was also wiped out by the factory reset) but by that time everything has been installed to get root back so it'll just work.
Also, one other thing, you need to actually install twrp.img into the recovery partition (fastboot flash recovery twrp.img) rather than just taking the shortcut of doing fastboot boot twrp.img or twrp won't be able to decrypt your /data partition.
Thanks @sfhub. So sounds like the answer is yes SuperSU will only install the systemless root if you're on the 5x.
Is there anything else I would need to do in order to finalize the "systemless" portion of the root?
I.e. delete the /data/SU.img or something?
also - is there a way to know if my root is "systemless" or not? does the systemless route not have a supersu application installed?
Since I have the traditional root, ie using an old modified boot.img, should I just wipe my device and flash the newest firmware from adb? I'd like to keep everything in tact a go stock rooted on newest software but I'm worried I will brick my phone going from the traditional root to systemless method. Thoughts?
SeriesOfTubes said:
Since I have the traditional root, ie using an old modified boot.img, should I just wipe my device and flash the newest firmware from adb? I'd like to keep everything in tact a go stock rooted on newest software but I'm worried I will brick my phone going from the traditional root to systemless method. Thoughts?
Click to expand...
Click to collapse
You probably have systemless root already. The modified boot image was required until CF make it so SuperSU patched the boot on install. Anyway, thats kind of irrelevant now that you plan on updating.
The quickest way to update is to to flash the latest factory images. This is done in fastboot mode and with the tool called, you guessed it, fastboot. ADB and fastboot are not the same thing. ADB only works when booted up or in recovery. Fastboot only works in... fastboot mode. :good:
You can update without losing any of your installed application or data. To do this you need to edit one line in the flash-all.bat file (Windows) or the flash-all.sh file (Linux/Mac). This flash-all file is located in the tarball that contains the factory images. You simply need to remove the -w near the end of this file. So from...
this:
Code:
fastboot -w update image-bullhead-xxx##x.zip
to this:
Code:
fastboot update image-bullhead-xxx##x.zip
That way userdata is not wiped when you run the flash-all file.
To re-root I suggest you follow the guide HERE. Note that flashing the factory images will wipeout either of the root styles you may have at the moment.
EDIT: Obviously you need to reflash TWRP to flash SuperSU or any other flashable zip. If you aren't interested in Android Pay, you dont need to follow the instructions in the link i posted above. Simply flash the latest SuperSU.
EDIT 1: If you want to decript, might as well do it straight away. No sense in setting everything up that then wiping it out. Remember this is done by formatting data. You can do it just after flashing TWRP from within TWRP. Note wiping data and formatting data are two separate things.
Good luck.
Thanks for all the help, you guys are awesome.

TWRP cannot mount /data or /system

I finally got unlocked, installed ADB/Fastboot on my computer, and flashed TWRP. (Followed this guide)
TWRP starts up with no problem, and flashed Magisk 'successfully', however I don't have root and I can't install any ROMs.
The problem appears to be TWRP cannot mount /system or /data. I've tried reflashing it to no avail. What am I doing wrong?
Edit: Since the reflash attempt it won't boot into anything other than TWRP. That's inconvenient.
Edit Edit: After letting the phone sit for ~5 minutes doing nothing, I was suddenly able to mount /data and flash a ROM. Unfortunately, my device still only boots to TWRP, and once again I can't mount /data or /system.
zurginator said:
i finally got unlocked, installed adb/fastboot on my computer, and flashed twrp. (followed this guide)
twrp starts up with no problem, and flashed magisk 'successfully', however i don't have root and i can't install any roms.
The problem appears to be twrp cannot mount /system or /data. I've tried reflashing it to no avail. What am i doing wrong?
Edit: Since the reflash attempt it won't boot into anything other than twrp. That's inconvenient.
Edit edit: After letting the phone sit for ~5 minutes doing nothing, i was suddenly able to mount /data and flash a rom. Unfortunately, my device still only boots to twrp, and once again i can't mount /data or /system.
Click to expand...
Click to collapse
format data
Mackay53 said:
format data
Click to expand...
Click to collapse
Data has been formatted, problem persists.
Zurginator said:
Data has been formatted, problem persists.
Click to expand...
Click to collapse
If it doesn't work after typing yes to format, then flash another twrp
Zurginator said:
Data has been formatted, problem persists.
Click to expand...
Click to collapse
Are you sure you formatted data? That's different than a wipe. Try rebooting into fastboot mode, connecting your phone to a computer and typing the command "fastboot format userdata" (fastboot is 1word) and then rebooting (unless you have already tried this). If you have make sure you are using the latest official TWRP for this device (not a modded one) and try flashing your ROM again. Also, some custom ROMs won't boot up if you flash Magisk at the same time. You need to flash the ROM and Gapps (if desired) and then fully boot into the system. After you have successfully booted into the ROM you can go back into recovery and flash Magisk.
Sir, I believe you can benefit from this:
https://forum.xda-developers.com/mi-mix-2/how-to/mix-pack-simple-user-twrp-adaway-supersu-t3792753
Even if you are not intending on using MIUI, this should bring your phone to stock (with unlocked bootloader).
jhs39 said:
Are you sure you formatted data? That's different than a wipe. Try rebooting into fastboot mode, connecting your phone to a computer and typing the command "fastboot format userdata" (fastboot is 1word) and then rebooting (unless you have already tried this). If you have make sure you are using the latest official TWRP for this device (not a modded one) and try flashing your ROM again. Also, some custom ROMs won't boot up if you flash Magisk at the same time. You need to flash the ROM and Gapps (if desired) and then fully boot into the system. After you have successfully booted into the ROM you can go back into recovery and flash Magisk.
Click to expand...
Click to collapse
That did the trick. I am 100% sure I was formatting data though. I'm up and booting custom ROMs now. Problems abound, of course, but that's what makes it fun.
Thanks everyone for helping out!
Try flashing the official TWRP from https://dl.twrp.me/chiron/twrp-3.2.1-0-chiron.img
I had the same problem. Just download the latest version from web or play store to fix the issue.

Unable to encrypt after root

Hi everyone.
I had a issue and i really want help
I had unlock the OEM,and after installing the twrp and format data (to remove the forced encrypt), i had flash the Disable_Dm-Verity_ForceEncrypt zip file.
Okay, after that i have restarted the device and configure as my away to use, after that, booted on recovery again and flashed the magisk.
But i wanna encrypt my device, and when i go to configs->security and encrypt area, says that my device its not encrypted. Okay, i followed the steps and when i gonna try to encrypt the device, the process start and... some seconds after, the phone just restart and nothing has done.
The onlys changes that i have made on system is: root and flashed a splash.img(without that stupid warning of unlocked bootloader)
I really want to encrypt my device, so, if i get stolen, the thief wont get my user data.
Can anyone help me?
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
marstonpear said:
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
Click to expand...
Click to collapse
Thanks sir, i will try!
marstonpear said:
Flash the stock rom and and don't flash the encryption disabler next time. You don't need to install TWRP to flash Magisk either, you can just boot it and then flash Magisk. Also you don't even need TWRP, you can just follow the guide in the forum to install Magisk by booting the magisk patched boot.img for your version of the stock ROM and then install Magisk manually via Magisk Manager.
TL;DR : Flash stock ROM and do the same things except flashing dm-verity-disabler, you don't need that for Magisk or TWRP.
Click to expand...
Click to collapse
Sir, i really need twrp now, its there any way i can enable encrypt after rooting the device? (to sure that, if gets stolen, the data need to be wipped out or the password must be given on twrp)
Same issue, i tried to encrypt on security menu,reboot and nothing was done.
@edit
Better, without TWRP, i can flash other zips via magisk/stock recovery?
mrkeitsuke said:
Sir, i really need twrp now, its there any way i can enable encrypt after rooting the device? (to sure that, if gets stolen, the data need to be wipped out or the password must be given on twrp)
Same issue, i tried to encrypt on security menu,reboot and nothing was done.
@edit
Better, without TWRP, i can flash other zips via magisk/stock recovery?
Click to expand...
Click to collapse
I'm not sure what you're trying to do here, do you want to have TWRP + stock encryption?
If so you can just boot TWRP and flash the TWRP installer package (.zip) inside TWRP to do that. And you don't need to change anything, currently I have TWRP installed and encryption enabled on my Stock ROM.
But if you're trying to get TWRP's own encryption, sadly that doesn't work.
You can also use TWRP without flashing/installing it, just go to the directory TWRP is stored in, open a command line, connect your phone and boot it with this command :
Code:
fastboot boot twrp.img
then flash whatever you'd like.
DO NOT lock your bootloader after you flash something on TWRP, this will most probably brick the device.
marstonpear said:
I'm not sure what you're trying to do here, do you want to have TWRP + stock encryption?
If so you can just boot TWRP and flash the TWRP installer package (.zip) inside TWRP to do that. And you don't need to change anything, currently I have TWRP installed and encryption enabled on my Stock ROM.
But if you're trying to get TWRP's own encryption, sadly that doesn't work.
You can also use TWRP without flashing/installing it, just go to the directory TWRP is stored in, open a command line, connect your phone and boot it with this command :
Code:
fastboot boot twrp.img
then flash whatever you'd like.
DO NOT lock your bootloader after you flash something on TWRP, this will most probably brick the device.
Click to expand...
Click to collapse
I want to stick with the stock rom rooted, with the twrp installed and the user data encrypted
So i can flash things through TWRP even i have encrypt enabled?
@edit
dont worry about bootloader, i will keep unlocked
It's perfectly fine to have TWRP and/or Magisk and encryption using stock ROM.
Flash stock ROM (erase user data)
Install TWRP
install Magisk
Don't flash the encryption Disabler. As its name implies, it disables the automatic encryption of the userdata partition.
a1291762 said:
It's perfectly fine to have TWRP and/or Magisk and encryption using stock ROM.
Flash stock ROM (erase user data)
Install TWRP
install Magisk
Don't flash the encryption Disabler. As its name implies, it disables the automatic encryption of the userdata partition.
Click to expand...
Click to collapse
:highfive: i had done this and... i think its working!!! :crying::crying::crying:
(crying for emotion, almost thirty factory resets to get an good result :crying::crying::crying
Anyway, if anything bad occurs, i will update here, thanks a1291762 and marstonpear

Encyption unsuccessful

I have a big problem with the phone, when I tried to change the system to lineageos from stock (oxygenos), I got an error. So I tried to install oxygenos from the zip archive I downloaded from the oneplus forum. The installation was successful but the phone looped over. Before the changes, I did a full system backup, but the twrp was replaced with stock recovery and I can not install twrp from the fastboot level. When I want to start the phone, I only have the ENCYPTION UNSUCCESSFUL message.
wasyll25 said:
I have a big problem with the phone, when I tried to change the system to lineageos from stock (oxygenos), I got an error. So I tried to install oxygenos from the zip archive I downloaded from the oneplus forum. The installation was successful but the phone looped over. Before the changes, I did a full system backup, but the twrp was replaced with stock recovery and I can not install twrp from the fastboot level. When I want to start the phone, I only have the ENCYPTION UNSUCCESSFUL message.
Click to expand...
Click to collapse
You might have to clear the internal storage , not sure though .
You might try flashing the twrp from bootloader. And clear internal storage and flash OOS again from scratch
however i would prefer to keep the phone content i have many important files there. I tried to install twrp but after restarting I still have stock recovery. I tried some applications listed on the forum but to no avail.
rohithksaj said:
You might have to clear the internal storage , not sure though .
You might try flashing the twrp from bootloader. And clear internal storage and flash OOS again from scratch
Click to expand...
Click to collapse
wasyll25 said:
however i would prefer to keep the phone content i have many important files there. I tried to install twrp but after restarting I still have stock recovery. I tried some applications listed on the forum but to no avail.
Click to expand...
Click to collapse
Why don't you try Msm tool or unbrick tool .
But those to wipe the phone though.
When you change from encryption device to decryption device , you have to clean flash .
So I suspect this might be an encryption issue, so might clean storage .
Don't know . Wait for someone else for an input .
So there is no way to save the data? I remind you that I have a system backup on my phone.
wasyll25 said:
So there is no way to save the data? I remind you that I have a system backup on my phone.
Click to expand...
Click to collapse
I think you need to flash the no Verity zip after you flash twrp to stop the stock recovery from reinstating itself after you reboot. Then you should be able to just boot into twrp and restore your backup.
k500zm said:
I think you need to flash the no Verity zip after you flash twrp to stop the stock recovery from reinstating itself after you reboot. Then you should be able to just boot into twrp and restore your backup.
Click to expand...
Click to collapse
In thag case . Here is the noverity zip
What command I must use?
Code:
fastboot flash recovery
????
When I install NO VERITY with this command, 5t try load recovery but after logo oneplus i have black screen and lights blue diod.

Categories

Resources