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

schalacker

Member
Jul 18, 2018
12
8
0
I did a both slots Full flash (wiped) of dec images and I tried both canary release manager, Manager v7.4.0. Didn't work.
I was on a working rooted Nov. I did notice a lot more file structures being written during the Dec install. So I am guessing the different file structures will require some patience for Magisk Dev's to correct. Welcome to 10, it is a moving target.
Successfully updated 2xP3s with the Dec factory image. I was running MM 7.4.1 (260) and Magisk 20.2 (20108) with platform tools r29.0.5 when patching boot.img and updating. Updating from a rooted Nov package successfully updated with the same method.
 
  • Like
Reactions: kkjb

kkjb

Senior Member
May 3, 2017
329
111
26
"Sanity Check" so after full flash_Both slots_ Dec very last night---my excuse--- failed to get past red "?" on install button. Had not enabled wi-fi just tried root from first start up. So gave up and did "set up new device data transfer" and tried this morning. Of course it worked just like its supposed to. So ignore my mistake in previous post.
 

Incanity

Senior Member
Apr 17, 2008
216
67
28
IJmuiden
can't get it to work. Flashed the december update to both slots, and flashed a (tried both stable and canary) patched boot.img to the active slot. It still won't boot. It shows me a google logo and a moving bar beneath it, but I can't get it to boot any further.

Tried disabling all modules with the adb command 'adb wait-for-device shell magisk --remove-modules' but it didn't work either... Does anyone have any idea what's wrong here? There must be something I'm missing here... :|
 
  • Like
Reactions: smileguy91

alessandrocaputo13

Senior Member
Aug 21, 2012
321
169
0
Napoli
can't get it to work. Flashed the december update to both slots, and flashed a (tried both stable and canary) patched boot.img to the active slot. It still won't boot. It shows me a google logo and a moving bar beneath it, but I can't get it to boot any further.

Tried disabling all modules with the adb command 'adb wait-for-device shell magisk --remove-modules' but it didn't work either... Does anyone have any idea what's wrong here? There must be something I'm missing here... :|
Same thing is happening to me. I updated platform tools and tried with magisk stable and canary but after i flash the patched boot img file i get a bootloop :/
 
  • Like
Reactions: smileguy91

arby80

Senior Member
Nov 20, 2010
186
41
28
Tulsa has a magisk module disabler that will allow you to boot with root on the December build if you are getting a boot loop . He has one in the Pixel 3XL thread that worked for my Pixel 3.
 
  • Like
Reactions: Incanity

Incanity

Senior Member
Apr 17, 2008
216
67
28
IJmuiden
Tulsa has a magisk module disabler that will allow you to boot with root on the December build if you are getting a boot loop . He has one in the Pixel 3XL thread that worked for my Pixel 3.
great tip, thanks, I'll try! :)

EDIT: Worked! Booted into the patched boot.img from Tulsadiver's thread and after that booted into the magisk patched img (from the canary channel), installed magisk, all the modules and presto! I'm rooted again.

Thanks again for the tip!
 
Last edited:

Pete02

Senior Member
Dec 6, 2011
742
231
63
You were lucky. I followed the same guide and boot looped. I tried all the fixes I could find on XDA, and finally wound up wiping the phone. I haven't tried to re-root yet.
Well... I got lucky twice then cause I used the same guide on my bro's Pixel 2 and it worked just fine. (They're both Google unlocked phones. I'm not sure if that makes a difference.)
 

jd1639

Recognized Contributor
Sep 21, 2012
16,836
5,398
0
Minnesota
You were lucky. I followed the same guide and boot looped. I tried all the fixes I could find on XDA, and finally wound up wiping the phone. I haven't tried to re-root yet.
Dec is definitely rootable. The problem seems to be magisk modules you might have installed. Remove modules before you root and you shouldn't have any problems.
 
  • Like
Reactions: Pete02

ShadowJP88

Senior Member
May 5, 2015
79
9
28
Dec is definitely rootable. The problem seems to be magisk modules you might have installed. Remove modules before you root and you shouldn't have any problems.
I don't think it is related to modules. I've try from a brand new fresh installation of December Rom, with just magisk installed and nothing else. I've been stuck too...

I also try installing October, root, update and root again and stuck again.
Fastboot wrote something about the wrong boot image, even flashing the stock boot image and can't get my phone to open, needed to install the package from Google to made it work again.
At least, with -w remove, it was fine to boot.
 

AquilaDroid

Senior Member
Oct 11, 2012
675
626
123
Raleigh, NC
I missed the first step (Remove Magisk modules) when trying to take the December OTA and am stuck on an "Android Recovery" screen that says: "Cannot load Android system...". I haven't been able to find @Tulsadiver patched boot.img in his XDA Pixel 3XL thread other than one that's from July 15. Is that still the one to use? I didn't have any problems with this method when updating to the November OTA.
 

dcarvil

Senior Member
Apr 20, 2016
331
112
43
I missed the first step (Remove Magisk modules) when trying to take the December OTA and am stuck on an "Android Recovery" screen that says: "Cannot load Android system...". I haven't been able to find @Tulsadiver patched boot.img in his XDA Pixel 3XL thread other than one that's from July 15. Is that still the one to use? I didn't have any problems with this method when updating to the November OTA.

@Tulsadiver thread on this is at https://forum.xda-developers.com/pixel-3/themes/magisk-modules-disabler-booting-magisk-t3967433

Unfortunately, it did not fix my bootloop due to the December update - I had to wipe the phone twice to resolve it.
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
7,761
5,476
253
I missed the first step (Remove Magisk modules) when trying to take the December OTA and am stuck on an "Android Recovery" screen that says: "Cannot load Android system...". I haven't been able to find @Tulsadiver patched boot.img in his XDA Pixel 3XL thread other than one that's from July 15. Is that still the one to use? I didn't have any problems with this method when updating to the November OTA.
For December
https://www.androidfilehost.com/?fid=4349826312261654031
 
  • Like
Reactions: AquilaDroid

AquilaDroid

Senior Member
Oct 11, 2012
675
626
123
Raleigh, NC
Possibly screwed... Thanks for the link to the December boot.img, @Tulsadiver! I downloaded, flashed, and the phone came back up. However after re-installing a couple Magisk modules the phone rebooted and is stuck on the "Android Recovery" - Cannot load Android system. Your data may be corrupt...etc..... ...Factory data reset.... I tried to go back to flashing the factory image but that didn't fix it this time. Its flashing to Partition B, and I haven't found the magic command to flash to a specific partition. If anyone can look over this log from flashing and find an issue before I do the dreaded "Factory Data Reset" I'd be most grateful! (I'm still able to get into fastboot.)

PS C:\Users\aquil\Desktop\Platform Tools NEW\platform-tools> .\fastboot devices
89QX0DNUB fastboot
PS C:\Users\aquil\Desktop\Platform Tools NEW\platform-tools> .\flash-all
Sending 'bootloader_b' (8521 KB) OKAY [ 0.293s]
Writing 'bootloader_b' (bootloader) Flashing Pack version b1c1-0.2-5672671
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition table for Lun = 1
(bootloader) Flashing partition table for Lun = 2
(bootloader) Flashing partition table for Lun = 4
(bootloader) Flashing partition table for Lun = 5
(bootloader) Flashing partition msadp_b
(bootloader) Flashing partition xbl_b
(bootloader) Flashing partition xbl_config_b
(bootloader) Flashing partition aop_b
(bootloader) Flashing partition tz_b
(bootloader) Flashing partition hyp_b
(bootloader) Flashing partition abl_b
(bootloader) Flashing partition keymaster_b
(bootloader) Flashing partition cmnlib_b
(bootloader) Flashing partition cmnlib64_b
(bootloader) Flashing partition devcfg_b
(bootloader) Flashing partition qupfw_b
(bootloader) Flashing partition storsec_b
(bootloader) Flashing partition logfs
OKAY [ 0.527s]
Finished. Total time: 1.079s
Rebooting into bootloader OKAY [ 0.045s]
Finished. Total time: 0.053s
Sending 'radio_b' (71404 KB) OKAY [ 1.832s]
Writing 'radio_b' (bootloader) Flashing Pack version SSD:g845-00086-191011-B-5933466
(bootloader) Flashing partition modem_b
OKAY [ 0.401s]
Finished. Total time: 2.494s
Rebooting into bootloader OKAY [ 0.045s]
Finished. Total time: 0.055s
--------------------------------------------
Bootloader Version...: b1c1-0.2-5672671
Baseband Version.....: g845-00086-191011-B-5933466
Serial Number........: 89QX0DNUB
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product' OKAY [ 0.057s]
Checking 'version-bootloader' OKAY [ 0.051s]
Checking 'version-baseband' OKAY [ 0.041s]
Setting current slot to 'b' OKAY [ 0.078s]
extracting boot.img (64 MB) to disk... took 0.312s
archive does not contain 'boot.sig'
Sending 'boot_b' (65536 KB) OKAY [ 1.662s]
Writing 'boot_b' OKAY [ 0.310s]
extracting dtbo.img (8 MB) to disk... took 0.044s
archive does not contain 'dtbo.sig'
Sending 'dtbo_b' (8192 KB) OKAY [ 0.280s]
Writing 'dtbo_b' OKAY [ 0.074s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.001s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta_b' (4 KB) OKAY [ 0.112s]
Writing 'vbmeta_b' OKAY [ 0.045s]
archive does not contain 'vbmeta_system.img'
archive does not contain 'vendor_boot.img'
extracting super_empty.img (0 MB) to disk... took 0.002s
Rebooting into fastboot OKAY [ 0.053s]
< waiting for any device >
 

Tulsadiver

Recognized Contributor
Jul 11, 2013
7,761
5,476
253
Possibly screwed... Thanks for the link to the December boot.img, @Tulsadiver! I downloaded, flashed, and the phone came back up. However after re-installing a couple Magisk modules the phone rebooted and is stuck on the "Android Recovery" - Cannot load Android system. Your data may be corrupt...etc..... ...Factory data reset.... I tried to go back to flashing the factory image but that didn't fix it this time. Its flashing to Partition B, and I haven't found the magic command to flash to a specific partition. If anyone can look over this log from flashing and find an issue before I do the dreaded "Factory Data Reset" I'd be most grateful! (I'm still able to get into fastboot.)

PS C:\Users\aquil\Desktop\Platform Tools NEW\platform-tools> .\fastboot devices
89QX0DNUB fastboot
PS C:\Users\aquil\Desktop\Platform Tools NEW\platform-tools> .\flash-all
Sending 'bootloader_b' (8521 KB) OKAY [ 0.293s]
Writing 'bootloader_b' (bootloader) Flashing Pack version b1c1-0.2-5672671
(bootloader) Flashing partition table for Lun = 0
(bootloader) Flashing partition table for Lun = 1
(bootloader) Flashing partition table for Lun = 2
(bootloader) Flashing partition table for Lun = 4
(bootloader) Flashing partition table for Lun = 5
(bootloader) Flashing partition msadp_b
(bootloader) Flashing partition xbl_b
(bootloader) Flashing partition xbl_config_b
(bootloader) Flashing partition aop_b
(bootloader) Flashing partition tz_b
(bootloader) Flashing partition hyp_b
(bootloader) Flashing partition abl_b
(bootloader) Flashing partition keymaster_b
(bootloader) Flashing partition cmnlib_b
(bootloader) Flashing partition cmnlib64_b
(bootloader) Flashing partition devcfg_b
(bootloader) Flashing partition qupfw_b
(bootloader) Flashing partition storsec_b
(bootloader) Flashing partition logfs
OKAY [ 0.527s]
Finished. Total time: 1.079s
Rebooting into bootloader OKAY [ 0.045s]
Finished. Total time: 0.053s
Sending 'radio_b' (71404 KB) OKAY [ 1.832s]
Writing 'radio_b' (bootloader) Flashing Pack version SSD:g845-00086-191011-B-5933466
(bootloader) Flashing partition modem_b
OKAY [ 0.401s]
Finished. Total time: 2.494s
Rebooting into bootloader OKAY [ 0.045s]
Finished. Total time: 0.055s
--------------------------------------------
Bootloader Version...: b1c1-0.2-5672671
Baseband Version.....: g845-00086-191011-B-5933466
Serial Number........: 89QX0DNUB
--------------------------------------------
extracting android-info.txt (0 MB) to RAM...
Checking 'product' OKAY [ 0.057s]
Checking 'version-bootloader' OKAY [ 0.051s]
Checking 'version-baseband' OKAY [ 0.041s]
Setting current slot to 'b' OKAY [ 0.078s]
extracting boot.img (64 MB) to disk... took 0.312s
archive does not contain 'boot.sig'
Sending 'boot_b' (65536 KB) OKAY [ 1.662s]
Writing 'boot_b' OKAY [ 0.310s]
extracting dtbo.img (8 MB) to disk... took 0.044s
archive does not contain 'dtbo.sig'
Sending 'dtbo_b' (8192 KB) OKAY [ 0.280s]
Writing 'dtbo_b' OKAY [ 0.074s]
archive does not contain 'dt.img'
archive does not contain 'recovery.img'
extracting vbmeta.img (0 MB) to disk... took 0.001s
archive does not contain 'vbmeta.sig'
Sending 'vbmeta_b' (4 KB) OKAY [ 0.112s]
Writing 'vbmeta_b' OKAY [ 0.045s]
archive does not contain 'vbmeta_system.img'
archive does not contain 'vendor_boot.img'
extracting super_empty.img (0 MB) to disk... took 0.002s
Rebooting into fastboot OKAY [ 0.053s]
< waiting for any device >
Try booting this one

https://www.androidfilehost.com/?fid=4349826312261659814
 
  • Like
Reactions: AquilaDroid