Hi there,
I managed to patch the boot.img with Magisk 20.4 (20400).
Then I replaced the patched boot.img and updated to Android 11 with "flash_all.bat" method.
However, the phone did not boot until I flashed stock original boot.img from Android 11 system image.
Should I have used some beta "canary" version of Magisk?
Thank you for your help!
*** Solution
Install app-debug.apk from here https://github.com/topjohnwu/magisk_files/tree/canary
Enter new Magisk Manager and change to Canary channel in settings
Ensure you are using version 11f254e5 (20424), not the 20.4 (20400)
Patch your stock boot.img and transfer magisk_patched.img (33 734 656 bytes) to computer
adb reboot bootloader
fastboot getvar current-slot
//in my case slot b
fastboot flash boot_b magisk_patched.img
fastboot reboot
Same issue with 20.4 - I used the canary version (11f254e5) from Github and it seems to work now.
OMG!! I posted about 20 minutes later about the same issue, but I didn't solve it.
Thaks you so much, didn't know what I was doing wrong.
mulperi said:
Hi there,
*** Solution
Install app-debug.apk from here https://github.com/topjohnwu/magisk_files/tree/canary
Enter new Magisk Manager and change to Canary channel in settings
Ensure you are using version 11f254e5 (20424), not the 20.4 (20400)
Patch your stock boot.img and transfer magisk_patched.img (33 734 656 bytes) to computer
adb reboot bootloader
fastboot getvar current-slot
//in my case slot b
fastboot flash boot_b magisk_patched.img
fastboot reboot
Click to expand...
Click to collapse
It worked! :highfive:
After the third try...
Don't ask me why...
I can't find the option to patch the boot.img in the canary magisk. Does anyone know why?
jacopastorius said:
I can't find the option to patch the boot.img in the canary magisk. Does anyone know why?
Click to expand...
Click to collapse
Magisk Install -> Select and Patch a File
Confirmed working (2020-10-06)
Pixel3 factory image Oct 2020
Magisk Manager, canary channel, version 8dc62a02 (305) (11)
Summary of operations:
Extracted boot.img
copy it to the phone by `adb push ./boot.img /sdcard/Download/
Use Magisk Manager, Install, Select and Patch File (NOTE: the phone doesn't need to be rooted yet, I just install Magisk Manager and select Canary channel in settings)
after Magisk Manager has patched the boot.img, send it to the laptop by `adb pull /sdcard/Download/magisk_patched.img ~/Downloads/`
flash magisk_patched.img using fastboot as shown in 1st post
2LoT said:
Confirmed working (2020-10-06)
Pixel3 factory image Oct 2020
Magisk Manager, canary channel, version 8dc62a02 (305) (11)
Summary of operations:
Extracted boot.img
copy it to the phone by `adb push ./boot.img /sdcard/Download/
Use Magisk Manager, Install, Select and Patch File (NOTE: the phone doesn't need to be rooted yet, I just install Magisk Manager and select Canary channel in settings)
after Magisk Manager has patched the boot.img, send it to the laptop by `adb pull /sdcard/Download/magisk_patched.img ~/Downloads/`
flash magisk_patched.img using fastboot as shown in 1st post
Click to expand...
Click to collapse
Interesting to see it done oldschool with adb push/pull when it can be done in explorer ? still though, nice to see more evidence that it works fine on October update with Manager (305). I did it today and I worked first time - there's a poster in another thread who is having a bit of bother trying to get theirs rooted and it's keeping me awake at night as to why it hasn't worked for them ?
Good post ?
i using this method too for my android 9 but failed ..like this :
- Device platform: armeabi-v7a
- Copying image to cache
2026+0 records in
2026+0 records out
2074624 bytes transferred in 0.050 secs (41492480 bytes/sec)
1381+1 records in
1381+1 records out
1415016 bytes transferred in 0.034 secs (41618117 bytes/sec)
- Unpacking boot image
- Checking ramdisk status
- Stock boot image detected
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
PXA_BOOT_HDR
HEADER_VER [0]
KERNEL_SZ [11688867]
RAMDISK_SZ [3704362]
SECOND_SZ [2164261120]
EXTRA_SZ [134250976]
PAGESIZE [1347572498]
NAME [QC10A002KU]
CMDLINE [l androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3?���
]
CHECKSUM [e10f5c29e9fbffff8a066049e006d08de05e0100ebc4004fe2060080e000f0a0]
Segmentation fault
- Patching ramdisk
Add entry [init] (0750)
Patch with flag KEEPVERITY=[false] KEEPFORCEENCRYPT=[true]
Create directory [.backup] (0000)
Add entry [.backup/.magisk] (0000)
Dump cpio: [ramdisk.cpio]
Parsing boot image: [/data/user_de/0/com.topjohnwu.magisk/install/boot.img]
PXA_BOOT_HDR
HEADER_VER [0]
KERNEL_SZ [11688867]
RAMDISK_SZ [3704362]
SECOND_SZ [2164261120]
EXTRA_SZ [134250976]
PAGESIZE [1347572498]
NAME [QC10A002KU]
CMDLINE [l androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3?���
]
CHECKSUM [e10f5c29e9fbffff8a066049e006d08de05e0100ebc4004fe2060080e000f0a0]
Segmentation fault
- Repacking boot image
! Unable to repack boot image!
! Installation failed
Click to expand...
Click to collapse
please guide to solve this problem..thanks
this solved it for my device as well (not a pixel but a kospet prime 2)
Thanks for this!
Worked for me today:
sargo-rq1a.210105.002
magisk -v
f5593e05:MAGISK
Hi I get this error:
Code:
fastboot getvar current-slot
getvar:current-slot FAILED (remote: GetVar Variable Not found)
finished. total time: 0.002s
Is anyone able to get root to work on the Feb 2021 factory image? Flashing the patched boot image doesn't take any effect in Magisk at all, and I do not have root access. I've tried both official and canary builds.
dunderball said:
Is anyone able to get root to work on the Feb 2021 factory image? Flashing the patched boot image doesn't take any effect in Magisk at all, and I do not have root access. I've tried both official and canary builds.
Click to expand...
Click to collapse
Yes, works perfectly as with every other monthly update. I'm on 21.4 Magisk and 8.0.7 Manager.
dunderball said:
Is anyone able to get root to work on the Feb 2021 factory image? Flashing the patched boot image doesn't take any effect in Magisk at all, and I do not have root access. I've tried both official and canary builds.
Click to expand...
Click to collapse
I´m with the same issue, did you fixed it?
Hi All,
Just wanted to tell that CANARY version will patch boot image fine for ANDROID 11.
For ANDROID 11 , STABLE version caused me the bootloop on LG device. But CANARY version patched image worked great.
Have a great time.!!
does this should work on april update? I've a pixel3aXL, I had to flash manually the last factory image, everything works but can't make magisk to work anymore. tryed the canary channel, Magisk-9c0e1897(22007).apk but any time I try to patch the boot.img, then I got stuck on the no bootable slot message and have to reflash the stock one.
This is how I do it now every month, April included.
1. Download latest image (not just OTA) for your phone from here, about 1,7 Gbytes
Factory Images for Nexus and Pixel Devices | Google Play services | Google for Developers
developers.google.com
2. Extract boot.img from the zip inside the big zip.
3. Transfer the boot.img to phone and patch it using Magisk app. (=old Magisk Manager). After patch is done in phone, copy magisk-patched-boot.img back to PC.
4. Edit on PC the flash-all.bat file and remove the -w flag from the end command. This prevents your device from being wiped. Save the edited bat file.
5. Now remove all Magisk addons. Systemless may stay. Also turn off Magisk hide, because new Magisk app recommends that.
6. Connect phone and put it in fastboot mode. Flash the new image with modified batch file. Flashing takes about 2 minutes and after reboot the G logo will be going on for at least 3 minutes, be patient.
c:\...\adb reboot fastboot
c:\...\flash-all.bat
7. After phone is updated and root is lost, flash the magisk_patched_boot.img in correct slot. In my case it was slot "b".
c:\...\adb reboot bootloader
c:\...\fastboot getvar current-slot
c:\...\fastboot flash boot_b magisk_patched_boot.img
c:\...\fastboot reboot
DONE.
If for some strange reason your phone would bootloop
- hold down power to reboot
- press power to pause
- volume up + power to get to bootloader mode
- flash stock boot.img
im getting this pls help
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
.
Related
I found linuxct's guide (Link: https://forum.xda-developers.com/razer-phone/how-to/treble-install-generic-image-gsi-razer-t3770684) need to be modified to get 9.0 GSI working (at least in my circumstance). I haven't tried any Oreo Gsi but to my case, I can't properly booted to 9.0 Gsi by following exactly to this guide. That's why I want to write my own processes of getting it works. Hope it's useful to some of you.
0) I strongly recommend you to flash back to stock image from razer, if you have messed up with the partitions. !!THIS WIPES YOUR DATA, PLEASE BACKUP THE INTERNAL STORAGE!!
Code:
(Link: https://s3.amazonaws.com/cheryl-factory-images/cheryl-o-global-6033.zip)
After flashing to stock, it should automatically reboot into the system.
/*To your convenience, please put all the required file under the adb tool folder*/
1) Enable USB debugging, reboot to bootloader by command:
Code:
adb reboot bootloader
2) Flash the prebuild boot image in linuxct's guide by command:
Code:
fastboot flash boot_a boot_linuxct_20180420_cheryl_omr0.img
(Link is mentioned above)
This boot image has TWRP and Magisk built in.
3) Reboot into TWRP by command:
Code:
fastboot reboot
4) In TWRP, tap Wipe and do a factory wipe. DON'T CHANGE THE DEFAULT WIPE SETTINGS.
5) Flash the GSI you have, then reboot to bootloader.
6) Extract and copy the stock boot image from Razer to the adb tool folder, and flash the boot.img by command:
Code:
fastboot flash boot_a boot.img
7) Reboot to the stock recovery, and do factory wipe, then reboot to bootloader.
This will decrypt the /data. (I am not sure why if I do it under TWRP, I can never boot into system, but that's the case.)
8) Flash the prebuilt image from linuxct again by command:
Code:
fastboot flash boot_a boot_linuxct_20180420_cheryl_omr0.img
9) Reboot to the system by command:
Code:
fastboot reboot
And whola, you should be able to boot into system without any decryption message. And you will have a partially functional TWRP.
If you need to flash any other GSI next time, you should first copy the GSI image through MTP in system. Because the TWRP doesn't support adb command and can't be mounted as MTP.
Once you have copied the GSI image, you can reboot into TWRP and flash image as usual.
Here are the photos proving this works. I flashed Pixel Dust first through the command and booted. Then I reboot into TWRP and flashed PixelExperience through TWRP and get it booted.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Can't image I figured out to flash the second system_b so quickly lol.
0) In system_a, reboot to bootloader by command: adb reboot bootloader
1) Flash the GSI you have to system_b: fastboot flash system_b [The GSI you have]
2) Flash the stock boot image to boot_b: fastboot flash boot_b boot.img
3) Set active partition to B: fastboot --set-active=b
This is where I found linuxct's guide tricky because it should be 'b'.
'_b' doesn't work.
4) Reboot to stock recovery: fastboot reboot
5) Do a factory wipe, then go back to bootloader
6) Flash the prebuilt image to boot_b: fastboot flash boot_b boot_linuxct_20180420_cheryl_omr0.img
7) Reboot to the recovery: fastboot reboot
And it will brings you to TWRP on B partition, and you can reboot to system_b now.
And whola, and now you can have both AB system with different GSI. And you can switch to any partition by going to TWRP on either partition and switch as you like!
Here are the photos proving I have Pixel Experience and Pixel Dust working seperately on two partitions.
I also found that the prebuilt boot image from linuxct is breaking the wifi. Till now, you should have the TWRP patched boot image on both AB partition. So fixing that is pretty straightfoward.
1) Copy the stock boot image and TWRP installer zip to your phone in system.
Link: https://dl.twrp.me/cheryl/
I used the 3.2.1 version.
2) Boot into TWRP by command: adb reboot recovery
3) Flash stock boot.img on both A/B partition.
You can do this by first flash it to Slot A, and switch to B in TWRP. NO NEED TO REBOOT, SIMPLY SWITCH SLOT IN TWRP!!
4) Flash the twrp zip file.
This should fix your wifi.
DON'T FLASH MAGISK! I found flashing even the latest magisk v18.0 breaks wifi again.
So could you have stock on slot a and another GSI on slot b?
Magisk still breaking WiFi and 4g? I played around with 9.0 gsi's ages ago and that was the only thing stopping me from using it. Have anyone tried the latest canary builds of magisk also?
askylitangel said:
So could you have stock on slot a and another GSI on slot b?
Click to expand...
Click to collapse
Since A/B systems are using a common /data partition, I think you can at most flash an 8.1 Oreo on another slot because the stock image is 8.1. And this breaks the OTA of stock, so pretty meaningless.
It worked for me following the guide unfortunately had to go back to stock (no WiFi) shame was looking good too thanks for the guide though helped at least getting system up and booting
parky169 said:
It worked for me following the guide unfortunately had to go back to stock (no WiFi) shame was looking good too thanks for the guide though helped at least getting system up and booting
Click to expand...
Click to collapse
Follow the guide on #4, it will certainly fix Wi-Fi.
Followed must of the guide except just on partition a all worked nice
Thanks a lot.had no issues installing magisk either
Any of these ROMS run at the full 120hz? So far I've tried 3 and the seem to run even lower than 60hz.
BoostRoid said:
Any of these ROMS run at the full 120hz? So far I've tried 3 and the seem to run even lower than 60hz.
Click to expand...
Click to collapse
Pixel Experience, Pixel Dust, Aosp extended 6.1
BoostRoid said:
Any of these ROMS run at the full 120hz? So far I've tried 3 and the seem to run even lower than 60hz.
Click to expand...
Click to collapse
Reboot after first boot fixes it.
parky169 said:
Followed must of the guide except just on partition a all worked nice
Thanks a lot.had no issues installing magisk either
Click to expand...
Click to collapse
To clarify, you only installed on partition A, and installed magisk without breaking wifi?
Apologies for not clearing one thing up,I installed android 8.1 and it all
Worked I didn't realize at first it was android 9 that was having WiFi breaking,I haven't tried that one yet.sorry if I was misleading anyone
With my post.
All I had to do was flash the GSI image via fastboot and that seemed to work fine with no other flashing needed
What gsi ROM did you flash? And have you flashed magisk on it ?.
HO-COOH said:
I also found that the prebuilt boot image from linuxct is breaking the wifi.
Click to expand...
Click to collapse
Using an MR0 image on MR3 is not recommended, and using Magisk will break RIL (data connectivity) and WiFi.
If you want to run Pie GSIs, forget about using Magisk and run phh-su. Lastly, if you want your front camera and Bluetooth A2DP to work, use latest phh-gsi image v109. Using older versions than v108 is discouraged for breaking the mentioned.
Current status:
1. Cheryl specific overlays are not yet merged into phh source code because I'm a lazy assh*le. If you want your device to have Adaptive brightness, gestures, and fix the strong vibration, place the following apk inside /system/overlay or /vendor/overylay
2. Razer Power Service and NFC are faulty and will spam your logcat, which may, in the end, reduce your battery life. You need to extract [email protected] from both /system/lib and /system/lib64 from Razer's stock ROM and place them respectively into /vendor/lib and lib64. I've conveniently extracted them for you (Folder named 32's file should be extracted onto /vendor/lib and folder named 64's file should be extracted onto /vendor/lib64).
To kill NFC until we find a proper solution, go into your GSI's filesystem path /system/app/NfcNci and delete or change NfcNci.apk's filename into anything else, like NfcNci.bak.
3. Common to MSM8998, and I believe several other Qcomm based smartphones, Bluetooth In-Call audio is not working, and audio gets redirected to Earpiece.
4. Everything. Else. Works.
Please thank @phhusson for his amazing job in this project!
---------- Post added at 09:16 ---------- Previous post was at 09:13 ----------
As an extra, if you would like to erase your data/userdata partition without messing up with recoveries, you could just issue the following fastboot command:
Code:
fastboot format:ext4:0xc72dd3000 userdata
Where 0xc72dd3000 is the userdata partition size with FBE enabled.
If you are running a bootimage without FBE, the partition size might be 0xC72DD7000, so the command would be:
Code:
fastboot format:ext4:0xC72DD7000 userdata
--------------------
As a result, a summary of OP would be:
0. Flash latest cheryl fastboot image just like explained in OP.
1. Download the Android 9.0 GSI of your preference.
2. Reboot into fastboot.
3. Wipe your userdata partition with:
Code:
fastboot format:ext4:0xc72dd3000 userdata
4. Flash the system image you downloaded with:
Code:
fastboot flash system IMAGENAME.img
Where IMAGENAME goes your system image name. In our bootloader, you don't need to specify the partition you want to flash, and fastboot flashing into just "system" will flash the current slot.
5. Follow the steps from 1 and 2 from the Current status section above to get all the perks to work.
Tried multiple android 9 GSI roms and some boots but no wifi and data (some don't even boot).
Wifi fix (works on Arrow OS) on post #4 doesn't work. After flashing twrp 3.2.1.0, the phone does not boot on any android 9 GSI roms. Anyway thanks for your work trying to make GSI work on Razer phone.
Hello, I followed your instructions in post 4 to the letter, I've got 4g but no wifi. Any ideas what I'm doing wrong?
Or do I have to install Android 11 for the updates to work?
Google does not release security updates for both Android 10 and 11. The last Android 10 update was Aug 2020.
A custom ROM could presumably backport security fixes to older Android releases. I do not know if that actually happens.
a1291762 said:
Google does not release security updates for both Android 10 and 11. The last Android 10 update was Aug 2020.
A custom ROM could presumably backport security fixes to older Android releases. I do not know if that actually happens.
Click to expand...
Click to collapse
And how does one install the September update on Stock w/o losing Magisk root? Is there a walkthrough?
amphi66 said:
And how does one install the September update on Stock w/o losing Magisk root? Is there a walkthrough?
Click to expand...
Click to collapse
Yes, there are multiple guides.
What I do (summarised) is
1 download the factory image
2 extract it and the embedded zip until you have boot.img
3 send that to the phone and use Magisk manager to patch it. Send it back to the pc
4 replace the -w in the flash_all script with --skip-reboot. Add these 3 extra lines to the end.
fastboot reboot-bootloader
sleep 5
fastboot boot patched.img
5 run the script
6 use Magisk manager to install (direct)
I haven't installed September's update yet. Didn't realize it was out.
a1291762 said:
4 replace the -w in the flash_all script with --skip-reboot. Add these 2 extra lines to the end.
fastboot reboot-bootloader
fastboot boot patched.img
5 run the script
6 use Magisk manager to install (direct)
I haven't installed September's update yet. Didn't realize it was out.
Click to expand...
Click to collapse
Thanks, John.. . . . ..
I extracted and used Magisk to patch the stock Sept boot.img, but am uncertain about the "Flash_all" script. Are you using that rather than separately flash the separate commands:
fastboot reboot-bootloader
fastboot boot patched.img ?
I was thinking of these steps, but am new to the 4a:
adb reboot bootloader
fastboot erase boot (this step is uncecessary?)
fastboot flash boot magisk_patched_boot.img (the Masisk file patched from the Sept update
fastboot continue (to reboot the phone)
amphi66 said:
I extracted and used Magisk to patch the stock Sept boot.img, but am uncertain about the "Flash_all" script. Are you using that rather than separately flash the separate commands:
fastboot reboot-bootloader
fastboot boot patched.img ?
Click to expand...
Click to collapse
Since you can't get the (small) OTA, you have to install everything. That's what the flash_all script does. There's one for Windows and one for Linux/Mac.
Removing -w stops it from wiping user data.
Adding --skip-reboot and the other 3 lines will boot the patched image rather than the vanilla image, then you can flash from Magisk Manager.
Like I said, there's many ways to do this. Somep people use the full OTA image. Some people flash the patched image from fastboot rather than Magisk manager. Some people use TWRP.
a1291762 said:
Since you can't get the (small) OTA, you have to install everything. That's what the flash_all script does. There's one for Windows and one for Linux/Mac.
Removing -w stops it from wiping user data.
Adding --skip-reboot and the other 3 lines will boot the patched image rather than the vanilla image, then you can flash from Magisk Manager.
Like I said, there's many ways to do this. Somep people use the full OTA image. Some people flash the patched image from fastboot rather than Magisk manager. Some people use TWRP.
Click to expand...
Click to collapse
This process is beginning to make sense to my thick skull .. .. one more question: you are replacing -w with --skip-reboot .... the double dashes are correct syntax for the replacement?
amphi66 said:
You use the term "everything", but we are dealing with only the patched boot.img, correct?
Click to expand...
Click to collapse
No. How are you hoping to install the September update by only flashing boot.img?
If you already have a given release installed then you only need to patch that release's boot.img and flash it to get root.
a1291762 said:
No. How are you hoping to install the September update by only flashing boot.img?
If you already have a given release installed then you only need to patch that release's boot.img and flash it to get root.
Click to expand...
Click to collapse
Got it, didn't seem to make sense. Thanks. Was the --skip-reboot (double dash) correct syntax?
amphi66 said:
Got it, didn't seem to make sense. Thanks. Was the --skip-reboot (double dash) correct syntax?
Click to expand...
Click to collapse
Yes. Without --skip-reboot the phone will boot into the stock image. If you don't want that, you need to stop it and boot the patcheys image instead. That's what the last 3 lines do. Boot the patched image.
a1291762 said:
Yes. Without --skip-reboot the phone will boot into the stock image. If you don't want that, you need to stop it and boot the patcheys image instead. That's what the last 3 lines do. Boot the patched image.
Click to expand...
Click to collapse
Thanks. Just wanted to verify that the (double dash) skip was the correct replacement for the (single dash) w. Ready to take the plunge!
@a1291762
one last (paranoid) check: does the following look like a properly modified flash-all.bat?
PATH=%PATH%;"%SYSTEMROOT%\System32"
fastboot flash bootloader bootloader-sunfish-s5-0.3-7357976.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot flash radio radio-sunfish-g7150-00047-210319-b-7220401.img
fastboot reboot-bootloader
ping -n 5 127.0.0.1 >nul
fastboot --skip-reboot update image-sunfish-rq3a.210905.001.zip
fastboot reboot-bootloader
sleep 5
fastboot boot patched.img
echo Press any key to exit...
pause >nul
exit
Thanks, John!
amphi66 said:
@a1291762
one last (paranoid) check: does the following look like a properly modified flash-all.bat?
Click to expand...
Click to collapse
Your patched image is called patched.img right? If not, rename it (or change the script).
I don't use windows... Looks like it's got a different "wait for 5 seconds" thing? (The ping lines). Copy one of those instead of the sleep.
Thanks. I appreciate the handholding, 1st time w/ a Pixel 4a. I suspect the eventiual upgrade to Android 12 will be similar, but slightly different. I do miss the old TWRP days!
a1291762 said:
Your patched image is called patched.img right? If not, rename it (or change the script).
I don't use windows... Looks like it's got a different "wait for 5 seconds" thing? (The ping lines). Copy one of those instead of the sleep.
Click to expand...
Click to collapse
Unfortunately, I am back. The .bat file seemed to run OK -- there were a couple of "missing" notes, but no real problem. The phone has rebooted properly, but under System Update it still shows August 5, 2021 security update. I have attached a screen shot of part of the process. Any ideas? Thanks
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I didn't edit the image file at all, below are the contents:
amphi66 said:
Unfortunately, I am back. The .bat file seemed to run OK -- there were a couple of "missing" notes, but no real problem. The phone has rebooted properly, but under System Update it still shows August 5, 2021 security update. I have attached a screen shot of part of the process. Any ideas?
Click to expand...
Click to collapse
The screenshot shows the beginning, but it's the end that is most likely to show useful messages...
All I can do is guess... I guess the phone installed, failed to boot and went back to the original slot. Or it just failed to install, causing it to boot up the old slot.
You can verify the booted system like this:
Settings -> About -> Build Number
Build number was 210805 confirming the Security Patch date. I we t through the process again w/ same results, then redownloaded the factory image again in case that was an issue.
This time it all ran thru w/o any errors until the final command: reporting "partition not found" when trying to flash the magisk-patched image file. I notice that command is "fastboot flash boot" where the very first command is "fastboot flash bootloader" does that make a difference?
Phone rebooted OK, but remaining on August update.
Updated my Platform tools (I had and older ADB) and this time all ran w/o error, but phone still remains on August Update. .. .. .. ..
------------------------------------------
Got it! Turns out after removing the -w, the --skip-reboot must follow the update command, not simply replacing the -w. Perhaps a "feature" of the Windows batch file vs the Linux .sh?
Thank you again for your guidance. It is helpful to have an understanding of what is going on
amphi66 said:
Got it! Turns out after removing the -w, the --skip-reboot must follow the update command, not simply replacing the -w. Perhaps a "feature" of the Windows batch file vs the Linux .sh?
Click to expand...
Click to collapse
Huh. That's interesting. I replaced the -w (I use macOS) and it worked fine. It could well be that the windows tools expect the args to be in a different order.
Glad to hear you got it working though
R
a1291762 said:
Huh. That's interesting. I replaced the -w (I use macOS) and it worked fine. It could well be that the windows tools expect the args to be in a different order.
Glad to hear you got it working though
Click to expand...
Click to collapse
Actually ran it w/o the --skip-reboot altogether and then manually rebooted to bootloader to flash the modified boot. I found that change of order on a web post & will give it a try for the Android 12 update next month. Thanks again.
If you are looking for my guide on a different Pixel, find it here:
Pixel 3
Pixel 3XL
Pixel 3a
Pixel 3aXL
Pixel 4
Pixel 4XL
Pixel 4a
Pixel 4a (5G)
Pixel 5a
Pixel 6
Pixel 6 Pro
For best results, use the latest stable Magisk release.
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
USB Debugging enabled
Google USB Driver installed
I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
Spoiler: Downloads
Pixel OTA Images
Pixel Factory Images
Magisk Stable, Magisk Canary - Magisk GitHub
Spoiler: Unlock Bootloader
Follow these instructions to enable Developer Options and USB Debugging.
Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
Connect your device to your PC, and open a command window in your Platform Tools folder.
Ensure ADB sees your device:
Code:
adb devices
If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go.
Reboot to bootloader:
Code:
adb reboot bootloader
Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
Select Continue on the device screen.
Spoiler: Initial Root / Create Master Root Image
Install Magisk on your device.
Download the factory zip for your build.
Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
Copy boot.img to your device.
Patch boot.img with Magisk: "Install" > "Select and Patch a File"
Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
Reboot your device to bootloader.
Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
Spoiler: Update and Root Automatic OTA
Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
You should now be updated with root.
Spoiler: Update and Root OTA Sideload
Download the OTA.
Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Once in recovery:
Code:
adb sideload ota.zip
When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.
Spoiler: Update and Root Factory Image
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
Download the factory zip and extract the contents.
Reboot to bootloader.
Spoiler: Update bootloader if necessary
Compare bootloader versions between phone screen and bootloader.img build number
Code:
fastboot flash bootloader <drag and drop new bootloader.img here>
If bootloader is updated, reboot to bootloader.
Spoiler: Update radio if necessary
Compare baseband versions between phone screen and radio.img build number
Code:
fastboot flash radio <drag and drop radio.img here>
If radio is updated, reboot to bootloader.
Apply update:
Code:
fastboot update --skip-reboot image-codename-buildnumber.zip
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
Spoiler: Update and Root using PixelFlasher <<RECOMMENDED FOR NOVICES>>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
Spoiler: Update and Root using the Android Flash Tool
Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Spoiler: Pass SafetyNet/Play Integrity
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
Google Play Store
GPay
Any banking/financial apps
Any DRM media apps
Modules:
Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check SafetyNet status:
YASNAC - GitHub
To check Play Integrity status:
Play Integrity Checker - NOTE: MEETS_STRONG_INTEGRITY will ALWAYS fail on an unlocked bootloader.
I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.
Points of note:
The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
"App" simply shows the version of the app itself.
If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
V0latyle said:
As many of you know by now, in order to run a patched boot image on Android 12 requires disabling Android Boot Verification.
On Android 12, disabling verity and verification will require a data wipe if it hasn't been done before. What seems to "lock" the state of boot verification is booting into system; so, if you perform an update, or flash vbmeta without the disable flags, then reboot into Android, you have essentially enabled boot verification and will require a wipe to disable it again. Confusing, I know.
Here is the appropriate update process. DO NOT take the automatic OTA if you are rooted. If you allow the phone to reboot after an update without disabling boot verification, you will have to wipe in order to disable it again, as you would need to for a patched boot image.
***Note***: The boot image doesn't have to be patched before you perform the update. Some have found it works better to update, THEN patch the boot image.
OTA Sideload:
1. Download both the OTA and the factory zip.
2. Extract vbmeta.img and boot.img from the factory zip.
3. Patch the boot image and copy it back to your computer.
4. Reboot to recovery and sideload the OTA: select Apply Update via ADB, then on your PC:
Code:
adb sideload ota.zip
5. When the OTA completes, you will be in recovery mode. DO NOT REBOOT TO SYSTEM. Select "Reboot to bootloader".
6. Reflash vbmeta to disable boot verification:
Code:
fastboot flash vbmeta --disable-verity --disable-verification --slot=all vbmeta.img
7. Flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
8. Reboot to system.
Factory update:
1. Download the factory zip.
2. Extract boot.img
3. Patch the boot image and copy it back to your computer.
4. Reboot to bootloader.
5. Apply update:
Code:
fastboot update --disable-verity --disable-verification --skip-reboot image-codename-buildnumber.zip
6. Flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
7. Reboot to system.
Android Flash Tool:
1. Download the factory zip.
2. Extract boot.img
3. Patch the boot image and copy it back to your computer.
4. Reboot to bootloader.
5. Follow the instructions on the Android Flash Tool to update your device. The ONLY boxes you should check are "Disable Verity" and "Disable Verification"
6. When the update completes, the phone will reboot to system without root.
7. Reboot to bootloader and flash patched boot image:
Code:
fastboot flash boot --slot=all magisk_patched-23xxx_xxxxx.img
8. Reboot to system.
REMEMBER: The most critical part of this is making sure verity and verification are disabled during the update process before the phone reboots. If you forget to patch the boot image, that's OK - you don't have to flash /boot right after update.
If you have trouble with the patched boot image, simply flash /boot back to stock and allow Android to boot, then re-patch and re-flash the boot image.
You can also, if you want, boot the patched image instead of flashing it:
Code:
fastboot boot magisk_patched-23xxx_xxxxx.img
This is considered "temporary boot" as it loads the image from your PC rather than from device storage. You can use this to confirm root works, and if you so desire, you can then perform Direct Install in Magisk.
Click to expand...
Click to collapse
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
@V0latyle can you link me to a web page that would list every adb and fastboot command that we as android modders would use. What I mean is I couldn't find a Google search that listed the fastboot command with --slot=all among other adb and fastboot commands
Krsmqn said:
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
Click to expand...
Click to collapse
I agree with @Krsmqn, @V0latyle THANK YOU FOR YOUR SERVICE !!!!! in the military and for your service in the xda community
I used the Android Flash Tool method to update to the November build, and followed the instructions precisely. It worked flawlessly. My deny list is exactly the same in Magisk, and all my modules are working perfectly. I didn't even have to disable them. I think I will use this method from now on.
Krsmqn said:
You Sir are all over these forums spreading helpful advice, and knowledge. I would just like to say Thank You for all you do here. It's so greatly appreciated. You are one of the many people who make this place so special.
Also, Thank You for your service to our country.
Click to expand...
Click to collapse
elong7681 said:
I agree with @Krsmqn, @V0latyle THANK YOU FOR YOUR SERVICE !!!!! in the military and for your service in the xda community
Click to expand...
Click to collapse
Thanks guys, I appreciate it.
elong7681 said:
@V0latyle can you link me to a web page that would list every adb and fastboot command that we as android modders would use. What I mean is I couldn't find a Google search that listed the fastboot command with --slot=all among other adb and fastboot commands
Click to expand...
Click to collapse
Boy, I wish I had that handy, because I could sure use it too! I don't have your answer but hopefully someone else does, because believe me I'll be bookmarking it!
Will this work on Android Pixel 5a?
Rafiul Bari Chowdhury said:
Will this work on Android Pixel 5a?
Click to expand...
Click to collapse
Yes. The root process is exactly the same for the 4a 5g, 5, and 5a. The update process is the same across all Pixel devices.
I patched the boot.img. Magisk 23 did not report errors. But size of the patched file is zero. This looks not promising...
nostromo12 said:
I patched the boot.img. Magisk 23 did not report errors. But size of the patched file is zero. This looks not promising...
Click to expand...
Click to collapse
What version of Magisk did you use?
The stabil one
Will this work on Android Pixel 5a?
V0latyle said:
Yes. The root process is exactly the same for the 4a 5g, 5, and 5a. The update process is the same across all Pixel devices.
Click to expand...
Click to collapse
Okay. But Should I Remove Magisk Fully before upgrading through ADB/Fastboot/AFT?
H,
I'm on Android 11 pixel 5, can I use this tutorial ?
I think it's safer to unroot/remove Magisk and modules when going from 11 to 12 right? Some modules might not be compatible with 12 causing bootloops.
thecompany said:
I think it's safer to unroot/remove Magisk and modules when going from 11 to 12 right? Some modules might not be compatible with 12 causing bootloops.
Click to expand...
Click to collapse
You're going to have to wipe /data anyway if you intend to root on Android 12. Unless you're willing to try an idea I have.
Thanks V0latyle !!
I follow the flash tool method for update from october to november on my pixel 5
Perfect update, no issues and all data ok
nico22320 said:
Thanks V0latyle !!
I follow the flash tool method for update from october to november on my pixel 5
Perfect update, no issues and all data ok
Click to expand...
Click to collapse
Did you use Magisk canary? It is not necessary to check wipe in the android flash tool?
I use standard Magisk and can not change the update path to canary
nostromo12 said:
Did you use Magisk canary? It is not necessary to check wipe in the android flash tool?
I use standard Magisk and can not change the update path to canary
Click to expand...
Click to collapse
No i use the beta version of magisk.
You need wipe only for update from Android 11 to Android 12.
Just follow the guide for update to november and enjoy
nico22320 said:
No i use the beta version of magisk.
You need wipe only for update from Android 11 to Android 12.
Just follow the guide for update to november and enjoy
Click to expand...
Click to collapse
I want to upgrade from 11 (oktober) to 12
In the first message from this thread concerning the flash tool there was no wipe mentioned.
I want to update keeping my data ! How to proceed?
The best way: save yours photos etc with your Google account and make a fresh install with Factory image on Android 12 ( with disable verity and vérification)
It's long for set up device but 100% of chance of work with no issues for futurs update
Sûre you Can try to update without wipe and disable verity and vérification but maybe bootloops or not
If you are looking for my guide on a different Pixel, find it here:
Pixel 3
Pixel 3a
Pixel 3aXL
Pixel 4
Pixel 4XL
Pixel 4a
Pixel 4a (5G)
Pixel 5
Pixel 5a
Pixel 6
Pixel 6 Pro
For best results, use the latest stable Magisk release.
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
USB Debugging enabled
Google USB Driver installed
I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
Spoiler: Downloads
Pixel OTA Images
Pixel Factory Images
Magisk Stable, Magisk Canary - Magisk GitHub
Spoiler: Unlock Bootloader
Follow these instructions to enable Developer Options and USB Debugging.
Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
Connect your device to your PC, and open a command window in your Platform Tools folder.
Ensure ADB sees your device:
Code:
adb devices
If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go.
Reboot to bootloader:
Code:
adb reboot bootloader
Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
Select Continue on the device screen.
Spoiler: Initial Root / Create Master Root Image
Install Magisk on your device.
Download the factory zip for your build.
Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
Copy boot.img to your device.
Patch boot.img with Magisk: "Install" > "Select and Patch a File"
Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
Reboot your device to bootloader.
Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
Spoiler: Update and Root Automatic OTA
Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
You should now be updated with root.
Spoiler: Update and Root OTA Sideload
Download the OTA.
Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Once in recovery:
Code:
adb sideload ota.zip
When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.
Spoiler: Update and Root Factory Image
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
Download the factory zip and extract the contents.
Reboot to bootloader.
Spoiler: Update bootloader if necessary
Compare bootloader versions between phone screen and bootloader.img build number
Code:
fastboot flash bootloader <drag and drop new bootloader.img here>
If bootloader is updated, reboot to bootloader.
Spoiler: Update radio if necessary
Compare baseband versions between phone screen and radio.img build number
Code:
fastboot flash radio <drag and drop radio.img here>
If radio is updated, reboot to bootloader.
Apply update:
Code:
fastboot update --skip-reboot image-codename-buildnumber.zip
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
Spoiler: Update and Root using PixelFlasher <<RECOMMENDED FOR NOVICES>>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
Spoiler: Update and Root using the Android Flash Tool
Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Spoiler: Pass SafetyNet/Play Integrity
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
Google Play Store
GPay
Any banking/financial apps
Any DRM media apps
Modules:
Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check SafetyNet status:
YASNAC - GitHub
To check Play Integrity status:
Play Integrity Checker - NOTE: MEETS_STRONG_INTEGRITY will ALWAYS fail on an unlocked bootloader.
I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.
Points of note:
The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
"App" simply shows the version of the app itself.
If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
If you are looking for my guide on a different Pixel, find it here:
Pixel 3
Pixel 3XL
Pixel 3a
Pixel 3aXL
Pixel 4
Pixel 4a
Pixel 4a (5G)
Pixel 5
Pixel 5a
Pixel 6
Pixel 6 Pro
For best results, use the latest stable Magisk release.
Discussion thread for migration to 24.0+.
Note: Magisk prior to Canary 23016 does not incorporate the necessary fixes for Android 12+.
WARNING: YOU AND YOU ALONE ARE RESPONSIBLE FOR ANYTHING THAT HAPPENS TO YOUR DEVICE. THIS GUIDE IS WRITTEN WITH THE EXPRESS ASSUMPTION THAT YOU ARE FAMILIAR WITH ADB, MAGISK, ANDROID, AND ROOT. IT IS YOUR RESPONSIBILITY TO ENSURE YOU KNOW WHAT YOU ARE DOING.
Prerequisites:
Latest SDK Platform Tools - if Platform Tools is out of date, you WILL run into problems!
USB Debugging enabled
Google USB Driver installed
I recommend using Command Prompt for these instructions; some users have difficulty with PowerShell.
Make sure the Command Prompt is running from your Platform Tools directory!
Android Source - Setting up a device for development
Spoiler: Downloads
Pixel OTA Images
Pixel Factory Images
Magisk Stable, Magisk Canary - Magisk GitHub
Spoiler: Unlock Bootloader
Follow these instructions to enable Developer Options and USB Debugging.
Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
Connect your device to your PC, and open a command window in your Platform Tools folder.
Ensure ADB sees your device:
Code:
adb devices
If you don't see a device, make sure USB Debugging is enabled, reconnect the USB cable, or try a different USB cable.
If you see "unauthorized", you need to authorize the connection on your device.
If you see the device without "unauthorized", you're good to go.
Reboot to bootloader:
Code:
adb reboot bootloader
Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
Code:
fastboot flashing unlock
Select Continue on the device screen.
Spoiler: Initial Root / Create Master Root Image
Install Magisk on your device.
Download the factory zip for your build.
Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
Copy boot.img to your device.
Patch boot.img with Magisk: "Install" > "Select and Patch a File"
Copy the patched image back to your PC. It will be named "magisk_patched-23xxx_xxxxx.img". Rename this to "master root.img" and retain it for future updates.
Reboot your device to bootloader.
Flash the patched image:
Code:
fastboot flash boot <drag and drop master root.img here>
Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>
Spoiler: Update and Root Automatic OTA
Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
Allow the update to download and install. DO NOT REBOOT WHEN PROMPTED. Open Magisk, tap Install at the top, then Install to inactive slot. Magisk will then reboot your device.
You should now be updated with root.
Spoiler: Update and Root OTA Sideload
Download the OTA.
Reboot to recovery and sideload the OTA:
Code:
adb reboot sideload
Once in recovery:
Code:
adb sideload ota.zip
When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: You can use Payload Dumper to extract the contents of the OTA if you want to manually patch the new boot image. However, I will not cover that in this guide.
Spoiler: Update and Root Factory Image
Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
Download the factory zip and extract the contents.
Reboot to bootloader.
Spoiler: Update bootloader if necessary
Compare bootloader versions between phone screen and bootloader.img build number
Code:
fastboot flash bootloader <drag and drop new bootloader.img here>
If bootloader is updated, reboot to bootloader.
Spoiler: Update radio if necessary
Compare baseband versions between phone screen and radio.img build number
Code:
fastboot flash radio <drag and drop radio.img here>
If radio is updated, reboot to bootloader.
Apply update:
Code:
fastboot update --skip-reboot image-codename-buildnumber.zip
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Note: If you prefer, you can update using the flash-all script included in the factory zip. You will have to copy the script, bootloader image, radio image, and update zip into the Platform Tools folder; you will then have to edit the script to remove the -w option so it doesn't wipe your device.
The scripted commands should look like this:
Code:
fastboot flash bootloader <bootloader image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot flash radio <radio image name>
fastboot reboot bootloader
ping -n 5 127.0.0.1 > nul
fastboot update --skip-reboot <image-device-buildnumber.zip>
Once this completes, you can reboot to bootloader and either boot your master patched image, or if you patched the new image, flash it at this time.
Spoiler: Update and Root using PixelFlasher <<RECOMMENDED FOR NOVICES>>
PixelFlasher by @badabing2003 is an excellent tool that streamlines the update process - it even patches the boot image for you.
The application essentially automates the ADB interface to make updating and rooting much easier. However, it is STRONGLY recommended that you still learn the "basics" of using ADB.
For instructions, downloads, and support, please refer to the PixelFlasher thread.
Spoiler: Update and Root using the Android Flash Tool
Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
When the update completes, the device will be in fastbootd. Reboot to bootloader.
Boot the master root image (See note 1):
Code:
fastboot boot <drag and drop master root.img here>
Note: If you prefer, you can download the factory zip and manually patch the new boot image, then flash it after the update. Do not flash an older boot image after updating.
Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
Reboot your device. You should now be updated with root.
Spoiler: Pass SafetyNet/Play Integrity
SafetyNet has been deprecated for the new Play Integrity API. More information here.
In a nutshell, Play Integrity uses the same mechanisms as SafetyNet for the BASIC and DEVICE verdicts, but uses the Trusted Execution Environment to validate those verdicts. TEE does not function on an unlocked bootloader, so legacy SafetyNet solutions will fail.
However, @Displax has modified the original Universal SafetyNet Fix by kdrag0n; his mod is able to force basic attestation instead of hardware, meaning that the device will pass BASIC and DEVICE integrity.
Mod available here. Do not use MagiskHide Props Config with this mod.
This is my configuration that is passing Safety Net. I will not provide instructions on how to accomplish this. Attempt at your own risk.
Zygisk + DenyList enabled
All subcomponents of these apps hidden under DenyList:
Google Play Store
GPay
Any banking/financial apps
Any DRM media apps
Modules:
Universal SafetyNet Fix 2.3.1 Mod - XDA post
To check SafetyNet status:
YASNAC - GitHub
To check Play Integrity status:
Play Integrity Checker - NOTE: MEETS_STRONG_INTEGRITY will ALWAYS fail on an unlocked bootloader.
I do not provide support for Magisk or modules. If you need help with Magisk, here is the Magisk General Support thread. For support specifically with Magisk v24+, see this thread.
Points of note:
The boot image is NOT the bootloader image. Do not confuse the two - YOU are expected to know the difference. Flashing the wrong image to bootloader could brick your device.
While the Magisk app is used for patching the boot image, the app and the patch are separate. This is what you should see in Magisk for functioning root:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
"Installed" shows the version of patch in the boot image. If this says N/A, you do not have root access - the boot image is not patched, or you have a problem with Magisk.
"App" simply shows the version of the app itself.
If you do not have a patched master boot image, you will need to download the factory zip if you haven't already, extract the system update inside it, then patch boot.img.
If you prefer updating with the factory image, you can also extract and manually patch the boot image if desired.
Some Magisk modules, especially those that modify read only partitions like /system, may cause a boot loop after updating. As a general rule, disable these modules before updating. You are responsible for knowing what you have installed, and what modules to disable.
Credits:
Thanks to @badabing2003 , @pndwal , @Displax , @Az Biker , @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
Thanks for the guide, im currently on android 12, planing to downfgrade to Android 11, will be ok to follow the Master Root guide to patch, downgrade and root at the same time to Android 11?
kmry said:
Thanks for the guide, im currently on android 12, planing to downfgrade to Android 11, will be ok to follow the Master Root guide to patch, downgrade and root at the same time to Android 11?
Click to expand...
Click to collapse
Yep.
I can pass SafetyNet but GPay does not allow contactless. The only thing unclear is what settings you used from MagiskHide Props Config. Can you please share?
dortok said:
I can pass SafetyNet but GPay does not allow contactless. The only thing unclear is what settings you used from MagiskHide Props Config. Can you please share?
Click to expand...
Click to collapse
I didn't change anything under MHPC or UNSF, and tap to pay works fine on my Pixel 5.
V0latyle said:
I didn't change anything under MHPC or UNSF, and tap to pay works fine on my Pixel 5.
Click to expand...
Click to collapse
I thought the purpose of MHPC is to easily change the prop settings to another device. Does it even do anything by just installing the module?
dortok said:
I thought the purpose of MHPC is to easily change the prop settings to another device. Does it even do anything by just installing the module?
Click to expand...
Click to collapse
I'm not sure, I've never messed with anything under the hood, and honestly I didn't install it myself - I'm not sure how it got installed. Other users have mentioned success using only USNF.
Thank you for well written guides, will this guide work with any android version? I'm willing to follow this rooting process at Android 13
Broken.exe said:
Thank you for well written guides, will this guide work with any android version? I'm willing to follow this rooting process at Android 13
Click to expand...
Click to collapse
Yes
I just wanted to make a comment about the blanket statement of using the latest platform tools.
As of this writing, v34.0.0 is the most current, but it did not work for me and flashing the full images to a Pixel 4 XL.
Code:
{...}
extracting product.img (2440 MB) to disk... took 10.694s
extracting system.img (821 MB) to disk... took 4.031s
extracting system_ext.img (298 MB) to disk... took 1.498s
extracting system_other.img (23 MB) to disk... took 0.121s
extracting vendor.img (823 MB) to disk... took 4.021s
archive does not contain 'vendor_other.img'
Sending sparse 'super' 1/1 (4194303 KB) FAILED (Sparse file is too large or invalid)
fastboot: error: Command failed
Using v33.0.3 of the platform tools worked correctly for the Feb 2023 and Oct 2022 images. v34.0.0 failed for both of those.
jljtgr said:
I just wanted to make a comment about the blanket statement of using the latest platform tools.
As of this writing, v34.0.0 is the most current, but it did not work for me and flashing the full images to a Pixel 4 XL.
Code:
{...}
extracting product.img (2440 MB) to disk... took 10.694s
extracting system.img (821 MB) to disk... took 4.031s
extracting system_ext.img (298 MB) to disk... took 1.498s
extracting system_other.img (23 MB) to disk... took 0.121s
extracting vendor.img (823 MB) to disk... took 4.021s
archive does not contain 'vendor_other.img'
Sending sparse 'super' 1/1 (4194303 KB) FAILED (Sparse file is too large or invalid)
fastboot: error: Command failed
Using v33.0.3 of the platform tools worked correctly for the Feb 2023 and Oct 2022 images. v34.0.0 failed for both of those.
Click to expand...
Click to collapse
v34.0.0 has problems with fastbootd. It basically skips it, so v33.0.3 is the one people should be using right now until they fix it. There has been an issue opened up for it.