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

Search This thread

kleptonez

Senior Member
Jan 3, 2011
85
27
Xiaomi Mi Pad 4
OnePlus 7T Pro
Can you tell where you saw such a report? I am watching this closely as I want to try the A13B2 but do not want wipe my data.
I just tried a normal patch process using the canary 24309 downloaded today and it works without disabling anything. The changelog mentions support for A13B2 so it seems dev has fixed it! great work.

steps are as per usual: patch the original boot, bootloader patch boot magisk.img
 
  • Wow
Reactions: roirraW "edor" ehT

acwcanada

Senior Member
Mar 19, 2016
144
74
I just tried a normal patch process using the canary 24309 downloaded today and it works without disabling anything. The changelog mentions support for A13B2 so it seems dev has fixed it! great work.

steps are as per usual: patch the original boot, bootloader patch boot magisk.img
Did you ever disable verity when you were in A12/A12.1? My understanding is that you only need to do it once. Perhaps it is the reason why you are not facing similar problem as others are facing.
 
  • Wow
Reactions: roirraW "edor" ehT

Phazed47

Member
Nov 6, 2012
14
8
  • Phone was rooted and running Magisk just fine but on old code.
  • Followed instructions in top post to update using OTA. On reboot, I got "Your device is corrupt It cant be trusted". Continued, which hung on the Google screen forever.
  • Power button for 30 seconds, rebooted, was back on old code but no longer rooted.
  • Followed instructions to sideload instead. On reboot, I got "Your device is corrupt It cant be trusted". Continued, which hung on the Google screen forever.
  • Powered off again, now I always get the "Corrupt" message. Continuing always brings up the Google screen and hangs forever.
  • Unplugged phone. Now it shows a battery symbol. Should be fairly well charged.
  • Could use some suggestions on how to proceed.
 
  • Like
Reactions: fil3s

fil3s

Senior Member
Aug 30, 2014
1,483
340
43
bendigo
mobiledevices11.blogspot.com
  • Phone was rooted and running Magisk just fine but on old code.
  • Followed instructions in top post to update using OTA. On reboot, I got "Your device is corrupt It cant be trusted". Continued, which hung on the Google screen forever.
  • Power button for 30 seconds, rebooted, was back on old code but no longer rooted.
  • Followed instructions to sideload instead. On reboot, I got "Your device is corrupt It cant be trusted". Continued, which hung on the Google screen forever.
  • Powered off again, now I always get the "Corrupt" message. Continuing always brings up the Google screen and hangs forever.
  • Unplugged phone. Now it shows a battery symbol. Should be fairly well charged.
  • Could use some suggestions on how to proceed.

I had to sideload to get back into system when getting the 'corrupted' message. If you can get into fastboot , run this link with the device in fastboot mode. Uncheck the 'lock bootloader' and check 'force flash' and 'wipe device'

 
  • Like
Reactions: roirraW "edor" ehT

Phazed47

Member
Nov 6, 2012
14
8
I had to sideload to get back into system when getting the 'corrupted' message. If you can get into fastboot , run this link with the device in fastboot mode. Uncheck the 'lock bootloader' and check 'force flash' and 'wipe device'

My choices are
  • The "corrupt" screen. If I go past that I get
  • The warning screen with orange arrow "The bootloader is unlocked..." where I can pause with the power button. If I go past that I get
  • The Google logo on a black background than seems to hang forever
 

Phazed47

Member
Nov 6, 2012
14
8
Android flashtool kept failing to download, getting about 60% through and restarting.
So I just did it all with fastboot, which worked but of course wiped the phone. Not a huge problem but, going forward, is there a FAQ on exactly how to do an appropriate backup, factory wipe, restore to get all settings & files back?
 
  • Wow
Reactions: roirraW "edor" ehT

V0latyle

Forum Moderator
Staff member
Android flashtool kept failing to download, getting about 60% through and restarting.
So I just did it all with fastboot, which worked but of course wiped the phone. Not a huge problem but, going forward, is there a FAQ on exactly how to do an appropriate backup, factory wipe, restore to get all settings & files back?
A full backup can only be done with root, using an app such as Swift Backup.

It's important to follow instructions. If you run into trouble while operating outside the scope of this guide - using a version of Magisk not compatible with Android 12 for instance - you're on your own.

The overall best way to update is by dirty flashing the factory image. Automatic OTA won't work with any version of Magisk older than 24310. This is why I included these specific notes in the OP.
 
  • Like
Reactions: roirraW "edor" ehT

Phazed47

Member
Nov 6, 2012
14
8
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
 
  • Like
Reactions: roirraW "edor" ehT

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.