How To Guide [GUIDE] Pixel 6 Pro "raven": Unlock Bootloader, Update, Root, Pass SafetyNet

Search This thread

Lycidias

Senior Member
New magisk canary 😀

Screenshot_20220120-135658.png

mod edit: FIFY (y)
 
Last edited by a moderator:

Lughnasadh

Senior Member
Mar 23, 2015
3,327
3,296
Google Nexus 5
Huawei Nexus 6P
Good stuff. This should simplify things for those of you who prefer to update via OTA.

Just updated my P5. Tried the "inactive slot" for poops and giggles, device bootlooped back to slot A.
Wait, so you went into the Magisk App, restored images, went into System settings and updated via System Update (OTA), then before rebooting went back into Magisk and updated Magisk via "inactive slot" method and then hit reboot in Magisk and it bootlooped in the same slot you started with?

Just trying to understand if there is a problem with the Magisk update. Magisk should have made your phone switch to the updated slot after doing all that and rebooting.

Of course, if you didn't update via OTA and just updated Magisk via "inactive slot", then bootlooping back to slot A (assuming you started with slot A) makes sense.
 
  • Like
Reactions: roirraW "edor" ehT

V0latyle

Forum Moderator
Staff member
Wait, so you went into the Magisk App, restored images, went into System settings and updated via System Update (OTA), then before rebooting went back into Magisk and updated Magisk via "inactive slot" method and then hit reboot in Magisk and it bootlooped in the same slot you started with?
Nope, I updated to January by dirty flashing the factory image.
Just trying to understand if there is a problem with the Magisk update. Magisk should have made your phone switch to the updated slot after doing all that and rebooting.
Other slot wasn't "updated", was just the same version.
Of course, if you didn't update via OTA and just updated Magisk via "inactive slot", then bootlooping back to slot A (assuming you started with slot A) makes sense.
I mean yeah, assuming that Magisk just commands system to perform the same reboot process it would do after OTA, in which case system would be looking for a "newer" version on slot B. Question is whether I could manually change to slot B and successfully boot.

Just found this, maybe worth a try

Edit: nope, bootlooped
 
Last edited:

Lughnasadh

Senior Member
Mar 23, 2015
3,327
3,296
Google Nexus 5
Huawei Nexus 6P
Nope, I updated to January by dirty flashing the factory image.

Other slot wasn't "updated", was just the same version.

I mean yeah, assuming that Magisk just commands system to perform the same reboot process it would do after OTA, in which case system would be looking for a "newer" version on slot B. Question is whether I could manually change to slot B and successfully boot.

Just found this, maybe worth a try
Ok, makes sense now. Since you flashed the factory image you stayed on the same slot. Magisk didn't detect your inactive slot was updated (because it wasn't) so it didn't force the phone to switch slots upon reboot.

Think we should still be good when updating via OTA (System Update) as long as this method is followed:

Magisk app → Uninstall → Restore Images (Do not reboot)
Apply OTA (Settings → System → System Update) (Do not reboot or restart)
Magisk app → Install → Install to Inactive Slot
Reboot

But I guess we'll find out for sure in February. The new changes to Magisk were tested on both the Pixel 5 and 6 with success before the changes were merged so we should be good. 👍 (famous last words 🙃)
 

V0latyle

Forum Moderator
Staff member
Ok, makes sense now. Since you flashed the factory image you stayed on the same slot. Magisk didn't detect your inactive slot was updated (because it wasn't) so it didn't force the phone to switch slots upon reboot.
It did - device attempted to boot slot B, started to load kernel, then bootlooped back to slot A.
Think we should still be good when updating via OTA (System Update) as long as this method is followed:

Magisk app → Uninstall → Restore Images (Do not reboot)
Apply OTA (Settings → System → System Update) (Do not reboot or restart)
Magisk app → Install → Install to Inactive Slot
Reboot
Shouldn't have to restore images. Just apply OTA, install to inactive slot, reboot.
But I guess we'll find out for sure in February. The new changes to Magisk were tested on both the Pixel 5 and 6 with success before the changes were merged so we should be good. 👍 (famous last words 🙃)
giphy.gif
 

Lughnasadh

Senior Member
Mar 23, 2015
3,327
3,296
Google Nexus 5
Huawei Nexus 6P
Shouldn't have to restore images. Just apply OTA, install to inactive slot, reboot.
You need to restore images first in order to pass pre-OTA block verifications. Then apply OTA, then install to inactive slot and reboot.

And bootlooping back to slot A still makes sense to me because an OTA wasn't applied.
 

V0latyle

Forum Moderator
Staff member
You need to restore images first in order to pass pre-OTA block verifications. Then apply OTA, then install to inactive slot and reboot.
I could have sworn I was able to OTA update at some point without restoring stock images. What you're saying makes sense though. Because things.
 

straumli

Member
Jan 12, 2012
41
4
I am a new owner trying to root my Pixel 6 pro but after patching boot.img I fail to flash the image, kindly advise where I made a mistake. I extracted boot.img from raven-sd1a.210817.015.a4-factory-bd6cb030.zip\\image-raven-sd1a.210817.015.a4.zip\\

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flashing unlock ... OKAY [ 0.032s] finished. total time: 0.033s

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot bootloader

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot "master root.img" target reported max download size of 261095424 bytes sending 'boot_a' (131072 KB)... OKAY [ 3.137s] writing 'boot_a'... FAILED (remote: failed to flash partition (boot_a)) finished. total time: 3.172s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot "master root.img" downloading 'boot.img'... OKAY [ 3.059s] booting... OKAY [ 0.032s] finished. total time: 3.091s

Booting the image and opening Magisk does not show a direct install option (only allows me to patch an image)
 

Lughnasadh

Senior Member
Mar 23, 2015
3,327
3,296
Google Nexus 5
Huawei Nexus 6P
I am a new owner trying to root my Pixel 6 pro but after patching boot.img I fail to flash the image, kindly advise where I made a mistake. I extracted boot.img from raven-sd1a.210817.015.a4-factory-bd6cb030.zip\\image-raven-sd1a.210817.015.a4.zip\\

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flashing unlock ... OKAY [ 0.032s] finished. total time: 0.033s

C:\Program Files (x86)\Minimal ADB and Fastboot>adb reboot bootloader

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash boot "master root.img" target reported max download size of 261095424 bytes sending 'boot_a' (131072 KB)... OKAY [ 3.137s] writing 'boot_a'... FAILED (remote: failed to flash partition (boot_a)) finished. total time: 3.172s

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot "master root.img" downloading 'boot.img'... OKAY [ 3.059s] booting... OKAY [ 0.032s] finished. total time: 3.091s

Booting the image and opening Magisk does not show a direct install option (only allows me to patch an image)
You should be using the latest Platform Tools. https://developer.android.com/studio/releases/platform-tools

Also, are you using Canary Magisk 23017? If not, you should be. Will still work on your October build.

If still not working after this, try a different cable(s).

EDIT: I assume you are the October build since you are using the October boot image?
 
Last edited:

WorldOfJohnboy

Senior Member
Mar 23, 2011
983
227
Syracuse
Seeing as how January's update dropped (sooner than Google had initially said), I think I'm going to go for the update. Typically, I'm a guy that likes to flash the full update (not OTA) without a WIPE and then "re-Magify" root after. Anyone done the update this way and any tips or tricks?

It should be noted that I use Zygisk (have to for corporate apps) so any helpful hints knowing that is appreciated as well. My thought was to:

-Patch January boot.img in Magisk and copy to my PC
-Run the flash-all.bat file with "-w" removed
-Flash the Patched January Boot image and boot it up.
-Done.
 

Dragon Kumera

Senior Member
Mar 14, 2019
323
105
TLDR > Cant update from Nov to Jan update on my Rooted Pixel 6 Pro

Hey there! first timer here
Im trying to update my rooted Pixel 6 Pro from 12.0.0 (SD1A.210817.036, Nov 2021) to 12.0.0 (SQ1D.220105.007, Jan 2022). I can see the update when i manually search for it on the phone but when it downloads it fails and says "Couldn`t update. Installation problem" with no further explanation.
So i tried the sideload method from this thread. No luck here as well. I got the 12.0.0 (SQ1D.220105.007, Jan 2022) update from the OTA link (Not sure if thats the right one but its the only one available that says JAN 2022) and when i get to the recovery i adb sideload drag file, the file uploads and fails with the following error > error applying update 7 kinstalldeviceopenerror
From googling that error it says that im trying to upload an update meant for another phone. Im sure that im downloading the "raven" one for the pro model.

Any advice would be helpful since i have been scratching my head for the last 6 hours.

A bit more info >
im using the same PC, usb cable, usb port that i used when rooting for the first time.
I rooted the phone following this thread without disabling Android Verified Boot since it said its not needed.
I have the Canary Magisk 23016. Disabled all modules and super rights to apps before trying both methods of update.
Im using the "Tiny ADB & Fastboot" to upload the update to the phone.
Its have not done any previous updates on this phone, rooting was done on Nov update since it came with it.

Extra question > Somebody posted that they had similar problem to mine and they updated with the <Update and Root Factory Image>. (1)If i try that will the phone revert to factory settings and (2) can i use the master root.img that i saved from the first root or do i need to patch it again?

P.S. Thanks a lot for the original guide!
connect phone to pc. reboot to recovery and press top volume button to enter recovery option then sideload update and continue through commands of adb
 
  • Like
Reactions: roirraW "edor" ehT

V0latyle

Forum Moderator
Staff member
Seeing as how January's update dropped (sooner than Google had initially said), I think I'm going to go for the update. Typically, I'm a guy that likes to flash the full update (not OTA) without a WIPE and then "re-Magify" root after. Anyone done the update this way and any tips or tricks?

It should be noted that I use Zygisk (have to for corporate apps) so any helpful hints knowing that is appreciated as well. My thought was to:

-Patch January boot.img in Magisk and copy to my PC
-Run the flash-all.bat file with "-w" removed
-Flash the Patched January Boot image and boot it up.
-Done.
That's more or less how I updated, although I didn't use the script.
even more dangerous willing to say this in public on a forum :).
That's why it's a running joke...
connect phone to pc. reboot to recovery and press top volume button to enter recovery option then sideload update and continue through commands of adb
Please read the thread before you post, as the question had already been answered some time ago.
 
  • Like
Reactions: roirraW "edor" ehT

roirraW "edor" ehT

Forum Moderator
Staff member
Seeing as how January's update dropped (sooner than Google had initially said), I think I'm going to go for the update. Typically, I'm a guy that likes to flash the full update (not OTA) without a WIPE and then "re-Magify" root after. Anyone done the update this way and any tips or tricks?

It should be noted that I use Zygisk (have to for corporate apps) so any helpful hints knowing that is appreciated as well. My thought was to:

-Patch January boot.img in Magisk and copy to my PC
-Run the flash-all.bat file with "-w" removed
-Flash the Patched January Boot image and boot it up.
-Done.
I do it this way every time. I flash the full factory image with the "-w " removed, I go ahead and boot as is just to make sure there's no problems on 100% stock, then I Magisk the boot.img that I've extracted from the inner zip file, then flash that rooted boot.img, boot, and confirm everything's still working.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Magisk Canary 24309 is out with support for the Pixel 6 Android 13 beta.

    Download
    4
    Have you tried live booting followed by a direct install? :) This way if it fails , android will just boot the stock boot image
    That's an excellent idea for @android_dan.

    Edit/add-on:
    Thanks for the reply. Maybe 'm being dense but not sure how the flash tool is going to help. The problem isn't recovering from the bootloop. That's just a matter of flashing an unpatched boot image. The problem is what could be causing the patched file to bootloop the phone. I've updated this rooted phome 3 or 4 times now by flashing a patched boot file with no issues and have changed nothing on the phone
    I suggested the Official Google Android Flash Tool site because it has fixed things that manually flashing the factory image hasn't, in at least a dozen examples I've read about in this section alone in the six months the P6P has been out.

    I know that it doesn't sound necessarily rational, but it's happened often enough and almost every time it's been suggested to someone to do that instead of manually flashing the factory image zip, that the online tool fixed their issue.
    4
    No idea.. this was the 1st time it's happened to me on A12. Do you think I should use canary? Mind you, I should note the 'direct install' option was still available, but when I tried it it failed , can't remember the error.

    See post above and I think there's a note a page or two back too. 24.3 doesn't work for the later April FW
    3
    Hey guys I want to pull the trigger on a Pixel 6 Pro. Still on a Pixel 2 XL.

    Ive read through the post but I like to always follow very detailed guides when rooting.

    Can I still follow this January update guide from Youtube if the phone has been updated to March/April? Also should I substitue magisk 24.1 for 24.3 if it has been updated to the latest?


    Thanks again in advance for any help

    Note this guy is using 'minimal ADB and fastboot'. I personally would use platform tools directly from the google android developers website.

    This is a very careful guide that you've linked. It's really not hard. You can either live boot the magiskboot.img ;
    Code:
    fastboot boot <path_to_magiskboot.img>
    then direct install from the magisk app, or you can just as easily flash it.

    Code:
    fastboot flash boot <path_to_magiskboot.img>
    It might be safer to live boot it if you're rooting the device for the first time.
  • 81
    If you are looking for my guide on a different Pixel, find it here:
    Update 5-13-22: While Magisk 24.0 has been updated for use with Android 12, many users on the Pixel 6 and 6 Pro are still experiencing issues. It is strongly recommended to use Canary 24310. This version also includes beta support for A13B2.
    Discussion thread for migration to 24.0.

    DO NOT use any version of Magisk lower than Canary 23016 as it does not yet incorporate the necessary fixes for Android 12 and your device.


    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:


    Android Source - Setting up a device for development


    1. Follow these instructions to enable Developer Options and USB Debugging.
    2. Enable OEM Unlocking. If this option is grayed out, unlocking the bootloader is not possible.
    3. Connect your device to your PC, and open a command window in your Platform Tools folder.
    4. 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.
    5. Reboot to bootloader:
      Code:
      adb reboot bootloader
    6. Unlock bootloader: THIS WILL WIPE YOUR DEVICE!
      Code:
      fastboot flashing unlock
      Select Continue on the device screen.

    1. Install Magisk on your device.
    2. Download the factory zip for your build.
    3. Inside the factory zip is the update zip: "device-image-buildnumber.zip". Open this, and extract boot.img
    4. Copy boot.img to your device.
    5. Patch boot.img with Magisk: "Install" > "Select and Patch a File"
    6. 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.
    7. Reboot your device to bootloader.
    8. Flash the patched image:
      Code:
      fastboot flash boot <drag and drop master root.img here>
    9. Reboot to Android. Open Magisk to confirm root - under Magisk at the top, you should see "Installed: <Magisk build number>

    1. Before you download the OTA, open Magisk, tap Uninstall, then Restore Images. If you have any Magisk modules that modify system, uninstall them now.
    2. Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
    3. 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.
    4. You should now be updated with root.

    1. Download the OTA.
    2. Reboot to recovery and sideload the OTA:
      Code:
      adb reboot sideload
      Once in recovery:
      Code:
      adb sideload ota.zip
    3. When the OTA completes, you will be in recovery mode. Select "Reboot to system now".
    4. Allow system to boot and wait for the update to complete. You must let the system do this before proceeding.
    5. Reboot to bootloader.
    6. 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.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. 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.

    Please note that the factory update process expects an updated bootloader and radio. If these are not up to date, the update will fail.
    1. Download the factory zip and extract the contents.
    2. Reboot to bootloader.
    3. 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.
    4. 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.
    5. Apply update:
      Code:
      fastboot update --skip-reboot image-codename-buildnumber.zip
      When the update completes, the device will be in fastbootd. Reboot to bootloader.
    6. 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.
    7. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    8. 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 update bootloader <bootloader image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot update radio <radio image name>
    fastboot reboot bootloader
    ping -n 5 127.0.0.1 > nul
    fastboot update  --skip-reboot --slot=all <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.

    1. Follow the instructions on the Android Flash Tool to update your device. Make sure Lock Bootloader and Wipe Device are UNCHECKED.
    2. When the update completes, the device will be in fastbootd. Reboot to bootloader.
    3. 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.
    4. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    5. Reboot your device. You should now be updated with root.

    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:
    To check SafetyNet status:
    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:
      screenshot_20211218-194517-png.5486339
    • "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 @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work!
    9
    Magisk Stable is now at version 24.1, so I will no longer be providing any Magisk updates.

    You can use any version of Magisk now - Stable, Beta, or Canary. as long as it is 23016 or newer.

    Once again, if you want to switch versions of Maagisk, it is HIGHLY RECOMMENDED that you "Complete Uninstall" within Magisk before installing the new version. Multiple instances of Magisk can break root.

    If you simply want to update Magisk, the best way to do so is from within the app.


    Once the February update is out, I will perform some testing with installing to inactive slot, and if it works, I will update this guide.

    Given the low activity on this thread, I will probably close it if everything goes well with the next update.

    Thank you all for your testing and contributions.
    8
    My update process is to remove vbmeta.img (in addition to removing the -w flag in the flash-all script) from the factory zip before I flash it in fastboot. Seems to have worked so far, ymmv.
    7
    I just used this method, (same one described on Magisk website here https://topjohnwu.github.io/Magisk/ota.html) and it worked perfectly, both root and safetynet.
    Can someone explain to me why you see all kind of guide to update which are far more complicated than that ?
    Part of it is due to device differences - non A/B devices can't use seamless updates, so re-rooting is only possible by either patching the boot image directly, or by flashing Magisk in a custom recovery.

    Part of it is also due to user preferences. Some people, like me, prefer to update using the factory images, instead of OTA.

    And part of it is probably a bit of misinformation mixed in with anecdotes, where people who don't fully understand how the process works, but they declare that something has to be done a certain way because of what worked for them.

    I try to stick to the first two. I've spent a lot of time learning about how Android works, so I make a point of providing instructions that align with how everything is supposed to be done, while accommodating alternatives for those who want them.

    Are you 100% sure?

    Cause topjohnwu said that OTA patching from within Magisk was broken for Pixel devices.

    See here

    Notice the date of that post, 16 months ago. Magisk Canary 23017 re-incorporated the ability to install to inactive slots.

    I have been following the commits closely, so when 23017 was released, I announced it in my guides. Had you read back a couple pages, your question has been answered.

    If you don't believe me, check the commits here.
    7
    Magisk Canary updated to 23019
    Changes:
    - [Zygisk] Skip loading modules into the Magisk app to prevent conflicts
    - [MagiskBoot] Change `zopfli` to a more reasonable config so it doesn't take forever
    - [General] Several `BusyBox` changes

    Preferred method of update is from within Magisk app.


    If installing for the first time, here is the APK Download