messed up twrp - Huawei P20 Pro Questions & Answers

I decided too unlock bootloader to get android pie because I was tired if waiting for it and since we get update every 5 months I thought might as well get root at the same time.
But now I cannot boot into twrp holding volume up , it insteads bring me to stock recovery.
I can boot twrp with adb using a computer but its encrypted and i have screen unlock off .
And I cant lock bootloader and unlock it on pie to start from scratch I think because oem unlock is locked in developper options

you need to use modded TWRP for EMUI 9, but it wont be able to decrypt as well,
TWRP are pretty much unusable on PIE,
but you doesnt need TWRP at all to root, just flashed the patched recovery ramdisk through fastboot. Next magisk update can be installed directly from the manager
and for the heads up, root on pie using recovery partition, so you can't have TWRP and root together
if you root, mean no TWRP
if you want TWRP, mean no root
as for oem unlock greyed out, its restored to normal on 9.0.0.168, i think you are on lower version of pie.

Related

Root Question

I have the Spint version of the X and have already taken the OTA update that contains the camera fix. Is it possible for me to install a custom recovery and root after unlocking the bootloader using the method shown in this video? http://www.youtube.com/watch?v=2fzih8xkki0
It is never made clear on what software version you have to be on
Yes you can. I did it that way. Got phone, updated it, unlocked boot loader through Motorola, fastboot flashed TWRP, then auto rooted via TWRP. Normally I manually root/flash superSU zip, but this time I decided to try the TWRP auto root method.

Re-Lock bootloader?

I unlocked my bootloader, installed twrp and several roms to try them out, then decided to go back to stock. Currently have OOS 3.5.4 installed with stock recovery (that came with the toolkit). However, whenever I try to lock the booltloader again, the phone won't boot up. It will bootloop, or just stay off with the led glowing white. I tried to sideload the stock ROM from OnePlus, but it fails after about 45% completion. I tried both 3.5.3 and 3.5.4 and both fail after about 45%. The only way to get the phone to boot again is by unlocking the bootloader again, then it boots just fine. Tried unlocking with the toolkit as well as fastboot oem lock. Both give me the prompt on the phone, then wipe the phone and go into the bootloop.
Any suggestions on how to re-lock the bootloader? I want to be able to get the OTA update, which I think will fail with an unlocked bootloader. Note, I have also tried loading the Nougat update from settings - system update - local upgade (both full and update) and they also fail to load shortly after booting to recovery.
Thanks,
TR
Instead of using the toolkit, try just doing it manually.
fastboot oem lock IS the correct way to lock the bootloader.
If you're running into all those issues, try to reflash the stock rom from the official site. OR try this
NOTE: This WILL wipe everything on your phone so make a backup first!
First Unlock booloader​1. On your phone go into Developer screen (Settings --> Developer Options)
If you don't have this go back to Settings --> About Device. Tap "Build number" 7-10 times to unlok developer options
2. In Developer Options turn on "USB Debugging" and "OEM Unlock"
3. Open ADB in command prompt and go to the directory where ADB is.
Type adb reboot bootloader
4. Once your device is in fastboot mode, type in fastboot devices to make sure your device is listed
5. Type in fastboot oem unlock to unlock your device bootloader
You can check to make sure it was properly unlocked by typing in fastboot oem device-info.
6. Reboot into your system
Files we need​7. Download the following files:
TWRP - https://build.nethunter.com/test-builds/twrp/oneplus/twrp-3.0.2-0-oneplus3t.img
No-verity-opt-encrypt - https://build.nethunter.com/android-tools/no-verity-opt-encrypt/no-verity-opt-encrypt-5.0.zip
Magisk - http://tiny.cc/latestmagisk
Phh-Superuser - https://forum.xda-developers.com/attachment.php?attachmentid=3988488&d=1483407725
Latest Stable Nougat Rom - http://otafsc.h2os.com/patch/amazon...s3TOxygen_28_OTA_035_all_1612310259_2dc0c.zip
8. Copy all the files to your phone (keep the original on your pc just in case)
9. Load back up to fastboot mode
In ADB type adb reboot bootloader
10. Flash twrp img we downloaded above by typing
fastboot flash recovery twrp-3.0.2-0-oneplus3t.img
11. After this reboot into the system
Install all of our downloaded files through TWRP​12. Now boot into recovery by issuing the following ADB command
adb reboot recovery (you should go into TWRP)
13. Once you're in twrp flash the "no-verity-opt-encrypt-5.0.zip" file OR you can format the data partition to f2fs to prevent the dm-verity error.
14. Now install the stock stable nougat rom we downloaded above
15. Do a factory system wipe / cache & dalvik
16. Install magisk through TWRP
17. Wipe cache/dalvik
18. Install phh SuperUser
19. Now reboot into the system normally.
NOTE: This *COULD* take a while since you did a clean install of nougat so just be patient and you should be good to go after this.
Thanks for the reply.
I did do fastboot oem lock, and it results in an unbootable system. fastboot oem unlock makes it bootable again. Not sure why. Also, whenever I do adb sideload <any_rom> it fails after about 45%. Not sure what's happening. Your instructions would get me to Nougat with TWRP and an unlocked bootloader, which may be what I end up doing, but I was trying to get back to fully stock, and locked again, so that OTA's will work properly. If nothing else works, I will go the route you suggest above.
Thanks again!
I just figured I'd try to get you to a working system/phone. After you get all that working you can probably lock your bootloader back to default. Now, I'm not 100% sure, but I believe that if you have a custom recovery you will need to restore that to stock as well before setting the bootloader back to locked.
TXRangerXDA said:
I unlocked my bootloader, installed twrp and several roms to try them out, then decided to go back to stock. Currently have OOS 3.5.4 installed with stock recovery (that came with the toolkit). However, whenever I try to lock the booltloader again, the phone won't boot up. It will bootloop, or just stay off with the led glowing white. I tried to sideload the stock ROM from OnePlus, but it fails after about 45% completion. I tried both 3.5.3 and 3.5.4 and both fail after about 45%. The only way to get the phone to boot again is by unlocking the bootloader again, then it boots just fine. Tried unlocking with the toolkit as well as fastboot oem lock. Both give me the prompt on the phone, then wipe the phone and go into the bootloop.
Any suggestions on how to re-lock the bootloader? I want to be able to get the OTA update, which I think will fail with an unlocked bootloader. Note, I have also tried loading the Nougat update from settings - system update - local upgade (both full and update) and they also fail to load shortly after booting to recovery.
Thanks,
TR
Click to expand...
Click to collapse
I also have the same problem, after the bootloader lock the phone does not start.
I tried with all the possible procedures, also even the rom flash in local and sideload it does not work, It comes to 45% and then fails.
we will highlight the problem, so everyone will know and maybe there is a solution
m0d hipp¥ said:
I just figured I'd try to get you to a working system/phone. After you get all that working you can probably lock your bootloader back to default. Now, I'm not 100% sure, but I believe that if you have a custom recovery you will need to restore that to stock as well before setting the bootloader back to locked.
Click to expand...
Click to collapse
But of course, you can't relock phone with a non standard recovery. Replace TWRP with the ROMs real recovery and relock will work again.
That's what I figured. Thanks for the confirmation.
Use the unbrick tutorial to go back to stock
This is what i did
https://forum.xda-developers.com/oneplus-3t/how-to/unbrick-unbrick-tutorial-oneplus-3t-t3515306
pitrus- said:
But of course, you can't relock phone with a non standard recovery. Replace TWRP with the ROMs real recovery and relock will work again.
Click to expand...
Click to collapse
I'm sorry, even with the stock recovery but does not work, it was the first thing I did
You can a unbick tutorial. It worked for my OnePlus 3T. Just search up How to unbrick (whatever OnePlus device you have) on Google. Then follow all the instructions carefully. If you need help with it I could try to do a remote session with you. Edit: It will erase all data and you will boot with oos 3.5.3 ( I also had the same issue as you. But I couldn't install any zip with stock recovery or adb side load.
Haven't seen nothing on the fórum about this particular subject, locking the bootloader seems a problem in this phone
enokack said:
Haven't seen nothing on the fórum about this particular subject, locking the bootloader seems a problem in this phone
Click to expand...
Click to collapse
Only if you have modified the phone in some way or another (like rooting and installing twrp) before trying to re-lock.
If you keep it stock, you should be able to re-lock. Or else, just use the Qualcomm restore method to re-lock.
tried this
OK what i did was when the phone was starting and vibrating I push the power bottom and volume down bottom at the same time ,then i connected the phone to the PC,from the panel in the phone there are 3 categories to erase everything on the phone I did it all(1,2,3) and then I put the phone in ADB mode from the control panel in the phone,After that I flash via fastboot the original .zip from one plus for the version 4.0.3 (1.4 GB) ,when it finished I restarted and the phone started normal again,I hope this help someone alse,I was so desesperated:silly:.
I think the problem in re-locking it is the modified boot image. Locked bootloaders don't support those.
re-locking bootloader will getback the warranty ???
No solutions till now
enokack said:
Haven't seen nothing on the fórum about this particular subject, locking the bootloader seems a problem in this phone
Click to expand...
Click to collapse
Its three easy steps, no need to use any toolkit just follow the instructions. https://forums.oneplus.net/threads/...-3-3t-and-go-back-completely-to-stock.456232/
Abrar123 said:
re-locking bootloader will getback the warranty ???
Click to expand...
Click to collapse
Unlocking the bootloader does not void the warranty on this device:
https://oneplus.net/support/answer/will-rooting-or-unlocking-the-bootloader-void-my-warranty
Once I have root, is there a command to re-lock and later eventually unlock the bootloader again?
I remember this was possible with google nexus devices, there was a shell command (require root) that was able to change bootloader status

Regarding relocking bootloader

suppose I unlock my bootloader, install custom recovery like TWRP and now, If I wish to RE LOCK my bootloader ( dont ask why), is it necessary to have the STOCK recovery installed before relocking or custom recovery will be fine?
Thanks.
Relocking the bootloader is NOT recommended. That said, you can and should keep TWRP if you choose to lock it.
Oh okay. I read somewhere that if you choose to re lock your bootloader you have to go FULL STOCK ( ROM + Recovery). I guess that might not be the case for nexus devices?
Relocking the bootloader will wipe your data, but it doesn't play cop and make sure everything is stock. All the bootloader does is pass off control of the device from the low level firmware that we cannot access to either the recovery or Android itself. Locking the bootloader only ensures that the possessor of the device cannot change the contents of the partitions from outside the device using ADB. A device with TWRP and a locked bootloader can still install custom ROMs, and possibly even root.
However, there is practically zero reason to ever lock the bootloader once unlocked, leaving people to wonder why you would want to.

A Stock ROM and Bootloader that will leave bootloader unlocked?

As per another thread, I am having issues (bootloops at the android/moto logo screen) after replacing my Turbo screen. I am unlocked and rooted. I know this cause I was before I replaced the screen (used Sunshine) and had RR custom ROM installed. Still unlocked because I can get to the bootloader screen (Power + Vol Down) and it says "Phone is Unlocked. Status code: 3".
To try to at least get a booting phone: Is there ANY stock ROM and Bootloader that I can flash that will still keep my phone UNLOCKED? I don't want to re-lock it and then have it locked forever (which I think the latest stock updates does). I am thinking that if I can flash a stock bootloader and ROM, then I can reflash TWRP and custom ROM (and get rid of the bootloop).
I would assume that if I had put something together incorrectly then it wouldn't boot at all and I wouldn't be able to get to the bootloader screen.
Thanks for any info/advice.
P.S. I did try just reflashing TWRP but it still bootloops at the same point; and I can't get into recovery.
So, when you boot to bootloader (Phone off, then power and volume down button at the same time), and you then arrow up to "recovery" when you push the button to go there, what happens? Is TWRP not still installed or something? the only reason it wouldn't be installed is if you flashed stock firmware and wiped it out with stock recovery.
Use the hardware method
First of all, you have to turn off your phone.
Then, you need to press Volume Down button and hit power key.
Bootloader mode will be then displayed on your device.
From there, use volume up and down buttons in order to scroll up and down and power key to select.
Click to expand...
Click to collapse
________
If your Droid Turbo bootloader is unlocked, flashing stock firmware with bootloader won't lock it. The newest firmware is to PREVENT the bootloader from being unlocked by Sunshine. It won't lock it back.
However, with stock Marshmallow you will have to re-root with older SuperSu beta for initial root. Flashing with newer SuperSu causes bootloops. After you have initial root then you can update to newer SuperSu.
But first tell me what happens when you try the hardware method of getting to recovery.
____
---------- Post added at 12:40 PM ---------- Previous post was at 12:23 PM ----------
_______
also you can force the phone to boot to TWRP, even if you don't have TWRP installed on the phone...
fastboot boot recovery.img
Where "recovery.img" is your TWRP file on you PC.
if you named it TWRP.img, then the command would be
fastboot boot TWRP.img
If you need to force the phone to go to the bootloader, the commad is
adb reboot bootloader
and then from there
fastboot boot recovery.img
(where "recovery" is whatever you have named the TWRP file.)
It's basically "temporary" TWRP. It doesn't install TWRP, but makes your phone boot to TWRP from your bootloader screen. It uses the TWRP file (whatever you have named it) from your PC folder. You then will boot into TWRP, can install stuff, make a backup, whatever you want to do. From TWRP, you can even install TWRP!
But you can reinstall your custom ROM, or you can restore a backup -- whatever you want to do from the "temporary" TWRP.
I used this a couple of years ago to use TWRP to make a backup of STOCK Kitkat image. I was booted into TWRP but TWRP was not installed on the phone. The phone was still pure stock, so I could easily make a backup image.
Then I rooted the phone! And made another backup image. It was rooted stock, still with no TWRP installed.
And then last I actually installed TWRP, was rooted and made a backup of that. And posted all those images for people to use. But a lot of people forget that you can BOOT TO TWRP even if TWRP is not installed on the phone. And that "temporary" TWRP (one session) will still allow you to do anything you want.
It's a useful trick to know!
Moto Maxx - Moto Turbo XT1225 factory images (Mexico | Puerto Rico | India | Brazil)
https://forum.xda-developers.com/moto-maxx/development/moto-maxx-moto-turbo-xt1225-factory-t3078274

Couple of questions about rooting

Hi there, I am currently running B383 on my P9, and really want to root it. However when I do, will I still be able to get future updates to the software? Do I need to unroot and lock bootloader first?
Also when the bootloader is unlocked, a message is displayed at boot about your phone being unsecured and non-trustworthy, is it possible to remove this message? (I used to have a moto g with an unlocked bootloader, and I flashed some file to remove the warning).
Thanks
I don't think there is a way to remove that message every time the phone is turned on. Mine does that too as I've unlocked the bootloader.
Did you unlock the bootloader yet? Because when you need to unlock it, the phone will basically be factory reset when bootloader is switched from locked to unlock (vice-versa).
And for OTA updates the best way is to do it manually, downloading the MV-PV file via Huawei Firmware finder (Full PV file which contains two files update.zip and hweu..zip, update.zip (system firmware) is flashed first then hweu.zip (The system apps).
You will need a custom recovery. The one you will need to use is TWRP (This one specifically - twrp-3.1.1-0-eva.img) to flash OTA's via custom recovery (To repeat you flash update.zip first then hweu.zip) You can ignore the errors if it prints any while flashing the OTA files as I did the same and it worked fine no problem.
When you want to root your phone, make sure to flash 'SuperSU-v.2.82-EMUI5-SELEnforcing.zip' via TWRP recovery to root your phone.
For the other questions, you do not need to unroot the phone to install the OTA updates. The phone will just unroot itself when the OTA update is flashed onto phone. You simply just need to re-root it again by re flashing the SuperSU zip as mentioned above.
When you need to boot the custom TWRP recovery you need to turn the phone off and hold power + volume up until Huawei Logo / text is displayed you must release both keys immediately after 0.5-1 second which is a short time frame to get the phone to boot to custom recovery or else it will boot the Huawei eRecovery instead.
SuperSU here: https://forum.xda-developers.com/p9/development/root-supersu-2-81-emui-5-t3612258
TWRP here: https://forum.xda-developers.com/p9/development/twrp-t3565703
Best to follow the instructions from those links. The information above is to guide you through the processes.
..
benjamen50 said:
I don't think there is a way to remove that message every time the phone is turned on. Mine does that too as I've unlocked the bootloader.
Did you unlock the bootloader yet? Because when you need to unlock it, the phone will basically be factory reset when bootloader is switched from locked to unlock (vice-versa).
And for OTA updates the best way is to do it manually, downloading the MV-PV file via Huawei Firmware finder (Full PV file which contains two files update.zip and hweu..zip, update.zip (system firmware) is flashed first then hweu.zip (The system apps).
You will need a custom recovery. The one you will need to use is TWRP (This one specifically - twrp-3.1.1-0-eva.img) to flash OTA's via custom recovery (To repeat you flash update.zip first then hweu.zip) You can ignore the errors if it prints any while flashing the OTA files as I did the same and it worked fine no problem.
When you want to root your phone, make sure to flash 'SuperSU-v.2.82-EMUI5-SELEnforcing.zip' via TWRP recovery to root your phone.
For the other questions, you do not need to unroot the phone to install the OTA updates. The phone will just unroot itself when the OTA update is flashed onto phone. You simply just need to re-root it again by re flashing the SuperSU zip as mentioned above.
When you need to boot the custom TWRP recovery you need to turn the phone off and hold power + volume up until Huawei Logo / text is displayed you must release both keys immediately after 0.5-1 second which is a short time frame to get the phone to boot to custom recovery or else it will boot the Huawei eRecovery instead.
SuperSU here: https://forum.xda-developers.com/p9/development/root-supersu-2-81-emui-5-t3612258
TWRP here: https://forum.xda-developers.com/p9/development/twrp-t3565703
Best to follow the instructions from those links. The information above is to guide you through the processes.
Click to expand...
Click to collapse
Thanks for the quality answer, I have no doubts anymore!

Categories

Resources