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

Search This thread

V0latyle

Forum Moderator
Staff member
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.
 

awesomeo3000

Member
Dec 29, 2011
29
11
I followed the instructions, but I am unable to take OTA updates. It just says "installation problem." Then when I tried repeating the steps for SQ1D.220105.007 factory image, it gets stuck on the "G" screen at boot, so I had to revert back to the patched SD1A.210817.036.A8 boot.img. I also tried reflashing the original unpatched SD1A.210817.036.A8 boot.img to take the OTA, and that still says "installation problem."
 

awesomeo3000

Member
Dec 29, 2011
29
11
  1. Follow the instructions on the Android Flash Tool to update your device. Check the "Skip reboot" box.
  2. When the update completes, the device will be in fastbootd. Reboot to bootloader.
I was about to try the Android Flash Tool, but I noticed that it says it will lock the bootloader as part of the process, and there's no option to uncheck that. I also don't see anything that looks like a "Skip reboot" box. I thought that if we lock the bootloader while the phone is rooted, it gets bricked? Here's a screenshot of what I see in the AFT.
Screen Shot 2022-01-28 at 8.03.19 PM.png
 

capntrips

Senior Member
Aug 29, 2020
188
321
OnePlus 6T
Google Pixel 6
I was about to try the Android Flash Tool, but I noticed that it says it will lock the bootloader as part of the process, and there's no option to uncheck that. I also don't see anything that looks like a "Skip reboot" box. I thought that if we lock the bootloader while the phone is rooted, it gets bricked? Here's a screenshot of what I see in the AFT.View attachment 5521939

Before clicking "Install Build", click the pencil icon to see the flashing options.

Screenshot_20220128-202306~2.png

Screenshot_20220128-202424.png
 

V0latyle

Forum Moderator
Staff member
I followed the instructions, but I am unable to take OTA updates. It just says "installation problem." Then when I tried repeating the steps for SQ1D.220105.007 factory image, it gets stuck on the "G" screen at boot, so I had to revert back to the patched SD1A.210817.036.A8 boot.img. I also tried reflashing the original unpatched SD1A.210817.036.A8 boot.img to take the OTA, and that still says "installation problem."
If you try the factory update method, extract and patch the new boot image. You are using Magisk 24.0, correct?
I was about to try the Android Flash Tool, but I noticed that it says it will lock the bootloader as part of the process, and there's no option to uncheck that. I also don't see anything that looks like a "Skip reboot" box. I thought that if we lock the bootloader while the phone is rooted, it gets bricked? Here's a screenshot of what I see in the AFT.
You missed a step. There's a little pencil icon you have to click when you're selecting the build. That opens the options menu where you can select "Lock bootloader", "Wipe data", "Force flash all partitions", etc. There is no skip reboot option; to do that you have to manually flash via ADB.
 

awesomeo3000

Member
Dec 29, 2011
29
11
If you try the factory update method, extract and patch the new boot image. You are using Magisk 24.0, correct?

You missed a step. There's a little pencil icon you have to click when you're selecting the build. That opens the options menu where you can select "Lock bootloader", "Wipe data", "Force flash all partitions", etc. There is no skip reboot option; to do that you have to manually flash via ADB.
I am using Magisk 24.1. I got it to work by downloading the latest OTA and using your OTA sideload instructions, then recreated the master root image and reflashed. All this got my root back and I started with a fresh wipe.

Any ideas why the regular OTA download wasn't working? If it worked as expected, I wouldn't have to wipe the phone every time, right? If I'm able to just download the OTA from Settings, Updates, and then boot the master root image, all apps and configs on the phone stays preserved?

And good call on the AFT. If I uncheck the wipe data and lock bootloader, will that mess anything up for the updates? I really don't want to wipe every time.
 

V0latyle

Forum Moderator
Staff member
I am using Magisk 24.1. I got it to work by downloading the latest OTA and using your OTA sideload instructions, then recreated the master root image and reflashed. All this got my root back and I started with a fresh wipe.

Any ideas why the regular OTA download wasn't working? If it worked as expected, I wouldn't have to wipe the phone every time, right? If I'm able to just download the OTA from Settings, Updates, and then boot the master root image, all apps and configs on the phone stays preserved?
You should never have to wipe your phone. Automatic OTA is iffy with a patched boot image. You can try "Restore Boot Image" in Magisk, then download OTA, then select "Install to inactive slot" before rebooting.

Or, you can sideload the OTA, let it boot, reboot to bootloader, temp boot a previously patched image, and perform Direct Install in Magisk.
And good call on the AFT. If I uncheck the wipe data and lock bootloader, will that mess anything up for the updates? I really don't want to wipe every time.
Nope.

The way I prefer to update is by flashing the factory zip. We will see what happens with the February update to see if OTA root really is fixed in Magisk.
 

capntrips

Senior Member
Aug 29, 2020
188
321
OnePlus 6T
Google Pixel 6
Any ideas why the regular OTA download wasn't working?

The OTA from System Update is a delta OTA, so it compares the hashes of the partitions in your active slot to those expected of a completely stock system. If you are rooted, you'll first need to restore your boot partition. If you're on older builds of Android and Magisk, you may need to restore your vbmeta partition. One person claimed their bootloader and radio partitions being out of sync prevented them from taking the OTA.

You can filter your logcat for update_engine to see what partition is preventing you from updating, but if you're going to plug into a computer to check that, you may as well just flash the build manually.

For more detail on taking an OTA, see Magisk's OTA upgrade guide for devices with A/B partitions:


The note and linked tweet at the top of that page are now out of date, as of build 23017.
 
  • Like
Reactions: V0latyle

awesomeo3000

Member
Dec 29, 2011
29
11
You should never have to wipe your phone. Automatic OTA is iffy with a patched boot image. You can try "Restore Boot Image" in Magisk, then download OTA, then select "Install to inactive slot" before rebooting.

Or, you can sideload the OTA, let it boot, reboot to bootloader, temp boot a previously patched image, and perform Direct Install in Magisk.

Nope.

The way I prefer to update is by flashing the factory zip. We will see what happens with the February update to see if OTA root really is fixed in Magisk.
I considered flashing the factory zip, but didn't want to mess with the bootloader and radio since that's in the brick zone.
 

V0latyle

Forum Moderator
Staff member
I considered flashing the factory zip, but didn't want to mess with the bootloader and radio since that's in the brick zone.
Simply follow the directions exactly as written and you won't have any problems.
Is this method succesfully tested with Android 12? The most simplest one.
I'm not sure, but per @capntrips post above, it makes sense. More detailed instructions:
  1. Prior to downloading OTA, open Magisk, tap Uninstall, tap Restore Boot Images. Do not reboot.
  2. Manually start the OTA download: Settings > System > System update > Check for update or Download and install
  3. When prompted to reboot to complete the update, do not reboot. Open Magisk, tap Install in the Magisk section, select "Install to Inactive Slot (After OTA)", tap Let's Go. Allow it to reboot your device when prompted.
  4. You should reboot into updated system with root.
 

gazdajezda

Senior Member
Apr 24, 2011
394
79
Ok, i guess we will know for sure soon. I started it, now downloading update... If i not came back in an half an hour, it was a failure 😁
 

gazdajezda

Senior Member
Apr 24, 2011
394
79
I type this from computer :( It finished and after that i install Magisk to other (inactive) slot and reboot. It's been stuck on rainbow G with line sponning form left to right for some 15 minutes now. I think it won't boot. What can i do now?
 

gazdajezda

Senior Member
Apr 24, 2011
394
79
I managed to boot it, aparently from other slot with old unpatched boot image so update to latest version was not succesfull. I will root it back now, but i'm afraid that it will again start downloading / installing it. I have disabled this option "Developer options / Automatic system updates" IS disabled. But it already show that updates are ready and i think it will start downloadaing it / installing after as soon i will turn on Wifi. Ahhh...

I used Magisk 24101, is that version ok?
 

V0latyle

Forum Moderator
Staff member
To update from Canary 24101 to Stable 24.1 it's not clear to me if just switching channels is enough. Uninstall first?
Yes - but do it from within the app. Select Complete Uninstall. Magisk will restore your boot image, remove itself, then reboot your device. After it does so, install Magisk Stable. From here, you can either manually re-patch the factory boot image with Stable, or you can live boot a previously patched boot image (it won't matter if it was patched with Canary) for temporary root, then perform Direct Install within Magisk.
 
  • Like
Reactions: manjaroid

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Canary 24310 has been released; this incorporates fixes for an AVB issue that was causing bootloops on the Pixel 6 / 6 Pro.
    4
    Magisk Canary 24309 is out with support for the Pixel 6 Android 13 beta.

    Download
    3
    Hi all, so i have a REALLY STUPID question. I first rooted after april's patch. I have the modded boot image for that particular OTA. What the instructions for this month don't make clear are whether I have to download the ota for may and patch that boot image before doing the automatic phone system update?

    I understand i have to uninstall magisk, disable addons etc before doing it, its just that boot image thing i'm not certain about.

    Because if i've got this right in my head, as it stands while i've got root access, i could install to 2nd slot now, then uninstall magisk etc and then do ota with current patched boot image in slot 2?
    When installing the automatic OTA, you don't download the boot image. When you install Magisk to the inactive slot after taking the OTA, it patches the newly installed boot image in the inactive slot. You perform a Restore Images before the OTA so update_engine finds the stock image before update; otherwise, it will fail. You don't lose root unless you reboot after Restore Images. Do not reboot when System Update prompts you.

    Be sure you're on Magisk 24307 before starting the process.

    Edit: or the newly released 24308, though I haven't seen any reports using that version.
    3
    24307 starts to open and won't get past the screen of the Magisk logo with the mask. It just sits there indefinitely.

    I haven't unlocked the bootloader yet

    See here. For now, you'll have to initially root with 24306 then upgrade to 24307, though I bet it won't be long before 24308, due to this bug.
    3
    Yes, I read about bootloops here after normal (classic) root process (flash factory image without -w and patched boot.img). That works now?

    So, if I disable Magisk modules (have only Systemless hosts and USNF, i can actually do OTA update (restore org image, patch inactive...) and system will reboot normally? Last 2 times i do it, phone won't boot normally.
    I am using those two modules and have never disabled them. The modules that should be disabled are those that modify /system.

    You should in theory be able to use the automatic OTA method. I personally haven't bothered, because my Pixel 5 never gets the notifications and doesn't download the update, so I just use the factory image.
  • 41
    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!
    7
    Magisk Canary was updated to 23016 last night. This includes a fix for the vbmeta header issue, meaning that disabling verity/verification should no longer be required, and we should be able to root as we did before. This needs testing, make sure you back up your data and photos before you do this!

    Additionally, for the Pixel 6 and 6 Pro, fstab will now load from /system/etc which should fix the root issue many of you were having.

    Q: "If verity/verification are disabled, do I need to enable them now?"
    A: No. The only thing you have to do is update to Magisk 23016.
    Q: "Will enabling verity/verification wipe my data?"
    A: No.

    I will be updating the OP to reflect this.
    5
    Magisk 24306 (release notes) is now available on the canary channel, and I can confirm that the installation to the inactive slot OTA method is working for the April update.
    5
    So, if I use this tool after rooting OTA updates will work and I'll still have root?

    Edit: And can you explain more clearly the process on how to do this?

    No, the tool does nothing to maintain root. It simply allows you to take the OTA. You will still need to reboot into fastboot and flash or boot from a patched boot image.

    The steps would be:
    1. Restore boot in the Magisk app
    2. Restore vbmeta in Vbmeta Patcher
    3. Take the OTA in System Updater
    4. Patch vbmeta in Vbmeta Patcher
    5. Patch the new boot image in the Magisk app and copy it to your computer
    6. Reboot into fastboot
    7. Boot from the new patched boot image
    8. Direct Install Magisk in the Magisk App
    As I noted the quote post, this process should be considered experimental until it has been more thoroughly tested. You should consider backing up any critical data before attempting it, in case something goes wrong.

    I'm working on another tool to make it a bit easier to acquire the new boot image in step 5, but that will likely be a few days. Hopefully we'll be able to install Magisk to the inactive slot on Pixel devices again in the future, which would consolidate steps 5-8.
    4
    I tinkered a bit and made some wrapped updater script for Windows. Makes the update process of the Pixel 6 a bit more convenient ... I made it just for fun. It's pretty self explanatory, but there's a how-to included anyway.



    EDIT: Updater outdated, will update 0riole_Flasher soon

    >>>UPDATES<<<