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

[Guide] Flash Magisk on Android 12

Search This thread

pershoot

Inactive Recognized Developer
Dec 1, 2008
7,985
4,358

pershoot

Inactive Recognized Developer
Dec 1, 2008
7,985
4,358
Odd issue, Zygisk was showing: No. I had patched before that was enabled. I repatched while it was on, then reflashed, and now showing Yes, as it should.
 

xstrifey

Member
Aug 22, 2011
23
4
Really noob question sorry - first pixel device, I'm used to using Odin on Samsungs.

I have bootloader unlocked

PS C:\adb> fastboot flash boot magisk_patched.img
target reported max download size of 268435456 bytes
sending 'boot' (98304 KB)...
OKAY [ 2.419s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.565s


Anyone know the reason this would be happening?
 

V0latyle

Forum Moderator
Staff member
Really noob question sorry - first pixel device, I'm used to using Odin on Samsungs.

I have bootloader unlocked

PS C:\adb> fastboot flash boot magisk_patched.img
target reported max download size of 268435456 bytes
sending 'boot' (98304 KB)...
OKAY [ 2.419s]
writing 'boot'...
FAILED (remote: Failed to write to partition Not Found)
finished. total time: 2.565s


Anyone know the reason this would be happening?
Did you previously have a custom ROM on the device? It sounds like you should use Android Flash Tool and force flash all partitions.
 
  • Like
Reactions: elong7681

xstrifey

Member
Aug 22, 2011
23
4
Did you previously have a custom ROM on the device? It sounds like you should use Android Flash Tool and force flash all partitions.

thanks for the response.

The phone is 100% stock, running 12.0 (current firmware), only thing I’ve done so far is unlock the boot loader and create the patched boot file.

I’ll reflash the current firmware using the web-ui and force flash all partitions, and report back.
 

V0latyle

Forum Moderator
Staff member
thanks for the response.

The phone is 100% stock, running 12.0 (current firmware), only thing I’ve done so far is unlock the boot loader and create the patched boot file.

I’ll reflash the current firmware using the web-ui and force flash all partitions, and report back.
Make sure you check "Disable Verity" and "Disable Verification" too.
 

xstrifey

Member
Aug 22, 2011
23
4

Attachments

  • 1.png
    1.png
    67.2 KB · Views: 126
Hi ! I have a mistake Yesterday with LSPosed Zygist Riu when flash the last update my Pixel stay only on black screen or power off/restart/shut down. After test to start on safe mod I can't and flash the boot modified backup and data corrupt. Rrrrr. I do a clean install with Android flash tool with disable verity etc.. And root it no mistake.

But this day after install mod again I loose the root after restart !?
How can to root it again correctly please I don't want to make a clean install again.
Thanks
 

V0latyle

Forum Moderator
Staff member
No success unfortunately
You might have a corrupted device.

One more thing to try though. When in bootloader, use the volume buttons to change to Rescue Mode, then select that. Then, go here: Pixel Repair Tool
Select "Other" for the carrier.

If that doesn't work...your device is probably corrupted.

If you don't mind, explain how you got to the point where you couldn't write to /boot. Did this device work before? What happened between the point where it worked and now?
 

xstrifey

Member
Aug 22, 2011
23
4
You might have a corrupted device.

One more thing to try though. When in bootloader, use the volume buttons to change to Rescue Mode, then select that. Then, go here: Pixel Repair Tool
Select "Other" for the carrier.

If that doesn't work...your device is probably corrupted.

If you don't mind, explain how you got to the point where you couldn't write to /boot. Did this device work before? What happened between the point where it worked and now?
Thanks for the help.

As alternative test I successfully installed graphene OS this morning which went smoothly.

Ill revert back to stock tonight and try the above suggestion. Appreciate the help!
 
Hi ! Please help me 🤪 I have mistake after flash module and loose Root Magisk. I'm on November update wipe data and root but loose it after install a module !? Don't know which module.
I have flash again Magisk boot modified after flash vmbeta (verity & verification) but boot loop ?
I have flash stock boot img after flash vmbeta (verity & verification) and restart.
But I can't root it ? I don't understand ? Do dirty flash Rom for root it ?

Resolve 😄 I can flash Magisk again but without "--slot=all" and all module are uncheck I remove it and install one by one but I think this is the last LSPosed Riru Zygist or Magisk Hide. Don't install MagiskHide I have USN 2.2 and Install stable LSPOSED not the last. 😊

Hi think is MagiskHide make bootloop with last USN & LSPOSED Zygist and not necessary for pass safetynet
 
Last edited:

V0latyle

Forum Moderator
Staff member
Hi ! Please help me 🤪 I have mistake after flash module and loose Root Magisk. I'm on November update wipe data and root but loose it after install a module !? Don't know which module.
I have flash again Magisk boot modified after flash vmbeta (verity & verification) but boot loop ?
I have flash stock boot img after flash vmbeta (verity & verification) and restart.
But I can't root it ? I don't understand ? Do dirty flash Rom for root it ?

Resolve 😄 I can flash Magisk again but without "--slot=all" and all module are uncheck I remove it and install one by one but I think this is the last LSPosed Riru Zygist or Magisk Hide. Don't install MagiskHide I have USN 2.2 and Install stable LSPOSED not the last. 😊

Hi think is MagiskHide make bootloop with last USN & LSPOSED Zygist and not necessary for pass safetynet
If you have questions about a Magisk module, please post in the Magisk General Support Discussion thread or contact the developer of the module.
 
  • Like
Reactions: ggkameleon
If you have questions about a Magisk module, please post in the Magisk General Support Discussion thread or contact the developer of the module.
Good evening.
Yes I would do it like that next time.

It's just that I wanted to explain the situation well and especially to know if it was necessary to flash the "vbmeta.img & verity & verification" to return to the original Boot.img and same for Re-Root and flash the "modified Boot.img".
But you answered my question and thank you. it's not necessary ! only for an update.
Have a good day thanks again
 

V0latyle

Forum Moderator
Staff member
Good evening.
Yes I would do it like that next time.

It's just that I wanted to explain the situation well and especially to know if it was necessary to flash the "vbmeta.img & verity & verification" to return to the original Boot.img and same for Re-Root and flash the "modified Boot.img".
But you answered my question and thank you. it's not necessary ! only for an update.
Have a good day thanks again
Restoring the boot image does not require that you do anything with vbmeta. In fact I would recommend that you don't.
 

xstrifey

Member
Aug 22, 2011
23
4
All resolved now. Updated the platform tools folder and followed same process and worked this time.

Now just to remove replace google apps with micro-g and enjoy!
 

Krsmqn

Senior Member
Jan 23, 2012
1,193
328
OnePlus 7 Pro
Google Pixel 5
Most recent Canary update is giving me this issue where no matter what I do, when I reboot, it goes right back to the same screen, asking me to download additional stuff. Is anyone else having this issue?

On another note, I am passing safety net with 2.2.0. 👍🏻
 

Attachments

  • Screenshot_20211119-215256.png
    Screenshot_20211119-215256.png
    123.3 KB · Views: 43
  • Screenshot_20211119-220725.png
    Screenshot_20211119-220725.png
    101 KB · Views: 42
Last edited:

Homeboy76

Senior Member
Aug 24, 2012
2,886
1,509
Google Pixel XL
Most recent Canary update is giving me this issue where no matter what I do, when I reboot, it goes right back to the same screen, asking me to download additional stuff. Is anyone else having this issue?

On another note, I am passing safety net with 2.2.0. 👍🏻
I had this problem before, the Magisk version was 23001 and the App version was 23014.

What I was told to do by @andybones (Staff Member) was to uninstall Magisk App: Open Settings => Apps => See all... => Scroll down to Magisk => Tap it => Tap Uninstall (Magisk will not be uninstalled, only the Magisk 23014 app) => Reboot => install Magisk ( app-debug_23001.apk) => reboot.

Notes:
  1. I add the _230xx to Magisk app-debug.apk after I download them. Why? I have a habit of keeping the old and new app-debug.apk in the same folder, the added portion helps me distinguish between the two.
  2. Make sure you have Magisk Alpha/Canary.apk 23013 stored on your phone prior to uninstalling Magisk App 23014.
  3. Install Magisk 23013.apk after you uninstall the Magisk App.
  4. You will not lose root.

After, the reboot when you open Magisk, there will be an Update next to App.

It should be for Magisk 23014, if you want to update to that version: Tap the Update button and tap Direct install.

See what @andybones, wrote Scroll down read posts #370, 379 and 380 and thank him.
 
Last edited:
  • Like
Reactions: Krsmqn

Krsmqn

Senior Member
Jan 23, 2012
1,193
328
OnePlus 7 Pro
Google Pixel 5
I had this problem before, the Magisk version was 23001 and the App version was 23014.

What I was told to do by @andybones (Staff Member) was to uninstall Magisk App: Open Settings => Apps => See all... => Scroll down to Magisk => Tap it => Tap Uninstall (Magisk will not be uninstalled, only the Magisk 23014 app) => Reboot => install Magisk ( app-debug_23001.apk) => reboot.

Notes:
  1. I add the _230xx to Magisk app-debug.apk after I download them. Why? I have a habit of keeping the old and new app-debug.apk in the same folder, the added portion helps me distinguish between the two.
  2. Make sure you have Magisk Alpha/Canary.apk 23013 stored on your phone prior to uninstalling Magisk App 23014.
  3. Install Magisk 23013.apk after you uninstall the Magisk App.
  4. You will not lose root.

After, the reboot when you open Magisk, there will be an Update next to App.

It should be for Magisk 23014, if you want to update to that version: Tap the Update button and tap Direct install.

See what @andybones, wrote Scroll down read posts #370, 379 and 380 and thank him.
Thank You for the reply, however, after following your instructions, I was left with the same results.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Trying to root the Pixel 5 running Android 12 by flashing a magisk-patched boot image results in the phone only booting to fastboot mode ("failed to load/verify boot images")
    Some users have reported that booting (instead of flashing) the patched boot image works and makes root temporarily available but i didn't have any success with that.
    The phone booted up but root didn't work.

    I won't explain how to unlock the bootloader or set up adb here.

    !Warning! This will wipe your phone so take a backup!

    Also i do not take any responsibility if you break your device.
    And if anything goes wrong just factory reset your device using the Android Flash Tool or by following this tutorial.

    Here's what i did to get Magisk v22.0 working on the first developer preview of Android 12:


    Install A12 with disabled AVB & dm-verity:
    1. Make sure USB-Debugging is enabled in developer-options and you have authorized the pc you're using on your phone.

    2. Boot your phone into fastboot mode.
      You can do this by turning it off and then starting it by holding Power + Volume Down
      until fastboot mode appears or just adb reboot bootloader

    3. Go here and click on the link for the Android Flash Tool.
      (I didn't copy the link directly so i don't have to update it everytime google releases a new update)

    4. It should ask you to allow the website to access ADB Keys. Click Ok.
      If the website somehow doesn't work, try using Google Chrome.

    5. Select your Pixel 5. If it's not showing up click add device.

    6. Click on the edit symbol (pen) in the box where the selected build is shown.

    7. Make sure Wipe Device, Disable Verity and Disable Verification are checked.

    8. Install and boot the phone when it's finished.

    Patch & flash boot.img
    1. Download and install the Magisk Canary App from GitHub.

    2. Download the factory image from here and extract boot.img from it.
      (Inside the downloaded zip-file is another zip file containing the boot image)

    3. Copy the extracted boot.img to your phone and open the magisk app.

    4. Click on Install -> Select and Patch a File and let it do its magic.

    5. Copy the magisk-patched boot image that should be found in your phones download folder back to your PC.

    6. Reboot into fastboot mode as i explained earlier and flash the patched boot image.
      (fastboot flash boot magisk_patched.img)
      Then reboot the device.

    Now root should be working. If it bootloops and says your phone has to be factory reset, do it.
    If for some reason you still get an AVB-Error and end up stuck in fastboot mode just flash the stock image and try to patch it again.

    This is my first post on here and i didn't have much time but i'm glad if it helped at least one person.
    6
    @Anonshe posted ths method in the Pixel 6 Pro thread. Does this work for the Pixel 4a 5(G), Pixel 5 or the Pixel 5a?
    Just updated my Pixel 5 to the November Sec Patch without any data loss. Since I'd disabled vbmeta before, steps were simple:
    - Used Payload Dumper to extract the boot and vbmeta images. Patched the former.
    - Rebooted to Recovery
    - Sideloaded the OTA package
    - Reboot to bootloader from the recovery menu
    Code:
    fastboot --disable-verification --disable-verity flash vbmeta vbmeta.img
    Code:
    fastboot boot magisk_patched.img

    After it booted up, opened Magisk Manager, installed via Direct Install. All works fine.
    5
    For those of you who don't have safetynet working, here.
    All credit goes to @kdrag0n, I just modified the shell scripts for B3

    Pull request done if you don't want my zip.
    4
    Has anyone sucefully rooted beta 3?
    Patched boot image with magisk canary if I only boot the image it starts
    Then tried to flash patched boot image and get stuck in bootloader
    For all the updates from beta 2 - 3 I've followed this process without fail:

    - extract boot.img and vbmeta.img from downloaded beta of your relevant device
    - add boot.img to phone (if downloaded, and extracted on another device)
    - patch boot.img in magisk (i like to rename it to patched_magisk.img)
    - move patched_magisk.img to desktop
    - download and install latest beta from the OTA provided
    - tap the reboot button on the OTA install screen once completed
    - once the reboot begins and your screen turns black hit the power and volume down button to get into fastboot
    - run
    fastboot --disable-verity --disable-verification flash vbmeta path/to/vbmeta.img (you can drag img from location)
    - then run
    fastboot flash boot path/to/patched_magisk.img (you can drag img from location)

    This has worked flawlessly, maintaining root while also keeping all my data.
    4
    Yeah I wouldn't do this unless you've started from the initial process op outlined. I did this moving from beta 2 to 2.1 and then beta 2.1 to beta 3. However beta 2 was my first android 12 install, which I used ops procedure to achieve.

    Do this:
    You don't need the Android flash tool. I have been manually flashing full images for a long time:
    I don't like things done behing my back.

    For beta 3:
    I flash both sides hence the skip secondary - it saves a few seconds.
    When flashing - watch what's scrolling by. The vbmeta.img is modified on the fly.
    No need to copy from another build or someone else's hack.
    Below is what I use. Successfully.

    Modify the last line in the flash-all.bat or.sh
    fastboot --skip-reboot --skip-secondary --disable-verity --disable-verification update image-redfin-spb3.210618.013.zip