How To Guide Method to upgrade every month, without wiping data and retaining root

Search This thread

eracet

Senior Member
Nov 27, 2010
220
31
I am on magisk 24304 and seen an update to 24305. Someone mentioned downgrading magisk. Didn't find an way method besides unrooting and rerooting. Did anyone have issues with 24305? Don't want to start April update unless know magisk is good
 

Lughnasadh

Senior Member
Mar 23, 2015
3,409
3,447
Google Nexus 5
Huawei Nexus 6P
I am on magisk 24304 and seen an update to 24305. Someone mentioned downgrading magisk. Didn't find an way method besides unrooting and rerooting. Did anyone have issues with 24305? Don't want to start April update unless know magisk is good
Canary Magisk 24305 is working fine for me on the April update. However, I would not suggest using "Install to Inactive Slot" to update to the April build, as people are having problems with that method and the April build, even on the Stable Magisk.

A fix appears to be in the works:
 
Last edited:
  • Like
Reactions: roirraW "edor" ehT

eracet

Senior Member
Nov 27, 2010
220
31
I think I did something wrong or missed a step. Wanted to do a double check.

Flashed raven-slider-1.1-8167057.img
Restarted Bootloader

Flashed Radio img

Flashed modified magiskpatched image


I think I missed the update raven zip without the disable verify .

It rebooted fine, and its all working,
 

bowlandspoon

Senior Member
I think I did something wrong or missed a step. Wanted to do a double check.

Flashed raven-slider-1.1-8167057.img
Restarted Bootloader

Flashed Radio img

Flashed modified magiskpatched image


I think I missed the update raven zip without the disable verify .

It rebooted fine, and its all working,

I would think if you didn't flash the zip then you haven't updated to the newer system version.
 
  • Like
Reactions: roirraW "edor" ehT

eracet

Senior Member
Nov 27, 2010
220
31
And it should be something like this? I dont want to mess it up again.

fastboot --disable-verity --disable-verification --skip-reboot update raven-sp2a.220405.004-factory-bce807a6.zip


Edit: Ok I got it, this was full package, did extract and do the included zip file.

Posting for my own reference and others if interested, even though its posted a lot of times already

Here was my full order and worked fine. No issues, April 2022
Magisk 24306

1: Download update from https://developers.google.com/android/images
2: Extract the factory zip, then extract the embeded factory zip to get boot.img
3: Put boot.img onto phone.
4: Magisk install Select and Patch a file. Select the boot.img
5: Find the patched img file. Mine was under download folder.
6: Place adb, all zip files , modified magisk under same folder and open cmd
7: Phone to fastboot: Volume down, power button on boot or restart.

I did the rest manually instead of using the bat file, bat file is automated but wanted to do it this way instead.
And this is the exact commands I put into fastboot (Change the img and others according to update)
I also verified fastboot devices before starting process

8: fastboot flash bootloader bootloader-raven-slider-1.1-8167057.img
fastboot reboot-bootloader
9: fastboot flash radio radio-raven-g5123b-97927-220225-b-8226700.img
fastboot reboot-bootloader

This is the zip included in your main zip file. The command may be slightly different,(May have an extra -image in that command)
10: fastboot --skip-reboot update image-image-raven-sp2a.220405.004.zip
fastboot reboot-bootloader
11: fastboot flash boot magisk_patched-24306_jgjCY.img
fastboot reboot

Should reboot and all should be good
 
Last edited:

A.Priori

Senior Member
May 26, 2011
450
102
And it should be something like this? I dont want to mess it up again.

fastboot --disable-verity --disable-verification --skip-reboot update raven-sp2a.220405.004-factory-bce807a6.zip


Edit: Ok I got it, this was full package, did extract and do the included zip file.

Posting for my own reference and others if interested, even though its posted a lot of times already

Here was my full order and worked fine. No issues, April 2022
Magisk 24306

1: Download update from https://developers.google.com/android/images
2: Extract the factory zip, then extract the embeded factory zip to get boot.img
3: Put boot.img onto phone.
4: Magisk install Select and Patch a file. Select the boot.img
5: Find the patched img file. Mine was under download folder.
6: Place adb, all zip files , modified magisk under same folder and open cmd
7: Phone to fastboot: Volume down, power button on boot or restart.

I did the rest manually instead of using the bat file, bat file is automated but wanted to do it this way instead.
And this is the exact commands I put into fastboot (Change the img and others according to update)
I also verified fastboot devices before starting process

8: fastboot flash bootloader bootloader-raven-slider-1.1-8167057.img
fastboot reboot-bootloader
9: fastboot flash radio radio-raven-g5123b-97927-220225-b-8226700.img
fastboot reboot-bootloader

This is the zip included in your main zip file. The command may be slightly different,(May have an extra -image in that command)
10: fastboot --skip-reboot update image-image-raven-sp2a.220405.004.zip
fastboot reboot-bootloader
11: fastboot flash boot magisk_patched-24306_jgjCY.img
fastboot reboot

Should reboot and all should be good
nice, gonna try this myself
 

bowlandspoon

Senior Member
And it should be something like this? I dont want to mess it up again.

fastboot --disable-verity --disable-verification --skip-reboot update raven-sp2a.220405.004-factory-bce807a6.zip


Edit: Ok I got it, this was full package, did extract and do the included zip file.

Posting for my own reference and others if interested, even though its posted a lot of times already

Here was my full order and worked fine. No issues, April 2022
Magisk 24306

1: Download update from https://developers.google.com/android/images
2: Extract the factory zip, then extract the embeded factory zip to get boot.img
3: Put boot.img onto phone.
4: Magisk install Select and Patch a file. Select the boot.img
5: Find the patched img file. Mine was under download folder.
6: Place adb, all zip files , modified magisk under same folder and open cmd
7: Phone to fastboot: Volume down, power button on boot or restart.

I did the rest manually instead of using the bat file, bat file is automated but wanted to do it this way instead.
And this is the exact commands I put into fastboot (Change the img and others according to update)
I also verified fastboot devices before starting process

8: fastboot flash bootloader bootloader-raven-slider-1.1-8167057.img
fastboot reboot-bootloader
9: fastboot flash radio radio-raven-g5123b-97927-220225-b-8226700.img
fastboot reboot-bootloader

This is the zip included in your main zip file. The command may be slightly different,(May have an extra -image in that command)
10: fastboot --skip-reboot update image-image-raven-sp2a.220405.004.zip
fastboot reboot-bootloader
11: fastboot flash boot magisk_patched-24306_jgjCY.img
fastboot reboot

Should reboot and all should be good

This worked for me.
Also I used Magisk Stable (24300) to patch boot image and all good.
 
  • Like
Reactions: roirraW "edor" ehT

CRXed

Senior Member
Jan 7, 2010
1,946
1,223
  • Like
Reactions: roirraW "edor" ehT

mkhcb

Senior Member
Nov 2, 2012
312
319
So the above method (Uninstall Magisk and then taking the OTA) doesn't work.


So I reflashed the complete Factory image.
Rebooted.
Then flashed the patched magisk boot image.
Now all is fine with working root and Magisk modules.

Using Magisk 24300.
That method has never seemed to work well. At least I never got it to work. I am so afraid to update now after 2 full resets where I lost all my data. My phone is finally working flawlessly and I don't want to screw that up.
 

CRXed

Senior Member
Jan 7, 2010
1,946
1,223
That method has never seemed to work well. At least I never got it to work. I am so afraid to update now after 2 full resets where I lost all my data. My phone is finally working flawlessly and I don't want to screw that up.
Just use this method

 

mkhcb

Senior Member
Nov 2, 2012
312
319
Just use this method

I have use similar methods in the past and that works, just cumbersome to update monthly with a computer.
 

Dataman100

Senior Member
Nov 23, 2010
88
65
Just used this method to update to the May release. No issues. Root retained, versions checked, SafetyNet passes, Gpay launches. All is good.

Good luck everyone
 
  • Like
Reactions: jcp2

Dataman100

Senior Member
Nov 23, 2010
88
65
What version of magisk are you using?

I updated the App, (but not the actual Magisk) to 24306 right before I started. I then copied over the boot.img, patched it with the new App, and copied it back to the PC. I then followed the instructions in the OP.

FYI. I still have "--disable-verity --disable-verification" in my update command line. I know it's not required with the new Magisk, but it's been working since the beginning and I see no reason to change it as I've had zero problems updating every month with it in there.

Best of luck!
 

KHANrad_SIN

Senior Member
Jul 4, 2014
247
60
I updated the App, (but not the actual Magisk) to 24306 right before I started. I then copied over the boot.img, patched it with the new App, and copied it back to the PC. I then followed the instructions in the OP.

FYI. I still have "--disable-verity --disable-verification" in my update command line. I know it's not required with the new Magisk, but it's been working since the beginning and I see no reason to change it as I've had zero problems updating every month with it in there.

Best of luck!
Thanks for the heads up!
For anyone wondering, I was successfully able to update to the May patch with magisk canary 24307.
 
Last edited:

basily

Senior Member
I don't know what it is, but the last 3 months, I always get stuck at the google logo (after seeing the "your device is corrupt" message at boot, and having to press the power button to continue booting. I uninstall remove magisk modules and uninstall magisk and reboot, then shut down and boot into the bootloader. Always stuck at the google logo after flashing; with or without the patched boot image.

The ONLY way I've been able to update is by using the Android Flash Tool, booting up, and then shutting down and booting into the bootloader to flash the patched boot.img. What a pain! It means I have to download the entire damn image twice!
 

RetroTech07

Senior Member
Apr 24, 2021
346
263
Google Pixel 2 XL
Google Pixel 6 Pro
I don't know why folks continue to have issues updating when a new Android update is released. Despite Magisk having the option to install to an inactive slot for easy OTA updating, I simply avoid it and go the old-school route of updating via sideload to prevent any issues.

In hopes of putting to rest issues some of you face, here is what I do:

  • Make a backup of all my important files in case something goes wrong
  • Disable any Magisk modules if it makes you feel any safer
  • Download the OTA image online and NOT from the system update!
  • Reboot to recovery and sideload the OTA by using:
Code:
adb reboot sideload
  • Then, in recovery I load up the file by using:
Code:
adb sideload "insert OTA file name here.zip"
  • Once it finishes, you will be in recovery mode. Select "Reboot to system now".
  • Once the system reboots, I unlock the device and let it finish completing the update before anything else.
I then proceed to root the device as I normally would, by:
  • Getting the NEW boot.img file from the full factory image
  • Copy it to my mobile device
  • Open up Magisk and patch the boot.img file
  • Copy the patched file to my PC
  • Reboot into bootloader using:
Code:
adb reboot bootloader

Then, patch the new boot.img using:

Code:
fastboot flash boot "patched_boot.img"

Reboot / Done.

I have not had it fail once using this process on stable Magisk and NO "disable" tags. The only reason I can see for anyone to use Canary versions of Magisk or "disable" tags, is if its absolutely required for some modules, ROMs, or kernels you are using. If it's not needed, just leave it alone.

You could technically just dirty flash the entire full factory image using the Android Flash Tool or flash-all.bat script on your PC, but the script file is where I find most folks mess up because they copy and pasted instructions improperly, or there's a line of code they forgot to add or remove without proofreading before running the script. I'd rather take matters into my own hands, even if it means completing more steps to make sure things go smoothly.

Anyway, I hope this helps someone!
 

dr_rick13

Senior Member
Apr 15, 2011
1,184
618
OnePlus 6
OnePlus 6T
I don't know why folks continue to have issues updating when a new Android update is released. Despite Magisk having the option to install to an inactive slot for easy OTA updating, I simply avoid it and go the old-school route of updating via sideload to prevent any issues.

In hopes of putting to rest issues some of you face, here is what I do:

  • Make a backup of all my important files in case something goes wrong
  • Disable any Magisk modules if it makes you feel any safer
  • Download the OTA image online and NOT from the system update!
  • Reboot to recovery and sideload the OTA by using:
Code:
adb reboot sideload
  • Then, in recovery I load up the file by using:
Code:
adb sideload "insert OTA file name here.zip"
  • Once it finishes, you will be in recovery mode. Select "Reboot to system now".
  • Once the system reboots, I unlock the device and let it finish completing the update before anything else.
I then proceed to root the device as I normally would, by:
  • Getting the NEW boot.img file from the full factory image
  • Copy it to my mobile device
  • Open up Magisk and patch the boot.img file
  • Copy the patched file to my PC
  • Reboot into bootloader using:
Code:
adb reboot bootloader

Then, patch the new boot.img using:

Code:
fastboot flash boot "patched_boot.img"

Reboot / Done.

I have not had it fail once using this process on stable Magisk and NO "disable" tags. The only reason I can see for anyone to use Canary versions of Magisk or "disable" tags, is if its absolutely required for some modules, ROMs, or kernels you are using. If it's not needed, just leave it alone.

You could technically just dirty flash the entire full factory image using the Android Flash Tool or flash-all.bat script on your PC, but the script file is where I find most folks mess up because they copy and pasted instructions improperly, or there's a line of code they forgot to add or remove without proofreading before running the script. I'd rather take matters into my own hands, even if it means completing more steps to make sure things go smoothly.

Anyway, I hope this helps someone!
Thanks for the guide bro, very useful. Out of curiosity, which Magisk did you use to patch the May boot.img?
Cheers
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Just used the method in the OP to update. All good! Checked version, root retained, SafetyNet Passes, Gpay launches, Duo Mobile passes all checks. No issues.

    This method has been the fastest most consistent way for me to update since day 1 of the P6P. In total it takes about 10 minutes. Five minutes to extract the boot.img, copy it to the phone, patch, copy patched image back, and modify the flash-all.bat. Then slightly under 5 minutes to reboot into the bootloader and run the .bat file. Which basically consists of watching the screen for errors. Much easier for me than all the convoluted steps in some of the procedures previously described. It has been 100% successful every time.

    Best of luck to everyone!

    Dave
    1
    Just used the method in the OP to update. All good! Checked version, root retained, SafetyNet Passes, Gpay launches, Duo Mobile passes all checks. No issues.

    This method has been the fastest most consistent way for me to update since day 1 of the P6P. In total it takes about 10 minutes. Five minutes to extract the boot.img, copy it to the phone, patch, copy patched image back, and modify the flash-all.bat. Then slightly under 5 minutes to reboot into the bootloader and run the .bat file. Which basically consists of watching the screen for errors. Much easier for me than all the convoluted steps in some of the procedures previously described. It has been 100% successful every time.

    Best of luck to everyone!

    Dave
    Excellent :)
  • 67
    Caution: I originally wrote this guide when it was necessary to disable verity and verification before flashing patched boot.img. Now Magisk has overcome this requirement and some users have reportedly flashed updates without disabling verification and verity and did not have to wipe their phones, but request everyone, who have verification and verity disabled and using this guide, make sure you backup all the data and post your results here (I suggest backing up data anyway for everyone).

    Following is a guide to update Pixel 6 Pro (perhaps all Pixel devices) every month, without wiping and retaining root. I tested it on my Pixel 6 Pro from 12.0.0 (SD1A.210817.015.A4, Oct 2021) to 12.0.0 (SD1A.210817.036, Nov 2021). There is no reason that it should not work on subsequent monthly patches, but just take the backups to be sure.

    1) Download the latest factory image for your device and platform-tools from the official Google site and extract them in one folder.

    2) Extract the boot.img from image-raven-xxxxxxx.zip which was extracted from the image in the above step and patch it in Magisk Manager (latest canary build from https://github.com/topjohnwu/Magisk) on your phone and copy it back to the folder where you extracted the factory image and platform-tools. Rename the copied file to magisk_patched.img

    3) Open flash-all.bat in notepad, add --skip-reboot and remove -w from the fastboot update line. Also add the following lines after the fastboot update line to flash the Magisk patched boot.img automatically:

    fastboot reboot-bootloader
    ping -n 5 127.0.0.1 >nul
    fastboot flash boot magisk_patched.img
    fastboot reboot

    After editing, the edited part of your flash-all.bat should look something like this:

    Code:
    fastboot --skip-reboot update [****image_name****]
    fastboot reboot-bootloader
    ping -n 5 127.0.0.1 >nul
    fastboot flash boot magisk_patched.img
    fastboot reboot
    
    echo Press any key to exit...

    Note: [****image_name****] is just a placeholder and needs to be the name of zip file which was originally there in flash-all.bat, do not change that. Be careful to rename the Magisk patched boot.img to magisk_patched.img or in the alternative make appropriate modifications in the flash-all.bat

    4) Open command prompt and go the folder where you extracted factory image and platform-tools. Type the following commands:

    adb reboot bootloader
    flash-all.bat

    Your device should be upgraded to the latest factory image, while retaining root, without wiping data.

    Update 1: I updated from 12.0.0 (SD1A.210817.036, Nov 2021) to 12.0.0 (SD1A.210817.037, Nov 2021) successfully using my method, without loosing data and root.

    Update 2: I updated from 12.0.0 (SD1A.210817.037, Nov 2021) to 12.0.0 (SQ1D.211205.016.A1, Dec 2021) successfully using my method, without loosing data and root.

    Update 3: I updated from 12.0.0 (SQ1D.211205.016.A1, Dec 2021) to 12.0.0 (SQ1D.220105.007, Jan 2022) successfully using my method, without loosing data and root.

    Update 4: I updated from 12.0.0 (SQ1D.220105.007, Jan 2022) to 12.0.0 (SQ1D.220205.003, Feb 2022) successfully using my method, without loosing data and root.

    Update 5: I updated from 12.0.0 (SQ1D.220205.003, Feb 2022) to Android 12L DP 3 successfully using my method, without loosing data and root.

    Update 6: I updated from Android 12L DP 3 to Android 13 DP successfully using my method, without loosing data and root.
    9
    Just tried this on my P6Pro. Managed to update from .015 to .036 and retained root.
    Also still passing SafetyNet with USNF 2.2 beta
    8
    I don't know why folks continue to have issues updating when a new Android update is released. Despite Magisk having the option to install to an inactive slot for easy OTA updating, I simply avoid it and go the old-school route of updating via sideload to prevent any issues.

    In hopes of putting to rest issues some of you face, here is what I do:

    • Make a backup of all my important files in case something goes wrong
    • Disable any Magisk modules if it makes you feel any safer
    • Download the OTA image online and NOT from the system update!
    • Reboot to recovery and sideload the OTA by using:
    Code:
    adb reboot sideload
    • Then, in recovery I load up the file by using:
    Code:
    adb sideload "insert OTA file name here.zip"
    • Once it finishes, you will be in recovery mode. Select "Reboot to system now".
    • Once the system reboots, I unlock the device and let it finish completing the update before anything else.
    I then proceed to root the device as I normally would, by:
    • Getting the NEW boot.img file from the full factory image
    • Copy it to my mobile device
    • Open up Magisk and patch the boot.img file
    • Copy the patched file to my PC
    • Reboot into bootloader using:
    Code:
    adb reboot bootloader

    Then, patch the new boot.img using:

    Code:
    fastboot flash boot "patched_boot.img"

    Reboot / Done.

    I have not had it fail once using this process on stable Magisk and NO "disable" tags. The only reason I can see for anyone to use Canary versions of Magisk or "disable" tags, is if its absolutely required for some modules, ROMs, or kernels you are using. If it's not needed, just leave it alone.

    You could technically just dirty flash the entire full factory image using the Android Flash Tool or flash-all.bat script on your PC, but the script file is where I find most folks mess up because they copy and pasted instructions improperly, or there's a line of code they forgot to add or remove without proofreading before running the script. I'd rather take matters into my own hands, even if it means completing more steps to make sure things go smoothly.

    Anyway, I hope this helps someone!
    7
    So I notice there are some people, like me, that are a bit confused on how to exactly do this process. I like to be nice every once in a while, so this is my time. I will try to do a step by step process with exactly how I did after reading, and re-reading all the comments on how to do it (with pictures cuz I need pictures to learn haha).

    These are the exact steps I took when I updated from .36 to .37

    I downloaded the .37 zip, the one for your phone, mine is an unlocked version.
    LaL2hSk_0qyLp5oaPEuURPDf5vItZ4YnlNFR2UPtQMRGIvceVoBc8nGvxpmu90RonBslivQblX8-YrygqYIrtbz1B7AvAPk8lKQ4z5jctSVh97hWwkzuO2kK2Os7doqxiUK-HJrx


    Slapped the .37 zip file into a folder by itself so I can extract it inside that same folder. It should look like this once its extracted inside the same folder.

    1637794601085.png


    Then I opened another folder/window with the Platform-tools so I can easily navigate between the 2 folders.

    Then I opened the flash-all.bat from the zipped folder, to see what it contains, noticed that it flashes 3 files/images.
    “bootloader-raven-slider”
    “radio-raven”
    “Image-raven-sd1a”
    b-Lrwcu7O5sU1Yges_LPc33ynTBNbVMki5KPtndnhgTLKp05njPQO_uoik6Tw11_tDyM7jCAlm0SjBbzK6b7MOkoKSOku9uhclnTclBZPDDfHumwjqLNrtHKRJ2yUoRf1B_y8EPW

    Then close the file as we dont need it right now.

    So with this I know that I will need to add those 3 files to the platform-tools folder when I go to actually run the command.

    I actually took the .37 boot.img and copied it into my pixel with version .36 still running.
    The boot.img is inside the zipped folder and when you extracted it, it will now be viewable along with other files and the zipped folder still there.
    1637794847696.png


    copy this boot into the main folder of the pixel
    1637795054884.png


    On your Pixel, open Magisk and click install then select patch file, navigate to the boot.img file in your internal storage.
    Patch it with Magisk and then take the patched boot.img (which that file will actually be in your downloads folder in your Pixel) and copied it back to my computer.

    So as of now, it seems we are able to patch boot.img with current build without having to update then patch then flash. We can just patch on the current build then copy the patch to the computer and run the rest of the steps.

    Now that I have the patched boot.img on my computer, I will take all the highlighted files in the picture, plus the patched boot.img over to the Platforms-tools folder and just copy them in that folder.
    Here, I’m not sure how everyone else has their folder since I rarely use those tools, so I just add the files and then delete them after I’m done flashing. See picture of all copied in files. (dont forget your patched boot.img)

    -Q2fqEHQmA5DPStoBV4ht9FVinUy7MD2GF4bi38EhGlItokhERTlrJAknwjGtSGXeMTVPnQn-6FZwXFqLJljCjYmrh3rYl4XPrDdLoyBO4QSOaaact8E2FvXwxjCZRfudWUgt_3m


    Now I will open the flash-all.bat that's inside the Platform-tools using Notepad ++ (personal preference).
    Edit this file exactly like in the picture. Add the lines exactly how it shows in the picture.
    **NOTE** that you need to type the exact patched boot file in there. So, like in this picture, but with YOUR patched "magisk_patched" file as this will have your own ID after 23014.
    1637734768289.png

    once you made the edits on this file, dont forget to save it before you run the commands!

    Now plug in your phone to the computer.
    Make sure you have USB debugging turned on.
    Press shift and right click inside the Platform-tools folder and open Command Prompt.
    run these 2 commands:
    adb reboot bootloader
    flash-all.bat

    When it's all done, your phone will boot up and you will be on the new .37
    Nothing else to add here as it will literally run through everything for you and boot up and you're done.

    Hope this helps someone, as I am a visual learner myself.
    7
    couldnt we just add step 5 into the flash-all file? for example:
    fastboot reboot-bootloader
    fastboot flash boot magisk_patched-xxxxx.img
    fastboot reboot

    like in the picture? or would it not actually run that way?
    View attachment 5465521
    holy poop that worked!! i was scared to try it myself but since i have a backup phone with all my data on it, it wouldnt be so bad to wipe the pixel if i messed it up doing it this way! But hey, it actually worked!!
    here is the modified flash-all and yes you will need the "ping" line after the update line.
    1637619349812.png


    so with this, no need to type extra stuff, just add it all in the flash-all file and run the first 2 commands:
    adb reboot bootloader
    flash-all.bat

    and thats it, the only time consuming part is patching the boot, putting it in the folder with the platform-tools.