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

Search This thread

V0latyle

Forum Moderator
Staff member
Note that I followed the instructions in the OP exactly, including latest SDK and the linked version of Magisk. The issue may have been that I was coming from an old release (Jan, I think). As upgrades are always high risk, I saw no point in risking a wipe until Dirty Pipes was patched.

I have backups of all my important stuff, it would just be nice to be able to say "just restore it all". I'll take a look into Swift once I get everything back the way I want it, thankx
Unless root is an absolute must, I'm not aware of anything that will force a wipe. If a patched kernel fails to boot, you can just flash the unpatched image.
 
  • Like
Reactions: roirraW "edor" ehT

roirraW "edor" ehT

Forum Moderator
Staff member
Magisk Beta 25.0 is out. For those of you who don't like using Canary, this should incorporate all previous fixes.
As a reminder, do not use Stable 24.3 if you update via OTA.
Also, a warning for anyone who uses a custom kernel, the kernel will likely have to be updated to work with the new Magisk Beta v25.0. Kirisakura has been updated and there are at least some reports of successfully using v25.
 
Also, a warning for anyone who uses a custom kernel, the kernel will likely have to be updated to work with the new Magisk Beta v25.0. Kirisakura has been updated and there are at least some reports of successfully using v25.
I bit the bullet and let v25 install direct while already on the Kirisakura kernel, and so far no issues.
 
  • Like
Reactions: roirraW "edor" ehT

Lughnasadh

Senior Member
Mar 23, 2015
3,412
3,452
Google Nexus 5
Huawei Nexus 6P
Just a PSA for those on Android 13 Beta 2.1:

Starting with Canary 24314, updating to a new Magisk version via direct install results in a bootloop. This behavior has continued with the latest Beta 25/Canary 25001. Patching the boot image, however, allows the phone to boot as expected.

An issue was opened but unfortunately closed as "not planned". So for those on Android 13 Beta 2.1 (and beyond most likely), when updating Magisk you'll want to avoid the direct install method and patch and flash the boot image instead to avoid a bootloop until they decide to resolve this issue.

 

pojr

Senior Member
Dec 18, 2016
68
23
Question for you guys:

I tried to use the "Update and Root Automatic OTA" method of updating (where you uninstall & restore image in Magisk, then update, then reinstall), but when I try to actually update, I receive a "program failed" message and the update does not happen. I looked up an youtube video on how to Update and Root Automatic OTA, and I did the steps 100% correctly, but same error. Unfortunately I don't have logs (sorry). Has anyone had this issue? I looked through this entire thread but didn't find anyone with this problem.
 

Nergal di Cuthah

Senior Member
Sep 20, 2013
1,770
852
Google Pixel 6 Pro
Question for you guys:

I tried to use the "Update and Root Automatic OTA" method of updating (where you uninstall & restore image in Magisk, then update, then reinstall), but when I try to actually update, I receive a "program failed" message and the update does not happen. I looked up an youtube video on how to Update and Root Automatic OTA, and I did the steps 100% correctly, but same error. Unfortunately I don't have logs (sorry). Has anyone had this issue? I looked through this entire thread but didn't find anyone with this problem.
Anything altered about your phone that might change system? Magisk modules? Kernel?
 
  • Like
Reactions: roirraW "edor" ehT

pojr

Senior Member
Dec 18, 2016
68
23
Anything altered about your phone that might change system? Magisk modules? Kernel?
my bad, i should have included this before.

i did have one magisk model, the systemless host one (that lets you hide apps). the first time i tried to update i forgot to uninstall the model, but the second time i remembered to do so, but it still failed to update for the same reason.

i have no custom kernel, just the default one.
 
  • Like
Reactions: roirraW "edor" ehT

TiZiO.Cover

Senior Member
Mar 26, 2011
314
68
Google Pixel 6 Pro
Updating with the Android Flash Tool does not work this time because the Flash Tool does not find a newer update than the already used 12.1.0 (SP2A.220505.002, May 2022).
The factory images "SQ3A..." provided by Google are not offered for installation.
 
  • Like
Reactions: roirraW "edor" ehT

jcp2

Senior Member
Updating with the Android Flash Tool does not work this time because the Flash Tool does not find a newer update than the already used 12.1.0 (SP2A.220505.002, May 2022).
The factory images "SQ3A..." provided by Google are not offered for installation.
I used Android flash tool this morning and it found and installed June's update, no problem.
 

Lughnasadh

Senior Member
Mar 23, 2015
3,412
3,452
Google Nexus 5
Huawei Nexus 6P
Just a PSA for those on Android 13 Beta 2.1:

Starting with Canary 24314, updating to a new Magisk version via direct install results in a bootloop. This behavior has continued with the latest Beta 25/Canary 25001. Patching the boot image, however, allows the phone to boot as expected.

An issue was opened but unfortunately closed as "not planned". So for those on Android 13 Beta 2.1 (and beyond most likely), when updating Magisk you'll want to avoid the direct install method and patch and flash the boot image instead to avoid a bootloop until they decide to resolve this issue.

Looks like the issue may have been fixed with these commits...

 
Last edited:
  • Love
Reactions: roirraW "edor" ehT

V0latyle

Forum Moderator
Staff member
i did have one magisk model, the systemless host one (that lets you hide apps)
The only thing Systemless Hosts does is create a redirect for the hosts file (IP addresses and domain names) to a dynamic file contained in storage. This is used by ad blockers such as AdAway and has nothing to do with hiding apps.
Updating with the Android Flash Tool does not work this time because the Flash Tool does not find a newer update than the already used 12.1.0 (SP2A.220505.002, May 2022).
The factory images "SQ3A..." provided by Google are not offered for installation.
When this happens, you can just update manually using the factory image...or sideload the OTA.

I would recommend the same for everyone else having issues with the automatic OTA.
 

roirraW "edor" ehT

Forum Moderator
Staff member
Updating with the Android Flash Tool does not work this time because the Flash Tool does not find a newer update than the already used 12.1.0 (SP2A.220505.002, May 2022).
The factory images "SQ3A..." provided by Google are not offered for installation.
You're not crazy. Yesterday when I was trying to fix a problem, the Android Flash Tool wouldn't list anything newer than the March firmware update (except it also listed Betas).
 

V0latyle

Forum Moderator
Staff member
You're not crazy. Yesterday when I was trying to fix a problem, the Android Flash Tool wouldn't list anything newer than the March firmware update (except it also listed Betas).
I believe it does this if you've opted into the Beta program - the last factory image it shows is whatever was before the beta was released. Opting out of the beta program should show current packages.
 

roirraW "edor" ehT

Forum Moderator
Staff member
I believe it does this if you've opted into the Beta program - the last factory image it shows is whatever was before the beta was released. Opting out of the beta program should show current packages.
That makes sense, thanks. I haven't opted into a Beta program in years, though - and I haven't manually flashed any of the P6P Betas or Developer Previews. This leads me to believe that Google's assumed temporary bug was that at least for some users, they mistakenly thought they have opted into the Beta program.

@TiZiO.Cover see @V0latyle's response above.
 
  • Like
Reactions: TiZiO.Cover

pojr

Senior Member
Dec 18, 2016
68
23
The only thing Systemless Hosts does is create a redirect for the hosts file (IP addresses and domain names) to a dynamic file contained in storage. This is used by ad blockers such as AdAway and has nothing to do with hiding apps.
I do use AdAway so that explains that. But it was still under modules, so I think I did the right thing by uninstalling it before trying (and failing) to update.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Updating with the Android Flash Tool does not work this time because the Flash Tool does not find a newer update than the already used 12.1.0 (SP2A.220505.002, May 2022).
    The factory images "SQ3A..." provided by Google are not offered for installation.
    You're not crazy. Yesterday when I was trying to fix a problem, the Android Flash Tool wouldn't list anything newer than the March firmware update (except it also listed Betas).
    4
    Looks like the issue may have been fixed with these commits...

    Confirmed fixed with today's release of Stable 25.1 and Canary 25101. No problems updating via direct install.
    3
    I've been using your guide to update for months now. Never had a serious problem, thanks alot for writing it.
    3
    safetynet-fix v2.3.1 is released.

    v2.3.1​

    Latest

    @kdrag0n
    kdrag0n released this 3 hours ago
    · 3 commits to master since this release
    v2.3.1
    f79e5cc

    Changes​

    Highlights​

    • Fixed fingerprint on OxygenOS/ColorOS 12 (@osm0sis)
    • Support for Magisk 24+ module updates (@benjibobs)
    • Restored support for Android 7

    Other changes​

    • Spoofed OnePlus OEM unlock status for futureproofing (@osm0sis)
    • Minor code improvements
    This version only supports Zygisk (Magisk 24 and newer).

    Donate​

    If you found this helpful, please consider supporting development with a recurring donation for rewards such as early access to updates, exclusive behind-the-scenes development news, and priority support. Alternatively, you can also buy me a coffee. All support is appreciated ❤️

    Contributors​

    osm0sis and benjibobs

    Assets​

    3
    19 people reacted
    👍12🎉4❤️10
    0Join discussion
    3
    Thanks for the suggestion. I'm going to start flashing from Flash Tool and If I select June build, disabled Lock, then Flash
    Make sure you are following the instructions in the guide. Do not try to substitute your own ideas. The only way Magisk can be "flashed" is via a custom recovery such as TWRP, which to my knowledge has not been ported to Android 12 or the Pixel 6.

    Also, if you're using an alpha version of Magisk, I suggest that you use the official Canary. Not all alphas have the necessary fixes and updates.
  • 85
    If you are looking for my guide on a different Pixel, find it here:
    Update 6-20-22: Magisk 25.1 is recommended as this includes fixes for OTA updates, as well as support for the Android 13 beta.
    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 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 --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
    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
    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.