• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

How To Guide [GUIDE] Root Pixel 6 "oriole" with Magisk

Search This thread
Oct 23, 2007
8
3
This thread's title should really be updated to say "ROOT USERS:"... there's been some chatter that looks like it's referring to the standard updates.
 

V0latyle

Forum Moderator
Staff member
O

Nice unlocked the bootloader stays unlocked as long as u sideload the OTA ur good😁
I would recommend you do not sideload the OTA to update. Dirty flash the factory image using Android Flash Tool.

Or, if you absolutely have to do things yourself, dirty flash the factory image via ADB.

This thread's title should really be updated to say "ROOT USERS:"... there's been some chatter that looks like it's referring to the standard updates.
Good idea, I'll change the title.
 

Ntress

Senior Member
Dec 5, 2010
447
55
So if I'm on .036 build rooted and want to update to 0.37
will my data got wiped after I update ?
 

t-ryder

Senior Member
Feb 23, 2011
1,355
1,034
www.t-ryder.de
Google Pixel 6
I followed the Android flash tool method in page 1 thanks. I didn't use the same flash code though for flashing magisk patches boot img to the phone. I think I just did fastboot flash boot magiskxxxxxxx.img. It worked out. Wonder why the OP says to flash all slots.
I guess because the online flash tool flashes both slots, so you flash the Magisk patched boot image to both slots too.
 
Last edited:

norman00037

Member
Nov 17, 2021
27
3
Google Pixel 6
Worked like a charm for me. Yesterday I flashed oriole-sd1a.210817.037 to my rooted Pixel 6 (after creating a full storage backup and system/app backup using Swift Backup).
I downloaded the factory image ZIP package, zipped radio and bootloader to my platform-tools folder. Booted to bootloader and flashed radio and bootloader (you need to be on the latest bootloader, otherwise fastboot won't let you flash the ZIP image zipped from the ZIP package).

Code:
fastboot flash bootloader bootloader.img --slot all
fastboot reboot bootloader
fastboot flash radio radio.img --slot all
fastboot reboot bootloader

Then I flashed the ZIP image.
Code:
fastboot update --disable-verity --disable-verification image.zip

I booted to the updated system and patched the latest boot.img (zipped from the ZIP image) with Magisk canary. Then I flashed it with fastboot.
Code:
fastboot flash boot magiskboot.img --slot all

Rebooted and checked Magisk which runs in Zygisk. All good, did hide Magisk Manager again and checked if the Safety Net Magsik Module works ... all banking and streaming apps available and working.

Thanks to @V0latyle and all you nice folks.
So to sum up for newbie:
1. Flash stock boot.img got from image.zip
2. Reboot bootloader and flash stock radio.img from image.zip
3. Boot system, run Magisk, patch boot.img
4. Flash patched boot.img

Is that correct sir?
 

t-ryder

Senior Member
Feb 23, 2011
1,355
1,034
www.t-ryder.de
Google Pixel 6
To answer your question;
So to sum up for newbie:
1. Flash stock boot.img got from image.zip
2. Reboot bootloader and flash stock radio.img from image.zip
3. Boot system, run Magisk, patch boot.img
4. Flash patched boot.img

Is that correct sir?
1. Flash latest stock bootloader and radio image from the factory image package (reboot bootloader between flashing)
2. Flash latest image ZIP from the factory image package using the correct flags so your device does not get a wipe
3. Boot system, run magisk and patch the stock boot image from the image ZIP
4. Reboot to bootloader and flash the patched boot image

My little updater does exactly that but automated if you gave it the needed files as shown in the screenshot (post #52). The only thing different is that the boot image has to be patched first (and renamed + copied like the other files) by the user before starting the process.
 
Last edited:

chuppito

Senior Member
Jun 29, 2014
234
43
Pour répondre à ta question;

1. Flashez le dernier chargeur de démarrage et l'image radio du package d'image d'usine (redémarrez le chargeur de démarrage entre les clignotements)
2. Flashez la dernière image ZIP à partir du package d'images d'usine en utilisant les indicateurs appropriés afin que votre appareil ne reçoive pas d'effacement
3. Démarrez le système, exécutez magisk et corrigez l'image de démarrage à partir de l'image ZIP
4. Redémarrez sur le chargeur de démarrage et flashez l'image de démarrage corrigée

Mon petit programme de mise à jour fait exactement cela, mais de manière automatisée si vous lui avez donné les fichiers nécessaires, comme indiqué dans la capture d'écran (post #52). La seule différence est que l'image de démarrage doit d'abord être corrigée (et renommée + copiée comme les autres fichiers) par l'utilisateur avant de démarrer le processus.
MThank you I test it as soon as I update. Apparently there is a fix for MagiskThank you I test it as soon as I update. Apparently there is a fix for Magisk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    It's because they don't read and just post their questions in threads that have nothing to do with root. I can be reading a thread about fixes and features and then all of a sudden the whole thing is about Magisk, OTA with root, bricked when I unrooted etc. If their questions were put into your thread they'd have an answer almost immediately.
    These are fairly basic questions, though, and as I pointed out, I wouldn't write instructions that would wipe the device without explicitly pointing that out. If someone wants to use the batch file or the shell script, that's up to them. If they can't figure out what commands they need by reading my instructions, they shouldn't be doing this anyway.

    I made it clear on the OP that this is NOT a basic, dummy proof guide.
    4
    Ok so I redownloaded PT from the link you provided and redid the steps but same error. However, when you mentioned that you use CMD, I tried the same and it worked with Command Prompt running as administrator.

    For anyone that has the same issue, here are the steps to get around this error using WIndows 10 (should work for any version though):
    1. Launch Command Prompt as administrator
    2. Change your where your Command Prompt window is working from to your Platform Tools folder:
      1. I saved my PT folder under C:\platform-tools, in that case you would type 'cd C:\platform-tools'
    3. Rename your patched boot.img to 'master_image.img'
    4. Use the same command in step 8, 'fastboot flash boot master_image.img'
    That's what worked for me for the FAILED (remote: partition (boot) not found) error message using Windows 10 on Powershell.

    Thank you so much for your help @V0latyle
    There is an easy registry tweak to enable Command Prompt in the context menu with Shift+Right click in any directory.

    HKEY_CLASSES_ROOT\DIrectory\Background\Shell\cmd, go into permissions, change owner to yourself, then change "HideBasedOnVelocityID" to "ShowBasedOnVelocityID".

    Here is the guide for anyone who is interested.

    @khatidaal thanks for discovering this, I will update my notes.
    3
    I stupidly forgot to copy the patched image back to my computer and now I'm stuck in boot loop with no patched image to boot... I would gladly appreciate if someone could post one. thanks!
    3
    Why do people keep asking if the factory update will wipe their device? Where did this idea come from? It needs to be squashed.

    If you're reading this, and you have questions on whether something could be an issue...if it was, I would mention it in the OP instructions. Put your presumptions aside and simply follow the instructions. That's all you have to do.
    3
    But you had to wipe all data, right?
    Why would using the Flash Tool require wiping data? Who started that rumor?
    can someone point me to the easiest way to update to jan. update without losign my data or my root setup TIA
    There are several ways in the OP. Read it.
    I disable all magisk modules.
    Reboot to bootloader.
    fastboot flash-all (with -w removed)
    Reboot phone
    Transfer boot.img to phone.
    Patch with magisk
    Transfer patched.img to PC
    fastboot flash boot --slot all magiskpatched.img
    reboot
    re-enable mods one at a time with reboots in between.
    Thats my method.
    YMMV
    Disabling modules or removing Magisk is not necessary.
    Yes, I could finally update it to the Jan release.

    Follow the 'Update and Root Factory Image' in the OP. That worked for me, follow that exactly and that method doesn't wipe data.
    Exactly. It's rather frustrating to see the same question asked repeatedly: "Will the factory method wipe my data?"

    No. Just follow the directions exactly as I wrote them.

    I am not a fan of having to restore after a data wipe, and I'm not a fan of anyone else having to wipe data. I don't have any tricks up my sleeve that I'm not sharing.

    The bottom line, for everyone who keeps wondering if your data will be wiped:

    If you read the OP, and did not see any mention of a data wipe being required, then why are you asking?
  • 35
    If you are looking for my guide on a different Pixel, find it here:
    Update 1-26-22: Magisk Beta 24.0 incorporates all previous fixes from Canary.
    Discussion thread for migration to 24.0.

    DO NOT substitute Magisk Stable 23.0 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:

    As many of you know by now, in order to run a patched boot image on Android 12 requires disabling Android Verified Boot.

    Verified Boot on Android 12 devices, at least Pixels with the SD765G and Tensor, is tied to device encryption. Therefore, disabling Verified Boot requires a wipe, if it was not previously disabled.

    To make this clear:
    Verified Boot is disabled by flashing /vbmeta with disable flags:
    Code:
    fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
    Verified Boot is enabled by flashing /vbmeta without flags:
    Code:
    fastboot flash vbmeta vbmeta.img

    Booting the device essentially "locks" the vbmeta state.

    I know this is confusing, Bear with me:

    If you previously disabled vbmeta, you MUST ensure it is disabled again when you update, BEFORE you boot. If you do not, you will have to wipe to regain root.

    Unfortunately, the update process enables Verified Boot by default, because it writes /vbmeta without flags.

    This means that the automatic OTA, or any other update process without intervention, WILL enable Verified Boot, which will require a wipe to disable!


    ****

    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. Take the OTA update when prompted. To check for updates manually, go to Settings > System > System Update > Check for Update
    2. Allow the update to complete. Your device will reboot without root as the OTA overwrites the patched boot image.
    3. Reboot your device to bootloader.
    4. Boot the master root image
      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. Do not flash an older boot image after updating.
    5. Your device should boot with root. Open Magisk, tap Install, and select Direct Install.
    6. Reboot your device. 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. 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.

    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 download the factory zip and manually patch the new boot image. 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.

    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.
    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. 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.

    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.


    Credits:
    Thanks to @ipdev , @kdrag0n , @Didgeridoohan , and last but not least, @topjohnwu for all their hard work![/SPOILER]
    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
    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 was able to take the SD1A.210817.019 to SD1A.210817.036 delta OTA via System Update by restoring my boot (via Magisk) and vbmeta (via dd) partitions back to stock, then patching vbmeta in both slots (again via dd) before rebooting. No data wipe required. To simplify that process, I made a tool to patch and restore the vbmeta partitions:


    The process should be considered experimental until a few other people have tested it. Should anyone attempt it, I would suggest backing up any critical data.

    I'm also considering making a tool to restore the stock boot backup image, in case anyone fastboot flashed, rather than doing a direct install in the Magisk app. It could also be used to download the newly installed boot image from the inactive slot after an OTA, to avoid having to download the full factory image.

    Unfortunately, patching boot in the inactive slot in Magisk was disabled for Pixel devices a while back, since it caused issues with starting back up. When the December OTA comes out, I'll probably take the plunge to see if I can figure out a way to make it work.

    On a related note, a fix that will allow Magisk to properly detect the current slot on Pixel 6 devices has been approved. Hopefully it'll get merged before the next mainline canary build, so we can stop using custom builds (or having to fastboot flash boot_b when on slot B).
    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<<<