How To Guide [CLOSED] Firmware is out! Get your root on!

Status
Not open for further replies.
Search This thread

V0latyle

Forum Moderator
Staff member
Update 12/15/21: Magisk 23016 incorporates fixes for vbmeta header patching; disabling verity/verification is no longer necessary. Update and root should work as it always has - simply patch and flash the boot image.

Any update method can be used. If you've already disabled verity/verification, simply don't worry about it at next update; no need to re-enable.

I am closing this thread.

On Android 12, boot verification must be disabled in order to run a patched boot image. Unfortunately, if you have never disabled it before, it will require you to wipe data. To be clear:
***************************************************
PERMANENT ROOT CURRENTLY REQUIRES A DATA WIPE.
***************************************************
However, if you don't want to lose your data, you can "live boot" the patched image as long as /vbmeta and /boot are stock. This will allow you to use temporary root. DO NOT attempt to Direct Install Magisk to the boot image.

For subsequent updates, it is imperative that you do not allow the device to boot into system before you have disabled Verified Boot.

What this means: If you sideload the OTA, IMMEDIATELY reboot to bootloader and reflash /vbmeta with --disable-verity and --disable-verification. If you dirty flash the factory image, make sure you add these two switches to the command.

If you fail to do this, and allow the device to boot into system, you WILL have to wipe data to disable it again.

IF YOU ARE ROOTED, DO NOT USE AUTOMATIC UPDATES AS THIS WILL REFLASH /VBMETA WITHOUT DISABLING BOOT VERIFICATION!


Factory Images

OTA Images

Latest Magisk Canary

  1. On your device, enable Developer Options (tap build number 8 times), and enable the OEM Unlocking toggle. Reboot to bootloader:
  2. Code:
    adb reboot bootloader
  3. Unlock bootloader:
    Code:
    fastboot flashing unlock
  4. Download the latest factory image and extract it. Inside, you will find the bootloader image, the radio image, and the image-device-buildnumber.zip. Extract boot.img and vbmeta.img from this zip.
  5. Flash vbmeta:
    Code:
    fastboot flash vbmeta --disable-verity --disable-verification <drag and drop vbmeta.img>
  6. Allow the device to boot into Android. Once you have Magisk installed, copy the boot.img and patch it in Magisk, then copy it back to your PC.
  7. Reboot to bootloader.
  8. Flash patched boot image:
    Code:
    fastboot flash boot <drag and drop magisk_patched-23xxx_xxxxx.img>
  9. Reboot into system.

  1. Download the latest factory image and extract it. Inside, you will find the bootloader image, the radio image, and the image-device-buildnumber.zip. Extract boot.img from this zip.
  2. Reboot to bootloader.
  3. Update bootloader and radio if they are out of date. BE CAREFUL, A MISTAKE CAN BRICK YOUR DEVICE! If you update the bootloader, remember to reboot back to bootloader so that the update reads the correct bootloader version.
  4. Update system:
    Code:
    fastboot update --disable-verity --disable-verification <drag and drop image-device-buildnumber.zip here>
    Note: If you get an error for bootloader/radio version, this means you need to update bootloader and/or radio; go back to step 3.
  5. Allow the device to boot into Android. Copy the boot.img and patch it in Magisk, then copy it back to your PC.
  6. Reboot to bootloader.
  7. Flash patched boot image:
    Code:
    fastboot flash boot <drag and drop magisk_patched-23xxx_xxxxx.img>
  8. Reboot into system.

I personally do not recommend updating via OTA Sideload, as you would have to download and extract the factory zip anyway. AUTOMATIC OTA WILL LOSE ROOT AND REQUIRE A WIPE TO ROOT AGAIN.
  1. Sideload the OTA. When complete, IMMEDIATELY reboot to bootloader.
  2. Reflash vbmeta:
    Code:
    fastboot flash vbmeta --disable-verity --disable-verification <vbmeta.img>
  3. Boot to system and allow the update to complete.
  4. Patch and flash the boot image.

Note: If you run into a bootloader message
failed to load/verify boot images
this means you forgot to disable verity and verification. Reflash vbmeta with the --disable options.

If you run into this recovery message
1636658711744.png

This means that verity and verification were not disabled before, and a wipe is required to proceed.
 
Last edited:

snovvman

Senior Member
Jun 6, 2008
1,578
568
Is the current belief that P6P/P6, like P4a and later will require a wipe when rooting after an update either by full image or OTA sideload?
 

Cares

Senior Member
Dec 2, 2010
1,532
281
Google Pixel 4 XL
Google Pixel 4a
If I disable verity and verification will it wipe my device? Also will this wipe remove my eSIM data?

I already unlocked bootloader and setup my device fully so I prefer to not have to start over.

Can I edit the flash.bat to disable verity and verification but remove the wipe flag?

fastboot update --disable-verity --disable-verification raven.zip
 
Last edited:

rester555

Senior Member
Oct 27, 2010
672
316
Google Pixel 6 Pro
Wow, they are using an older image. I wonder if it includes the security update that we received when we first got the phone? The load that ends in .036....

EDIT: I am not sure I can do this since I updated to the .036 update. The boot image might be different.
 
  • Like
Reactions: roirraW "edor" ehT

Goofy19882

Member
Dec 12, 2018
44
21
Grab it here!

Factory image - SD1A.210817.015.A4

OTA - SD1A.210817.015.A4

Magisk 23011

To root:

  1. Download the factory image. Extract it, then extract the raven-image.zip inside it
  2. Copy boot.img to your phone. Patch with Magisk, then copy patched image back to PC.
  3. Unlock bootloader:
    Code:
    fastboot flashing unlock
  4. Flash vbmeta:
    Code:
    fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
  5. Flash patched boot image:
    Code:
    fastboot flash boot magisk_patched-23xxx_xxxxx.img
  6. Reboot, and you're done!
Note: If you run into a bootloader message
failed to load/verify boot images
this means you forgot to disable verity and verification.
If you run into a recovery message
Can't load Android system. Your data may be corrupted
Go ahead and factory wipe, it shouldn't be a big deal since you just did that with the bootloader unlock.
Thanks. Can confirm root is working perfectly
Didnt had to wipe data. Just did a clean wipe before doing rhe adb things
 

rester555

Senior Member
Oct 27, 2010
672
316
Google Pixel 6 Pro
I did that and it works fine. Im sure the kernel did not get updated in the OTA.
Just for clarity. You took the Day 1 OTA on the P6 Pro. You then extracted the boot.img and vbmeta.img from today's binaries and patched boot.img in magisk. Went to bootloader, did the disabling of verification with vbmeta and then flashed the patched magisk image?
 
  • Like
Reactions: roirraW "edor" ehT

Starzboy77

Senior Member
Jun 30, 2010
471
156
OnePlus 7T
Google Pixel 6 Pro
I just got my Pro and set it up and transferred data. Guess I'll have to start over when I unlock the bootloader.

Question though, when future OTAs release, what should we do? Okay to install and just lose root until new binaries are provided to re-root or would we install to new slot through magisk to keep root?
 

V0latyle

Forum Moderator
Staff member
Is the current belief that P6P/P6, like P4a and later will require a wipe when rooting after an update either by full image or OTA sideload?
The potential workaround, which doesn't seem to be solid, is to sideload the OTA, then immediately enter fastboot, and flash /vbmeta and /boot. Sometimes you'll still end up in Rescue Party, where you can either flash back to stock and try again, or give up and wipe. We are still testing over at the Pixel 5 forum.
If I disable verity and verification will it wipe my device? Also will this wipe remove my eSIM data?
No - these flags themselves do not command a wipe; data wipe is separate. I'm not sure about eSIM but I have never had an issue with my phone provisioning on Verizon after a wipe.
I already unlocked bootloader and setup my device fully so I prefer to not have to start over.

Can I edit the flash.bat to disable verity and verification but remove the wipe flag?
Yes.
Wow, they are using an older image. I wonder if it includes the security update that we received when we first got the phone? The load that ends in .036....

EDIT: I am not sure I can do this since I updated to the .036 update. The boot image might be different.
Yeah, I would wait until the .036 firmware drops.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 45
    Update 12/15/21: Magisk 23016 incorporates fixes for vbmeta header patching; disabling verity/verification is no longer necessary. Update and root should work as it always has - simply patch and flash the boot image.

    Any update method can be used. If you've already disabled verity/verification, simply don't worry about it at next update; no need to re-enable.

    I am closing this thread.

    On Android 12, boot verification must be disabled in order to run a patched boot image. Unfortunately, if you have never disabled it before, it will require you to wipe data. To be clear:
    ***************************************************
    PERMANENT ROOT CURRENTLY REQUIRES A DATA WIPE.
    ***************************************************
    However, if you don't want to lose your data, you can "live boot" the patched image as long as /vbmeta and /boot are stock. This will allow you to use temporary root. DO NOT attempt to Direct Install Magisk to the boot image.

    For subsequent updates, it is imperative that you do not allow the device to boot into system before you have disabled Verified Boot.

    What this means: If you sideload the OTA, IMMEDIATELY reboot to bootloader and reflash /vbmeta with --disable-verity and --disable-verification. If you dirty flash the factory image, make sure you add these two switches to the command.

    If you fail to do this, and allow the device to boot into system, you WILL have to wipe data to disable it again.

    IF YOU ARE ROOTED, DO NOT USE AUTOMATIC UPDATES AS THIS WILL REFLASH /VBMETA WITHOUT DISABLING BOOT VERIFICATION!


    Factory Images

    OTA Images

    Latest Magisk Canary

    1. On your device, enable Developer Options (tap build number 8 times), and enable the OEM Unlocking toggle. Reboot to bootloader:
    2. Code:
      adb reboot bootloader
    3. Unlock bootloader:
      Code:
      fastboot flashing unlock
    4. Download the latest factory image and extract it. Inside, you will find the bootloader image, the radio image, and the image-device-buildnumber.zip. Extract boot.img and vbmeta.img from this zip.
    5. Flash vbmeta:
      Code:
      fastboot flash vbmeta --disable-verity --disable-verification <drag and drop vbmeta.img>
    6. Allow the device to boot into Android. Once you have Magisk installed, copy the boot.img and patch it in Magisk, then copy it back to your PC.
    7. Reboot to bootloader.
    8. Flash patched boot image:
      Code:
      fastboot flash boot <drag and drop magisk_patched-23xxx_xxxxx.img>
    9. Reboot into system.

    1. Download the latest factory image and extract it. Inside, you will find the bootloader image, the radio image, and the image-device-buildnumber.zip. Extract boot.img from this zip.
    2. Reboot to bootloader.
    3. Update bootloader and radio if they are out of date. BE CAREFUL, A MISTAKE CAN BRICK YOUR DEVICE! If you update the bootloader, remember to reboot back to bootloader so that the update reads the correct bootloader version.
    4. Update system:
      Code:
      fastboot update --disable-verity --disable-verification <drag and drop image-device-buildnumber.zip here>
      Note: If you get an error for bootloader/radio version, this means you need to update bootloader and/or radio; go back to step 3.
    5. Allow the device to boot into Android. Copy the boot.img and patch it in Magisk, then copy it back to your PC.
    6. Reboot to bootloader.
    7. Flash patched boot image:
      Code:
      fastboot flash boot <drag and drop magisk_patched-23xxx_xxxxx.img>
    8. Reboot into system.

    I personally do not recommend updating via OTA Sideload, as you would have to download and extract the factory zip anyway. AUTOMATIC OTA WILL LOSE ROOT AND REQUIRE A WIPE TO ROOT AGAIN.
    1. Sideload the OTA. When complete, IMMEDIATELY reboot to bootloader.
    2. Reflash vbmeta:
      Code:
      fastboot flash vbmeta --disable-verity --disable-verification <vbmeta.img>
    3. Boot to system and allow the update to complete.
    4. Patch and flash the boot image.

    Note: If you run into a bootloader message
    failed to load/verify boot images
    this means you forgot to disable verity and verification. Reflash vbmeta with the --disable options.

    If you run into this recovery message
    1636658711744.png

    This means that verity and verification were not disabled before, and a wipe is required to proceed.
    11
    So, what exactly are then the steps to flash the OTA without losing root and without wiping everything again? :D
    Currently I'm with Magisk Alpha (Safetynet passed) on .015 firmware.
    1. Download both the OTA AND the factory zips.
    2. Extract boot.img and vbmeta.img from the factory zip.
    3. Patch the new boot.img in Magisk and copy it back to your PC.
    4. Reboot into recovery and sideload the OTA
    Code:
    adb reboot sideload
    adb sideload ota.zip
    5. When the update completes, you'll still be in recovery. DO NOT REBOOT. Select "Enter fastboot"
    6. In fastboot, flash vbmeta:
    Code:
    fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
    7. Now flash boot:
    Code:
    fastboot flash boot magisk_patched-23xxx_xxxxx.img
    8. Reboot, you should come into the new update with root.

    Remember: You get ONE CHANCE, and ONE CHANCE ONLY to flash /vbmeta while in fastboot. If you do something wrong, you will either have to wipe data, or go without root.
    7
    015 rooted to 036 no wipe update
    1. Download the factory image.
    2. Copy boot.img to your phone. Patch with Magisk.
    3. Edit Flash-all.bat
      remove -w and add --disable
      fastboot update --disable-verity --disable-verification image-raven-sd1a.210817.036.zip
    4. Run Flash-all.bat
    5. Boot (don't flash) patched image
      fastboot boot magisk_patched-xxxxx.img
    6. Launch Magisk and tap Install, then Direct Install.
    5
    I think you made the same mistake as me, you extracted the factory image archive, and tried to patch the resulting bootloader-raven-slider-XXXXX.img directly thinking it was the file to patch as it began by "boot" and had the ".img" extension.
    If that's the case, from the factory archive extraction you have to then extract the image-raven-XXXXXXX.zip archive, containing the final "boot.img" file to patch.

    @V0latyle you may want to develop a little bit this part in the OT tutorial, as we might won't be the only ones making this mistake ;)
    In all fairness, this is exactly what my instructions are:
    1. Download the factory image. Extract it, then extract the raven-image.zip inside it
    2. Copy boot.img to your phone. Patch with Magisk, then copy patched image back to PC.

    I'm not really trying to make something idiot proof, there's a certain point where limited knowledge and experience is a good reason to NOT try something. If you're unlocking your phone and messing with software, you SHOULD know what you're doing, and at the very least how to fix it if something goes wrong. This forum is not official support, no one here bears any liability whatsoever, and I don't want to give inexperienced and unfamiliar people the impression they can do something that's way outside of their realm of understanding - just like I wouldn't tell someone how to service their brakes if they don't know the difference between a jack and a jackstand.

    I guess what I'm saying is, if you mistake the bootloader image for the boot image, you probably shouldn't be doing any modifications to your device.