Why is flashing Patched boot img causing bootloop? - OnePlus 7 Pro Questions & Answers

I have a OnePlus 7 Pro on Android 11, OOS 11.0.0.2. The bootloader is unlocked. The devices runs absolutely fine unrooted. I have been wanting to root for quite some time. I patched the boot.img file of the ROM using latest Magisk Canary (app-debug.apk) from the GitHub repository. When I flash the .img through ADB, it is flashed successfully.
But when I reboot the phone, the phone is stuck on OnePlus' 'Two circling dots animation' (bootloop) and never starts. These are the commands that I enter one-by-one in CMD prompt on my laptop:
adb devices
adb reboot bootloader
fastboot flash boot "D:\Downloads\boot_patched.img"
fastboot reboot
Click to expand...
Click to collapse
So, to get out of this issue, I flash the stock boot image using similar commands. Then the phone boots successfully, but, of course, it is unrooted.
I even tried these commands, still no luck.
fastboot flash boot_a "D:\Downloads\boot_patched.img"
fastboot flash boot_b "D:\Downloads\boot_patched.img"
Click to expand...
Click to collapse
I also tried patching using the stable Magisk release (Magisk v23.0), still nothing.
What am I doing wrong?

iamMG said:
I have a OnePlus 7 Pro on Android 11, OOS 11.0.0.2. The bootloader is unlocked. The devices runs absolutely fine unrooted. I have been wanting to root for quite some time. I patched the boot.img file of the ROM using latest Magisk Canary (app-debug.apk) from the GitHub repository. When I flash the .img through ADB, it is flashed successfully.
But when I reboot the phone, the phone is stuck on OnePlus' 'Two circling dots animation' (bootloop) and never starts. These are the commands that I enter one-by-one in CMD prompt on my laptop:
So, to get out of this issue, I flash the stock boot image using similar commands. Then the phone boots successfully, but, of course, it is unrooted.
I even tried these commands, still no luck.
I also tried patching using the stable Magisk release (Magisk v23.0), still nothing.
What am I doing wrong?
Click to expand...
Click to collapse
I had an issue before, with the Canary APK. Try installing the v23 app and repatch your boot IMG with it. Worth a shot.

I tried, again, with v23. Same bootloop occuring.

Do you perhaps have the magisk app installed, I know of modules causing these sort of bootloop issues.

@soka said:
Do you perhaps have the magisk app installed, I know of modules causing these sort of bootloop issues.
Click to expand...
Click to collapse
Yes, the Magisk app is installed, but I don't have any modules installed. I don't even have root, how will I install a module?

iamMG said:
Yes, the Magisk app is installed, but I don't have any modules installed. I don't even have root, how will I install a module?
Click to expand...
Click to collapse
True, sorry just trying to help you narrow it down.

@soka said:
True, sorry just trying to help you narrow it down.
Click to expand...
Click to collapse
No problem. I just need to know how to fix the issue. Else, I would have to flash OOS 10.

iamMG said:
No problem. I just need to know how to fix the issue. Else, I would have to flash OOS 10.
Click to expand...
Click to collapse
This OnePlus 8T thread https://forum.xda-developers.com/t/...in-eu-us-kb2000-kb2001-kb2003-kb2005.4178675/ says to boot, not flash, the patched boot image. In other words, use fastboot boot "D:\Downloads\boot_patched.img" and then do a direct install in Magisk.
That's the process I used and it worked perfectly.
Note: my phone is an 8T.

BillGoss said:
This OnePlus 8T thread https://forum.xda-developers.com/t/...in-eu-us-kb2000-kb2001-kb2003-kb2005.4178675/ says to boot, not flash, the patched boot image. In other words, use fastboot boot "D:\Downloads\boot_patched.img" and then do a direct install in Magisk.
That's the process I used and it worked perfectly.
Note: my phone is an 8T.
Click to expand...
Click to collapse
Thanks, I will try this method and report back.
Btw, after you booted using this method, for how much time did the boot animation showed up (the two circling white dots around bigger red dot)?
Edit: I tried this method. No luck. The boot animation goes on 5-10 minutes, at which point I reboot into bootloader and flash the stock boot image.

Anyway, I ended up downgrading to OxygenOS 10.3.8.

Starting to give up as well... Never had any issues before (on Android 10) to flash root on O7Pro, but ever since Android 11, I keep having "boot loop" issues. Aka, the boot logo keeps loading and never boots into the OS. Only works again if I re-patch the original boot.img file.
This is starting to get.. VERY, VERY annoying. Why isn't there any proper method of getting this to work?

Not sure which boot.img you using.
But I face similar problem a week ago, and i fix that by using another .img then all fine.
I download from:
[RECOVERY] [12] [OFFICIAL] TeamWin Recovery Project
Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added...
forum.xda-developers.com

i'm running oxygen os 11.0.2.1 with root access. i'm running with the latest version of magisk, v.23.0. i haven't had any problems with android 11 and root. my suggestion is to make sure that you're patching the correct boot image. when an update is available, i download the full update, copy the zip to a computer, and then use payload dumper to extract the boot image. that's the boot image i use for patching.

hkdoublecat said:
Not sure which boot.img you using.
But I face similar problem a week ago, and i fix that by using another .img then all fine.
I download from:
[RECOVERY] [12] [OFFICIAL] TeamWin Recovery Project
Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added...
forum.xda-developers.com
Click to expand...
Click to collapse
I am too afraid to upgrade to OOS 11, only to find out root doesn't work for me. The restore function of this unofficial TWRP version is buggy so can't really depend on it to restore OOS 10.3.8. So, I have decided to stay on the latter until Team Recovery releases a proper update for Android 11.

altwu said:
i'm running oxygen os 11.0.2.1 with root access. i'm running with the latest version of magisk, v.23.0. i haven't had any problems with android 11 and root. my suggestion is to make sure that you're patching the correct boot image. when an update is available, i download the full update, copy the zip to a computer, and then use payload dumper to extract the boot image. that's the boot image i use for patching.
Click to expand...
Click to collapse
Hi i am just wondering if you can upload the patch image and the original boot image of 11.0.2.1GM21AA thanks in advance.

Mangtas_666 said:
Hi i am just wondering if you can upload the patch image and the original boot image of 11.0.2.1GM21AA thanks in advance.
Click to expand...
Click to collapse
attached are the original and magisk patch boot images from my phone running 11.0.2.1 GM21AA.
boot_11021.img is the original boot image that i extracted with payload dumper.
magisk_patched-23000_fQNMs.img is the magisk patched boot image. it was patched with magisk v23.0.

altwu said:
attached are the original and magisk patch boot images from my phone running 11.0.2.1 GM21AA.
boot_11021.img is the original boot image that i extracted with payload dumper.
magisk_patched-23000_fQNMs.img is the magisk patched boot image. it was patched with magisk v23.0.
Click to expand...
Click to collapse
i tried attaching the images to the post but they're not showing up. i tried editing the post to attach the images, but they're still not showing up. sorry.

Related

Best way to apply OTA to rooted phone

Hi all,
I've tried different methods to apply the November OTA to my Pixel 3, but so far none has worked seamlessly. Here's what I've tried so far:
- TWRP install the full OTA from Google (fails with a timestamp error)
- sideloading the full OTA from Google (same timestamp error)
- using topjohnwu's suggestion from his Magisk GitHub, which in short temporarily unroots the phone to allow the regular OTA process to take place, then before rebooting use Magisk Manager to patch the boot image of the spare partition (in this scenario, the phone won't even boot fully, it does boot but eventually restarts before hitting the lockscreen).
Is there any correct way to apply OTAs straight from the phone, without using a computer? If not, what would be the best way to update the Pixel 3?
Why not just flash-all (minus the -w) the system image?
sliding_billy said:
Why not just flash-all (minus the -w) the system image?
Click to expand...
Click to collapse
Because that requires a computer. I'd rather have a solution that would allow me to update on the fly; preferably, flashing an OTA through TWRP, which would then allow me to also reflash TWRP itself and Magisk. But, then again, this would simply be my optimal scenario - if it can't be done, I'll stick to flash-all.
GryphonBR said:
Because that requires a computer. I'd rather have a solution that would allow me to update on the fly; preferably, flashing an OTA through TWRP, which would then allow me to also reflash TWRP itself and Magisk. But, then again, this would simply be my optimal scenario - if it can't be done, I'll stick to flash-all.
Click to expand...
Click to collapse
Understood. I have just got so used to installing with the flash-all that is second nature. OTA through TWRP wasn't even working for a long time on the OG Pixel series, and putting the ~700 MB OTA file on the phone seemed like a waste since I only had a 32GB. Either way, permanent TWRP and Magisk are still installed directly from the phone and the TWRP .img fastboot boot needs a computer anyways so there is really no way to avoid the computer completely from end to end.
sliding_billy said:
Understood. I have just got so used to installing with the flash-all that is second nature. OTA through TWRP wasn't even working for a long time on the OG Pixel series, and putting the ~700 MB OTA file on the phone seemed like a waste since I only had a 32GB. Either way, permanent TWRP and Magisk are still installed directly from the phone and the TWRP .img fastboot boot needs a computer anyways so there is really no way to avoid the computer completely from end to end.
Click to expand...
Click to collapse
Well, if I could apply a full OTA directly from an already installed TWRP, then it'd be as simple as reinstalling TWRP and Magisk after the OTA. I was used to doing this on AOSP-based ROMs like Ressurection Remix or CyanogenMod/LineageOS.
GryphonBR said:
Well, if I could apply a full OTA directly from an already installed TWRP, then it'd be as simple as reinstalling TWRP and Magisk after the OTA. I was used to doing this on AOSP-based ROMs like Ressurection Remix or CyanogenMod/LineageOS.
Click to expand...
Click to collapse
No way to do it on a Pixel device (that I am aware of) since TWRP needs ran from outside of the OS. I seem to remember this coming up a bit when the OG Pixel first launched, and then it was just accepted to use fastboot boot.
sliding_billy said:
No way to do it on a Pixel device (that I am aware of) since TWRP needs ran from outside of the OS. I seem to remember this coming up a bit when the OG Pixel first launched, and then it was just accepted to use fastboot boot.
Click to expand...
Click to collapse
Yeah, there's something funky about how TWRP works with the A/B setup, because of the embedded recovery into boot and such, I assume. In any case, at this point it seems like I actually can get it updated using fastboot, so that'll have to do for the time being.
Thanks for bouncing off ideas with me!
GryphonBR said:
Yeah, there's something funky about how TWRP works with the A/B setup, because of the embedded recovery into boot and such, I assume. In any case, at this point it seems like I actually can get it updated using fastboot, so that'll have to do for the time being.
Thanks for bouncing off ideas with me!
Click to expand...
Click to collapse
Any time. Good luck!
GryphonBR said:
Because that requires a computer. I'd rather have a solution that would allow me to update on the fly; preferably, flashing an OTA through TWRP, which would then allow me to also reflash TWRP itself and Magisk. But, then again, this would simply be my optimal scenario - if it can't be done, I'll stick to flash-all.
Click to expand...
Click to collapse
Last I heard flashing OTA in twrp is broken, but even if it is fixed as soon as you flash the OTA you would lose TWRP. So you still need a computer to boot to TWRP to install it and/or root.
The key point is you have to boot to TWRP before you can flash either it or Magisk.
TonikJDK said:
Last I heard flashing OTA in twrp is broken, but even if it is fixed as soon as you flash the OTA you would lose TWRP. So you still need a computer to boot to TWRP to install it and/or root.
The key point is you have to boot to TWRP before you can flash either it or Magisk.
Click to expand...
Click to collapse
But that's what I was trying to do in the first place: booted from TWRP, apply OTA than flash TWRP and Magisk.
Which doesn't boot up, unfortunately. Not sure why.
GryphonBR said:
But that's what I was trying to do in the first place: booted from TWRP, apply OTA than flash TWRP and Magisk.
Which doesn't boot up, unfortunately. Not sure why.
Click to expand...
Click to collapse
Right, it is broke that way right now. It's hard to do because recovery where TWRP sits and boot are the same partition now. Touch one you touch both. So when you flashed the OTA you wiped TWRP out of recovery.
TonikJDK said:
Right, it is broke that way right now. It's hard to do because recovery where TWRP sits and boot are the same partition now. Touch one you touch both. So when you flashed the OTA you wiped TWRP out of recovery.
Click to expand...
Click to collapse
That's true, but when I'm using TWRP that's the runtime instance, not the installed one. So even if it gets overwritten by the OTA installation, it wouldn't matter since it would still be active at that moment.
I went nuts trying to figure out how to sideload the Nov OTA update through TWRP (was always easy with my OG Pixel) and then figured it doesnt work lol. Just did like was already suggested and took out the -w from the OTA and it went smooth after I updated my platform tools. This is the way I will do it from now on even if TWRP gets fixed which that looks unlikely.
Anyone do it without using TWRP?
Dbzruben said:
Anyone do it without using TWRP?
Click to expand...
Click to collapse
Yes, download the factory image and edit the flash-all batch file to remove the -w. Alternately, you can flash the stock boot image of your current os version and use the stock recovery to sideload the ota. Either way twrp will be replaced with the stock recovery.
Sent from my [device_name] using XDA-Developers Legacy app
Dbzruben said:
Anyone do it without using TWRP?
Click to expand...
Click to collapse
Method that worked for me (Fi Pixel3 (blueline), on Nov update, previously rooted via Magisk 17.3 Patch Boot Image File method) has been posted elsewhere & doesn't require TWRP installation. This assumes your device is already OEM Unlocked, has Developer Options/USB Debugging enabled/setup and you have the latest ADB/Drivers installed on your PC:
Download Dec Factory image (blueline-pq1a.181205.006)
Download TWRP 3.2.3-0 bootable image (twrp-3.2.3-0-blueline.img)
Download Magisk 17.3 zip
Download Magisk Manager 6.0.1 APK
Download Magisk Uninstaller (Canary)
Move TWRP bootable image file to ADB folder on PC (Win7 for me)
Unzip Dec image contents into ADB folder on PC
Find the Dec Boot.img file from extracted Dec image contents and copy it to Device Storage (Download folder)
Move Magisk Manager APK & Magisk Uninstaller zip to Device Storage (Download folder)
Modify the flash-all.bat file from the extracted Dec image contents location in Notepad (remove the -w) and save/overwrite the file back to the same directory & close Notepad
Open up command window from ADB folder on PC
adb reboot bootloader
fastboot boot twrp-3.2.3-0-blueline.img​
"Install" the Magisk Uninstaller zip (via TWRP) wait for that to finish then reboot to bootloader.
(Re)Open a command window from your PC's ADB folder if you closed it.
flash-all (with the -w previously removed in Notepad). Wait for it to finish.
fastboot reboot (if it doesn't boot back to System once finished)​
(Now in Android after 1st system boot) Check that Dec update has taken (Settings->System->About Phone->Build Number). No root.
To continue rooting Dec Image:
Install Magisk Manager APK (from Settings->Storage->Files->Download folder)
Open MM (ignore/dont install anything via MM if prompted). No root (as of yet).
In MM: Settings->Update Channel-> Change to "Beta"
Swipe down in MM to "Update" MM and "Install" v17.3 (17302.zip hotfix) via Patch Boot Image File method (using Dec Boot.img previously extracted and put into Device Storage (Download folder)).
Output Patched_Boot.img should now be located in Device Storage (Download folder).
Copy Patched_Boot.img file from Device Storage to ADB folder on PC
Open up a command window from ADB folder on PC again:
adb reboot bootloader
fastboot flash boot_a Patched_Boot.img
fastboot flash boot_b Patched_Boot.img
fastboot reboot​
(assuming everything took) Open up MM, confirm Magisk 17.3 is installed & you have root
Re-Install all relevant MM modules (i did not have Active Edge module previously installed but heard there were issues with this module & root)
There's way more steps in that than needed and really doesn't address how to apply an ota to a rooted phone.
Line 13 is the only thing that would apply.
Sent from my [device_name] using XDA-Developers Legacy app
I cont root my pixel with Dezember Update. It stock on bootloop after i flashed the patched Magisk images.
Serial Kazama said:
I cont root my pixel with Dezember Update. It stock on bootloop after i flashed the patched Magisk images.
Click to expand...
Click to collapse
Have you tried to root using twrp and the magisk zip?
Sent from my [device_name] using XDA-Developers Legacy app
Find the solution, i forgot to use the Magist Uninstaller Zip before i root the new OTA. My fault. Thx anyway!

Rooting for March Update?

Hello fellow A2 Lite owners!
I just got this device today and would LOVE to root 10.0.7.0, However it seems like the only way to go through this is by using a patched boot image which is not viable because none have showed up for 10.0.7.0 yet.
Will there be any other solutions for this? Thank you.
lgstylus2root said:
Hello fellow A2 Lite owners!
I just got this device today and would LOVE to root 10.0.7.0, However it seems like the only way to go through this is by using a patched boot image which is not viable because none have showed up for 10.0.7.0 yet.
Will there be any other solutions for this? Thank you.
Click to expand...
Click to collapse
I personally feel installing twrp offians twrp and flashing magisk is easyer
rob420p said:
I personally feel installing twrp offians twrp and flashing magisk is easyer
Click to expand...
Click to collapse
Obviously, It is my preferred way since I used it on a couple of devices including my Redmi Note 4 and Mi Pad.
My concern is not OTA but whether it would somehow break the ROM
Yes, I am aware of Mi Flash, Flashing stock ROMS, and other techniques but it's just that i don't have time for such long endeavors and would like to have a safe-ish way.
However I will try to get twrp running temporarily to install magisk.
lgstylus2root said:
Obviously, It is my preferred way since I used it on a couple of devices including my Redmi Note 4 and Mi Pad.
My concern is not OTA but whether it would somehow break the ROM
Yes, I am aware of Mi Flash, Flashing stock ROMS, and other techniques but it's just that i don't have time for such long endeavors and would like to have a safe-ish way.
However I will try to get twrp running temporarily to install magisk.
Click to expand...
Click to collapse
No it will not break the ROM I'm running the March update with twrp n magisk the only thing that does not work is backup n restore there is a new twrp 3.3.3.0 but I haven't installed it yet.
rob420p said:
No it will not break the ROM I'm running the March update with twrp n magisk the only thing that does not work is backup n restore there is a new twrp 3.3.3.0 but I haven't installed it yet.
Click to expand...
Click to collapse
How did you get TWRP to work? I am using the official image but whenever i boot into the .img, click cancel as instructed, and install the twrp zip, the result is that when i try to boot into recovery it says System has been destroyed (recovery only, normal boot is ok)
lgstylus2root said:
How did you get TWRP to work? I am using the official image but whenever i boot into the .img, click cancel as instructed, and install the twrp zip, the result is that when i try to boot into recovery it says System has been destroyed (recovery only, normal boot is ok)
Click to expand...
Click to collapse
Go to the pa ROM page and use that twrp that's offians twrp.the best guild ive seen n is type in customdriod mi a2 lite twrp and that page is the best in my opinion to follow I'll see if I can get a link for the page in a minute
Won't let me simend the link
rob420p,
Please provide links.
rob420p said:
Won't let me simend the link
Click to expand...
Click to collapse
Would you be capable of private messaging me the link?
I might have been able to find the link:
ww w.thecustom droid.com /install-twrp-recovery-root-xiaomi-mi-a2-a2-lite
Obviously remove all spaces.
lgstylus2root said:
I might have been able to find the link:
ww w.thecustom droid.com /install-twrp-recovery-root-xiaomi-mi-a2-a2-lite
Obviously remove all spaces.
Click to expand...
Click to collapse
I have followed this guide but it would always result in the installed version of TWRP not installing correctly, and the system mentioning "The System has been destroyed, Press power button to shut down"
How can i resolve this?
I just uploaded the boot and patched_boot imgs for 10.0.7.0 (March update) here are the links:
Stock boot.img : https://drive.google.com/open?id=17ukUahutrGCcx38ZXfzMaCCle71M_QuP
Patched boot.img with latest Magisk (07.04.2019 - I suggest patching the stock on your own to root the device) : https://drive.google.com/open?id=1RxFZcwi0utL3qGp9LKDMneBbggNMHmGY
marstonpear said:
I just uploaded the boot and patched_boot imgs for 10.0.7.0 (March update) here are the links:
Stock boot.img : https://drive.google.com/open?id=17ukUahutrGCcx38ZXfzMaCCle71M_QuP
Patched boot.img with latest Magisk (07.04.2019 - I suggest patching the stock on your own to root the device) : https://drive.google.com/open?id=1RxFZcwi0utL3qGp9LKDMneBbggNMHmGY
Click to expand...
Click to collapse
I figured out how to do it either way, thank you for your efforts however!
lgstylus2root said:
I figured out how to do it either way, thank you for your efforts however!
Click to expand...
Click to collapse
You can add the links to the main thread so that people can see :good:
Hi
Im trying to root V10.0.7.0.PDLMIXM Android on my A2 Lite with Magisk.
After fastboot boot patched_boot.img
Im getting bootloop, phone cannot boot (google lines endless loading).
After restart, goes well but no root.
Please help ! Thanks
max-damage said:
Hi
Im trying to root V10.0.7.0.PDLMIXM Android on my A2 Lite with Magisk.
After fastboot boot patched_boot.img
Im getting bootloop, phone cannot boot (google lines endless loading).
After restart, goes well but no root.
Please help ! Thanks
Click to expand...
Click to collapse
Search before asking : https://forum.xda-developers.com/mi-a2-lite/how-to/guide-install-magisk-proper-support-ota-t3836952
I did search and I followed procedure.
My phone fails to boot on step 10. when I load temporary patched boot.img over fastboot.
Thats my current problem.
I tried to load up downloaded pached boot.img for version V10.0.7.0.PDLMIXM
I also tried to make patched boot.img from original boot.img over phone via Magisk. It doesnt work, bootloop again.
max-damage said:
I did search and I followed procedure.
My phone fails to boot on step 10. when I load temporary patched boot.img over fastboot.
Thats my current problem.
I tried to load up downloaded pached boot.img for version V10.0.7.0.PDLMIXM
I also tried to make patched boot.img from original boot.img over phone via Magisk. It doesnt work, bootloop again.
Click to expand...
Click to collapse
I'm stuck with the same problem.
Booting with patched_boot.img (made on my own or downloaded from this forum) make the phone not starting, blocked on white screen.
Have you already solved?
lgstylus2root said:
How did you get TWRP to work? I am using the official image but whenever i boot into the .img, click cancel as instructed, and install the twrp zip, the result is that when i try to boot into recovery it says System has been destroyed (recovery only, normal boot is ok)
Click to expand...
Click to collapse
Only boot twrp not to Flash it...
Boot twrp command » fastboot boot twrp.img
Flash twrp command » fastboot flash recovery twrp.img
I assume you tried "flashing twrp" command, if that's the case it will replace your boot.img to twrp.img that's why it appears the "system has been destroyed" error... Try the "boot twrp command" if you want to access twrp temporarily... Coz right now we cant do(flash full twrp recovery) that as far as I know....
Winchester316 said:
Only boot twrp not to Flash it...
Boot twrp command » fastboot boot twrp.img
Flash twrp command » fastboot flash recovery twrp.img
I assume you tried "flashing twrp" command, if that's the case it will replace your boot.img to twrp.img that's why it appears the "system has been destroyed" error... Try the "boot twrp command" if you want to access twrp temporarily... Coz right now we cant do(flash full twrp recovery) that as far as I know....
Click to expand...
Click to collapse
I believe we can I have heard reports offains 3.3.3. Twrp can do it I haven't tryed yet.but I did have twrp with root running on the march update but I'm on pa now

Android 11 Open beta Stuck on Fastboot Mode While Rooting

Hi Everyone
I was rooting My op7 pro after updating to open beta android 11. While i was booting twrp it shows Fastboot Mode screen And stuck on that
Hope i ll find possible solution from the community
Regards
ali_hamza
I went through something similar. I'm reading that TWRP does not support Android 11 yet, so I think we have to do without it for now.
Steps I took:
Disconnect any USB
Hold down vol up, vol down, and power until screen goes black
Do this again until you actually get to normal fastboot mode
Connect to your PC
On your PC if you haven't already, download and install adb/fastboot tools, python, and the payload dumper tool - see Extract Android OTA Payload.bin File using Payload Dumper Tool (thecustomdroid.com)
On your PC, download the ROM zip of the Android 11 beta for OnePlus 7 Pro from the OnePlus forums
Open the Zip and extract the payload.bin file
Follow the instructions above to extract boot.img from payload
Open an admin command prompt and cd to a folder where you have adb/fastboot and this boot.img file
To make sure your phone is properly connected to your PC with correct drivers etc, run fastboot devices
Run fastboot flash boot boot.img
Run fastboot reboot
This got me back into an unrooted Android 11 system. My recovery is messed. I think there's a way to directly patch the boot.img file with Magisk and flash that. Will need to work on getting TWRP back if/when someone figures that out (or when it is supported)
Once you're unrooted and running on the Android 11 beta:
connect to your PC
tell Android to go into file transfer mode
take boot.img file from above instructions and copy it to the root of your phone storage
open the Magisk Manager app, click to install Magisk, and then choose Patch boot image
resulting patched boot image file will be saved to your phone's Downloads folder
back on the PC, pull this patched boot img file back onto your PC and into your fastboot folder
reboot phone into fastboot mode (using volup+voldn+power)
Run fastboot flash boot magisk_patched_?????.img (your file will have a unique name)
Run fastboot reboot
Now you're rooted.
benjaminries said:
I went through something similar. I'm reading that TWRP does not support Android 11 yet, so I think we have to do without it for now.
Steps I took:
Disconnect any USB
Hold down vol up, vol down, and power until screen goes black
Do this again until you actually get to normal fastboot mode
Connect to your PC
On your PC if you haven't already, download and install adb/fastboot tools, python, and the payload dumper tool - see Extract Android OTA Payload.bin File using Payload Dumper Tool (thecustomdroid.com)
On your PC, download the ROM zip of the Android 11 beta for OnePlus 7 Pro from the OnePlus forums
Open the Zip and extract the payload.bin file
Follow the instructions above to extract boot.img from payload
Open an admin command prompt and cd to a folder where you have adb/fastboot and this boot.img file
To make sure your phone is properly connected to your PC with correct drivers etc, run fastboot devices
Run fastboot flash boot boot.img
Run fastboot reboot
This got me back into an unrooted Android 11 system. My recovery is messed. I think there's a way to directly patch the boot.img file with Magisk and flash that. Will need to work on getting TWRP back if/when someone figures that out (or when it is supported)
Once you're unrooted and running on the Android 11 beta:
connect to your PC
tell Android to go into file transfer mode
take boot.img file from above instructions and copy it to the root of your phone storage
open the Magisk Manager app, click to install Magisk, and then choose Patch boot image
resulting patched boot image file will be saved to your phone's Downloads folder
back on the PC, pull this patched boot img file back onto your PC and into your fastboot folder
reboot phone into fastboot mode (using volup+voldn+power)
Run fastboot flash boot magisk_patched_?????.img (your file will have a unique name)
Run fastboot reboot
Now you're rooted.
Click to expand...
Click to collapse
You should just be able to run direct install after you boot to A11 with the patched boot image.
Some of us will have followed a standard Oxygen OS beta update flash cycle of:
Download the beta update
Reboot to recovery (TWRP)
Flash update, wipe dalvik
Flash TWRP installer to patch new boot image
Reboot to recovery (from recovery, to get A/B slot switched)
Flash Magisk to patch boot image for root
Reboot to system
I bricked at step 5 because TWRP installer didn't play nice with the new Android 11 boot image. Even when I flashed the latest unofficial TWRP from fastboot, the best I could get was a TWRP that couldn't decrypt filesystem... and after that, a bootloop that just flashed the TWRP load screen briefly every second, between black screens.
I'm super appreciative of OnePlus for having such a reliable way to get back to fastboot no matter what. I take it that when I extracted the OP stock boot image from beta and flashed it in fastboot, I also overwrote TWRP with stock recovery? It no longer seems like recovery is a separate partition to be flashed - nothing from the payload file seemed to be it.
calripkenturner said:
You should just be able to run direct install after you boot to A11 with the patched boot image.
Click to expand...
Click to collapse
Wait... you don't mean "direct install" of TWRP, do you? Is there a version that supports Android 11 filesystem decryption? Wouldn't that also get rid of root? What is it that you think should be directly installed after successful boot of Android 11 with Magisk patched boot image?
benjaminries said:
Wait... you don't mean "direct install" of TWRP, do you? Is there a version that supports Android 11 filesystem decryption? Wouldn't that also get rid of root? What is it that you think should be directly installed after successful boot of Android 11 with Magisk patched boot image?
Click to expand...
Click to collapse
No, direct install of magisk. Check the twrp thread in the rom and development section. There is already a patched boot image and instructions on rooting. Twrp isnt working yet as far as I know.
calripkenturner said:
No, direct install of magisk. Check the twrp thread in the rom and development section. There is already a patched boot image and instructions on rooting. Twrp isnt working yet as far as I know.
Click to expand...
Click to collapse
Got it. Yeah my Magisk Manager was still installed from previous beta, but it took away the "direct install" option when I lost root from flashing the unpatched boot.img. Personally I would always rather patch my own boot.img file than rely on something from a filesharing service, especially when trying to get out of brick...
But I can see how until proper TWRP support comes, we can just use Magisk to patch alternate boot slot before rebooting but immediately after flashing the latest OOS beta using the regular system update process. Hindsight...
benjaminries said:
Some of us will have followed a standard Oxygen OS beta update flash cycle of:
Download the beta update
Reboot to recovery (TWRP)
Flash update, wipe dalvik
Flash TWRP installer to patch new boot image
Reboot to recovery (from recovery, to get A/B slot switched)
Flash Magisk to patch boot image for root
Reboot to system
I bricked at step 5 because TWRP installer didn't play nice with the new Android 11 boot image. Even when I flashed the latest unofficial TWRP from fastboot, the best I could get was a TWRP that couldn't decrypt filesystem... and after that, a bootloop that just flashed the TWRP load screen briefly every second, between black screens.
I'm super appreciative of OnePlus for having such a reliable way to get back to fastboot no matter what. I take it that when I extracted the OP stock boot image from beta and flashed it in fastboot, I also overwrote TWRP with stock recovery? It no longer seems like recovery is a separate partition to be flashed - nothing from the payload file seemed to be it.
Click to expand...
Click to collapse
need to use orangfox recovery
esi2121 said:
need to use orangfox recovery
Click to expand...
Click to collapse
Hard to find documentation suggesting OrangeFox works with Android 11 filesystem encryption or OOS 11 beta specifically. Does it?
benjaminries said:
Hard to find documentation suggesting OrangeFox works with Android 11 filesystem encryption or OOS 11 beta specifically. Does it?
Click to expand...
Click to collapse
Check the orangefox ,it's only recovery support a11 for now
esi2121 said:
Check the orangefox ,it's only recovery support a11 for now
Click to expand...
Click to collapse
Yeah I did, and I could not find any evidence that it supports the new Android 11 filesystem encryption.
Changelog suggests much of the core functionality is ported from TWRP - that OrangeFox is more or less a fork with extra functions and a better interface.
The reason users of both TWRP and OrangeFox have been able to use custom Android 11 ROMs is that those roms are kind of a Frankenstein - they're based on Android 10 AOSP with Project Treble packages from Android 11. OOS 11 beta seems to have different partition architecture?
I think we need to wait until somebody reports their actual experience with OOS 11 beta on a custom recovery.
Yesterday i download and tried to flash Pitch Black Recovery Project but results were same.
I think there should be some changes regarding A11 in any recovery so the best is that we should wait for their( Devs) further response
benjaminries said:
Yeah I did, and I could not find any evidence that it supports the new Android 11 filesystem encryption.
Changelog suggests much of the core functionality is ported from TWRP - that OrangeFox is more or less a fork with extra functions and a better interface.
The reason users of both TWRP and OrangeFox have been able to use custom Android 11 ROMs is that those roms are kind of a Frankenstein - they're based on Android 10 AOSP with Project Treble packages from Android 11. OOS 11 beta seems to have different partition architecture?
I think we need to wait until somebody reports their actual experience with OOS 11 beta on a custom recovery.
Click to expand...
Click to collapse
yup thats it , but in orangefox git said official support A11
esi2121 said:
yup thats it , but in orangefox git said official support A11
Click to expand...
Click to collapse
Check out this (now locked) thread though: it seems like there's no working port of OrangeFox for guacamole that supports OOS11 yet... lots of people bricking and boot-looping on the hope that there might have been!
[UNOFFICIAL] [RECOVERY] [OnePlus 7 Pro] OrangeFox Recovery Project [R10.1] | XDA Developers Forums (xda-developers.com)

Guide for installing TWRP on OOS 11 Open Beta(Upto closed release 11)

Backup first, that's a must as always.
If coming from OOS 10 base -
1. Flash OOS 11 OB1/hotfix, after its completion do not reboot
2. Install official/unofficial twrp recovery image to ramdisk from advance menu in TWRP
3. Reboot to recovery
4.a. install magisk(optional) and reboot
4.b. repeat 1 and 2, reboot again then, 4.a.
If already on OOS 11 OB1/hotfix-
1. Flash the attached boot.img from bootloader
2. Reboot to recovery from bootloader itself(booting to system at this point will result in bootloop)
3. Follow the process as mentioned for OOS 10
Thx to Soft_M for boot image
NOTE: Above method is not compatible with OB2
OB2,OB3, closed release users directly flash official latest TWRP zip
NOTE: Installing TWRP on OB3 with any given method will cause safety net to fail
man thanks, that saved me from a bootloop from magisk...
Does this work with the HOTFIX build for OB1?
sw1tchback said:
Does this work with the HOTFIX build for OB1?
Click to expand...
Click to collapse
Yes it does, actually I tested this method on hotfix
Whats your widevine status on OOS11? Mine is l3 on unlocked bootloader.
parthrathore said:
Whats your widevine status on OOS11? Mine is l3 on unlocked bootloader.
Click to expand...
Click to collapse
For unlocked bootloader, l3 always
So you have tested official TWRP 3.5.2-9.0 on OOS Open Beta 2 and it works fine? Interesting
CrysisLTU said:
So you have tested official TWRP 3.5.2-9.0 on OOS Open Beta 2 and it works fine? Interesting
Click to expand...
Click to collapse
I confirm
I flashed oos beta2 and try to boot into twrp image through bootloader.but got to crushdump screen
What do I need to do on Beta 2 to get magisk and twrp installed? Currently none of them installed, magisk patched boot.img causes loop
romanuks said:
What do I need to do on Beta 2 to get magisk and twrp installed? Currently none of them installed, magisk patched boot.img causes loop
Click to expand...
Click to collapse
you can follow these steps:
1. install magisk app
2. boot patched boot img with magisk from another thread https://forum.xda-developers.com/t/...beta-1-for-oneplus-6-6t.4304161/post-85408313 through bootloader
3. patch boot image via magisk(if magisk ask you to allow reboot when you first time open it,don't allow it).
4. reboot your phone.you are good to go.
megaslx said:
you can follow these steps:
1. install magisk app
2. boot patched boot img with magisk from another thread https://forum.xda-developers.com/t/...beta-1-for-oneplus-6-6t.4304161/post-85408313 through bootloader
3. patch boot image via magisk(if magisk ask you to allow reboot when you first time open it,don't allow it).
4. reboot your phone.you are good to go.
Click to expand...
Click to collapse
Patching magisk from bootloader leads me to a bootloop though
megaslx said:
you can follow these steps:
1. install magisk app
2. boot patched boot img with magisk from another thread https://forum.xda-developers.com/t/...beta-1-for-oneplus-6-6t.4304161/post-85408313 through bootloader
3. patch boot image via magisk(if magisk ask you to allow reboot when you first time open it,don't allow it).
4. reboot your phone.you are good to go.
Click to expand...
Click to collapse
flash the above attached image and reboot to recovery directly, then follow the given procedure
voske15 said:
flash the above attached image and reboot to recovery directly, then follow the given procedure
Click to expand...
Click to collapse
so,on ob2 and 3, the pure twrp img will boot into crush dump,but patched boot partition won't?
megaslx said:
so,on ob2 and 3, the pure twrp img will boot into crush dump,but patched boot partition won't?
Click to expand...
Click to collapse
After testing it out, seems that is the case
edit: deleted
I had OB3 than I tried to "fastboot boot" latest TWRP to use PixelExperience. I got the QUALCOM message.
So I did the stupid thing to "fastboot flash boot" the latest TWRP. Now I'm bricked.
I will try to flash this one and see what happens. I was trying @mauronofrio unbrick guide, but it goes only until 10.3.8.
Julianocas said:
I had OB3 than I tried to "fastboot boot" latest TWRP to use PixelExperience. I got the QUALCOM message.
So I did the stupid thing to "fastboot flash boot" the latest TWRP. Now I'm bricked.
I will try to flash this one and see what happens. I was trying @mauronofrio unbrick guide, but it goes only until 10.3.8.
Click to expand...
Click to collapse
It worked. I've manage to get into TWRP and flash the stock O11. Thanks.
any actual guide to get twrp working on B3?
TheUndertaker21 said:
any actual guide to get twrp working on B3?
Click to expand...
Click to collapse
Just use FKM to flash a twrp and magisk. it should freakinglish work.

[Help!] Can't root my OnePlus 7 Pro

Hi,
with the latest Magisk update I noticed the missing Magisk Hide and SafetyNet fix. So I decided to go back to Magisk 23. After a few unsuccessful attempts, I don't know what happened but now my phone is no longer rooted. So I tried some usual methods to re-root the device but nothing to do, still no root
I have used boot.img patching way with Magisk but when I send ADB command "fastboot flash boot magisk_patched.img", it seems to work fine but after reboot there is no root
So I tried the other method by booting the device with patched boot.img using ADB ("fastboot boot magisk_patched.img") then I open Magisk Manager but in the installation section there is no "direct install" option as it should be.
I also tried flashing Magisk.zip via TWRP as I did long ago and TWRP seems to do the job well but after rebooting again no root...
Any suggestions?
even though you don't have root, i suggest flashing the stock boot.img and then rebooting to be really sure that root has been removed. and then flash the magisk patched boot.img.
are you using the latest adb and fastboot? you can get the latest from here. https://developer.android.com/studio/releases/platform-tools
fyi, i just updated to magisk 24.1 and enabled zygisk. i'm using @kdrag0n's universal safetynet fix. google pay works. i don't have any other apps that i need to hide magisk from.
altwu said:
fyi, i just updated to magisk 24.1 and enabled zygisk. i'm using @kdrag0n's universal safetynet fix. google pay works. i don't have any other apps that i need to hide magisk from.
Click to expand...
Click to collapse
How did you get this to work? I am on the latest OP7P OOS (11.0.5), and I haven't been able to get my phone rooted, even though I installed the boot.img I patched using Magisk v24.1.
¿GotJazz? said:
How did you get this to work? I am on the latest OP7P OOS (11.0.5), and I haven't been able to get my phone rooted, even though I installed the boot.img I patched using Magisk v24.1.
Click to expand...
Click to collapse
i'm running 11.0.5.1.GM21AA. i was already rooted with magisk v23, so i updated the magisk app to 24.1, and did a direct install to update root to 24.1.
but for any os upgrades, i download the firmware zip from my phone to my pc before installing. i extract the boot.img from the zip with payload dumper, patch it with magisk, and then flash it via fastboot. this way i know for sure that i'm using the correct boot.img. if you need the firmware zip to extract the boot.img from, you can use the oxygen updater app to download it.
did you use the stock boot.img for patching?
altwu said:
i'm running 11.0.5.1.GM21AA. i was already rooted with magisk v23, so i updated the magisk app to 24.1, and did a direct install to update root to 24.1.
but for any os upgrades, i download the firmware zip from my phone to my pc before installing. i extract the boot.img from the zip with payload dumper, patch it with magisk, and then flash it via fastboot. this way i know for sure that i'm using the correct boot.img. if you need the firmware zip to extract the boot.img from, you can use the oxygen updater app to download it.
did you use the stock boot.img for patching?
Click to expand...
Click to collapse
Yes, I used the stock boot.img that I extracted from the 11.0.5.1 file that was downloaded as the normal OTA update from OnePlus. I patched that boot image with Magisk v24.1 that was already installed on my OP7P.
Then, I flashed that Magisk patched boot.img using fastboot onto both A and B slots (I switched slots by booting into TWRP 3.6, since I didn't see a way to switch slots with the now-loaded OnePlus Recovery Mode).
When I rebooted through the patched image, the phone came up (which is good!), but Magisk says that I don't have root (which is bad!). I haven't figured out how to fix that.
Could you PM me your patched boot.img? I could try flashing that to see if my OP7P acts any differently.
Thanks!
OK, I'm 100% positive that Magisk v24.1 patched my OP7P OOS 11.0.5.1 boot.img properly.
I extracted the 11.0.5.1 boot.img file from the OTA image that was in my .Ota folder from my phone. I extracted boot.img from the payload.bin file using two different methods of payload-dumper. Both boot.img files had the same SHA-512 checksums, so they were identical.
I also downloaded a copy of the Magisk v24.1 patched boot.img from the intenet and compared it to my Magisk v24.1 patched boot.img file. Again, the SHA-512 checksums matched for the two patched files, so I am sure that I have a properly patched boot.img file.
Note that my OP7P has loaded the full OOS 11.0.5.1 Stock image, so I currently have the OOS Recovery Mode and I do not have TWRP Recovery Mode.
Maybe I am doing something else wrong during my installation that is keeping me from getting root?
Here is the process I followed with my patched boot.img file:
I boot into Fastboot Mode
In Fastboot Mode, I go into TWRP Recovery Mode by typing: fastboot boot twrp-3.6.0_11-0-guacamole.img
After rebooting into TWRP Recovery, I installed the 11.0.5.1 OTA by doing an Install > Browse to the .Ota folder for the OTA .Zip file.
After the OOS 11.5.0.1 OTA installed, I rebooted back to Fastboot Mode (before booting normally) by selecting: Reboot > Slot A > Home > Reboot > Bootloader
Once I am back into Fastboot Mode, I type: fastboot flash boot magisk_patched_boot.img
In Fastboot Mode, I type: fastboot reboot
After I have rebooted back to normal mode, Magisk v24.1 is already installed and I don't do any updates to that. When opening Magisk, my screen flashes a couple of times before giving me a Toast pop-up that Magisk was denied Super User access. When I look at the Magisk App screen, it says that the App is installed, but that Magisk is not installed.
Are there any steps that I am missing?
Well, I finally got OOS 11.0.5.1 rooted with Magisk v24.1.
I ended up wiping my data and installing a fresh install of OOS 11.0.5.1 (Not sure if this is necessary, but I skrood up along the way and had to wipe as a result).
The one thing that was different this time around was that I disabled encryption/lock before flashing the Magisk-v24.1 patched boot image. I suspect that was what helped me make it to the finish line this time.
Good luck out there!
¿GJ?
i'm glad to hear that you got it figured out. sorry for not responding sooner with a patched boot image.
i don't use twrp, so my method of upgrading and patching is different than yours.
my only guess as to why you were having trouble before is maybe you were flashing the magisk patched boot image to the wrong slot. if you run into a similar problem in the future, you can try flashing the magisk patched boot image to both slots. but it's a moot point now. enjoy your finally rooted phone!
altwu said:
i'm glad to hear that you got it figured out. sorry for not responding sooner with a patched boot image.
i don't use twrp, so my method of upgrading and patching is different than yours.
my only guess as to why you were having trouble before is maybe you were flashing the magisk patched boot image to the wrong slot. if you run into a similar problem in the future, you can try flashing the magisk patched boot image to both slots. but it's a moot point now. enjoy your finally rooted phone!
Click to expand...
Click to collapse
Hey, @altwu - I used TWRP to switch between slots when flashing the Magisk patched boot images. I had patched both slots (as best as I could tell)
If you don't use TWRP, how did you switch between slots prior to flashing the patched boot images?
¿GotJazz? said:
Hey, @altwu - I used TWRP to switch between slots when flashing the Magisk patched boot images. I had patched both slots (as best as I could tell)
If you don't use TWRP, how did you switch between slots prior to flashing the patched boot images?
Click to expand...
Click to collapse
you can use fastboot to switch slots.
fastboot --set-active=a or b
i don't know if it's necessary, but i reboot the bootloader with "fastboot reboot bootloader" after switching slots.
i've never tried this, but you can also specify what slot when running fastboot flash, like "fastboot flash boot magisk_patched.img --slot a".
check out "fastboot help" to see the different options.
i haven't had to play around with slots though. when an update is available, i'll download the zip to a computer and then go through the normal update process via the os. after the update is done, the phone reboots and the correct active slot is set.
Thanks for the feedback, @altwu.
I am having issues getting my SMS notification sound working on my fresh(er) 11.0.5.1 installation. I haven't seen anybody respond back yet, and I am beginning to suspect it's just a problem on my OP7P. If I don't see anybody responding back by tomorrow, I'll assume it's "just me".
I am thinking about doing a total wipe again to see if it will clear up the issue I am seeing. I will end up trying your installation route this time to see if it helps at all.

Categories

Resources