[ GUIDE ] [ ANDROID 10 ROOT ] [ HOW TO ] Patching Boot.img with Magisk

ibolito

Senior Member
Jun 4, 2010
231
97
0
Marseille
Here's how to root the Pixel 3 running on official and stock Android 10 release, step by step :

(not tested on Pixel 3 XL but it might work the same, just use the right firmware for your device)

What do you need :
> Pixel 3 phone with Android 10
> Unlocked bootloader on your Pixel device
> Latest ADB and FASTBOOT tools on your computer


1 ) Download the latest Android 10 factory image for your device ("Blueline" is the regular Pixel 3) :
Link > Android 10 factory image

2 ) Extract the "boot.img" file on your phone

3 ) Download latest Magisk Manager application on your phone and install it :
Link > https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445

4 )Press on the Install Magisk button (the one on the top, not the Magisk Manager), then Install > Select and Patch a File and now select the Boot.img file you extracted earlier. When the process is done, just put the patched boot.img file on your computer in the same folder as your ADB and FASTBOOT tools, the file's name is magisk_patched

5 ) Enable adb debugging on your Pixel phone and connect it to your computer via USB.
Open a command prompt on your computer and migrate to the folder where the ADB and Fastboot tools are located.
(for exemple, for me it's : cd C:\\adb).

7 ) Reboot your phone to fastboot by typing adb reboot bootloader

8 ) Flash the Boot.img you just patched with magisk by typing fastboot flash boot magisk_patched.img

9 ) When i'ts done, reboot by typing fastboot reboot

10 ) Open your Magisk Manager app and chek if everything is good, and it should be ! You can now install Adaway after you enable Systemless root in the Magisk settings and rebooting your phone.

Note that this guide is actually for using adaway. I don't know if it will work for any other root related feature on your phone.
 
Last edited:

bafforosso

Senior Member
Jan 22, 2013
192
168
0
Great guide, thanks!

11 ) Open your Magisk Manager app and chek if everything is good, and it should be ! You can now install Adaway after you enable Systemless root in the Magisk settings.
I would just add not to forget to reboot again after enabling Systemless hosts in the Magisk settings and before installing Adaway (or after installing any other module)
 

the1wolf

Member
Jul 9, 2017
19
5
3
I get a "This site can't be reached" message when I click the link for magisk manager in step 3. Not sure if anyone else sees it.

Thank you for making this guide!
 

Oberbergler

Senior Member
May 26, 2015
207
46
0
I think my boot.img was not patched successfully. The original file has 64 mb while the patched one has only 30 mb. I've already pdated to Android 10. When I try to path the boot.img I get the following error: FAILED (remote: Not allowed to flash (bootb))
Could anyone please send me his patched boot.img? :)
 

ibolito

Senior Member
Jun 4, 2010
231
97
0
Marseille
I think my boot.img was not patched successfully. The original file has 64 mb while the patched one has only 30 mb. I've already pdated to Android 10. When I try to path the boot.img I get the following error: FAILED (remote: Not allowed to flash (bootb))
Could anyone please send me his patched boot.img? :)
Don't worry the new patched boot.img is 30mb, that's absolutely normal. Make sure you have unlocked your bootloader and that your phone's firmware matches the one you used to extract the boot.img. And also make sure your files are all in the same folder (adb and fastboot files + patched boot.img) and, most important of all, check if your platform tools (adb and fastboot) are up to date, then tell us if you managed to make it work.
 
Last edited:
  • Like
Reactions: Oberbergler

gmmurphy

Senior Member
Aug 3, 2010
54
2
0
If I updated via ota adb side load to 10. But used the boot.img from the factory image, would this explain why it did boot, however not one app would start. The system ui would then crash. Just trying to figure out where I screwed up. Thank you.
 

Oberbergler

Senior Member
May 26, 2015
207
46
0
Don't worry the new patched boot.img is 30mb, that's absolutely normal. Make sure you have unlocked your bootloader and that your phone's firmware matches the one you used to extract the boot.img. And also make sure your files are all in the same folder (adb and fastboot files + patched boot.img) and, most important of all, check if your platform tools (adb and fastboot) are up to date, then tell us if you managed to make it work.
Thanks man :) Everything was right but I forgot to update adb and fastboot. Now I have root :D
 

qtotter

Senior Member
Mar 13, 2006
698
66
0
Tokyo
i am not sure if my pixel 3 is really rooted. all the apps requiring root says they are granted root access, but, for example, i cannot modify system files with a root file manager at all unlike i could with android 9. how can i confirm it is surely rooted?
 

shrtrnd

Member
Nov 2, 2018
9
1
0
So I have a problem, maybe someone can help me with.
Back in March I made the following post:

"I was running on the original September Update since I got the phone, I used this guide when I first rooted https://www.xda-developers.com/googl...r-root-magisk/
Today I decided it was time to update so I used this guide https://www.xda-developers.com/flash...-google-pixel/
Then I wanted to reroot my phone. So I bootet the TWRP image and flashed the magisk 18.1 zip. But after that I softbricked my phone and it wouldn't boot anymore.
So in my panic I flashed the TWRP zip and my phone worked again, but now everytime I try to flash the magsik zip the same thing happens, bootloop and back to flashing twrp.zip. "

After that didn't work, I tried flashing the magisk uninstaller, through twrp, but it exited with "Error 1" everytime. (Running TWRP 3.3.0)

So i decided to give up, because I had some personal stuff to take care of, but after Android 10 came out yesterday, I decided to give this another go.

I flashed the factory image without "-w" and everything is working fine. So today I followed this guide, double checked everything but after I flash the patched boot image I get stuck with a bootloop again... I can flash back the original boot image and everything works so it's not a huge deal, but right now I can't use google pay, because it says I'm rooted.

Any idea what I could do? Can't run the uninstaller and can't reroot... ???

thanks!
 

shrtrnd

Member
Nov 2, 2018
9
1
0
Well it's the same one I used to flash the firmware.
I flashed yesterday without an issue and today I loaded that boot.img onto my phone, used the canary magisk manager to patch it and then transfered it back to my PC to flash it.

Edit: I'm thinking this might have to do with the fact that I couldn't uninstall magisk before.
 
Last edited:

GohanBurner

Senior Member
May 8, 2011
829
154
73
Waukesha, WI
I went back to Pie because Viper4Android doesn't work on 10. No matter what version. The Legacy version I usually use keeps asking me to install the driver like it had on previous phones when installs were borked.
 

acidspider

Senior Member
Dec 29, 2010
1,327
132
93
I went back to Pie because Viper4Android doesn't work on 10. No matter what version. The Legacy version I usually use keeps asking me to install the driver like it had on previous phones when installs were borked.
I had it working before I bodged a magisk module install
 

Lagarde

Senior Member
Oct 27, 2015
220
94
0
No luck here. The steps SEEM to work perfectly. Flashed the modified boot image, booted up fine, but magisk says it's still not installed. No root.
- Latest magisk canary
- Used the same firmware
- No errors anywhere along the way
 

rickthecabbie

Senior Member
Oct 30, 2008
90
32
0
Wilkesboro, Or.
Hey Mac users, I had to use the command fastboot flash boot_b magisk_patched.img
To get the patched image over to my phone. It worked out great. I was able to reboot,
and see the root in Magisk Manager.
YMMV
 

wokija

New member
Apr 28, 2018
1
0
0
Thanks, worked like a charm on Linux with latest platform-tools! I thought I'd have to wait a lot longer to get root back on my device.