Question "Your device is corrupt" after November Update with Magisk OTA method.

Search This thread

simplepinoi177

Forum Moderator
Staff member
Hi
I ran into the same issue on pixel 6.
Had rooted the phone when on Nov 22 patch. Current active slot was "b" before downloading and installing the Dec 22 OTA update.
On rebooting from magisk (after installation to inactive slot) got the message "Your device is corrupt Press power button to continue". But I didn't press the power button and the phone got switched off. Restarted the phone and the phone booted to old slot "b" itself.
But now Magisk shows as not installed so have lost root and also the phone is still on November update.
Would it be possible to correct the corruption in slot "a" and boot into it ?
I suggest you running badabing2003's Pixel Flasher, using the December Full Factory image, making sure to enable "Expert mode" and select "Keep Data" & "flash to both slots" (I suppose you could always "flash to inactive slot" but why risk it, there shouldn't be any harm flashing the full factory image to both slots -- just to be safe) -- disclaimer: I have never used Pixel Flasher, so I'm only going off of screenshots of the GUI; i'm fairly certain you can select "Keep Data" & "flash to..." at the same time, but i'm not 100%, but if not for some reason I can walk you through doing this manually without the GUI -- and then re-rooting which you can also do in the GUI.
I imagine the only real way to find out if your slot_a is corrected is by switching your active slot (of course by rebooting to bootloader first) and seeing if it loads up properly. It seems you can do all of that also using the Pixel Flasher GUI.

Hopefully it works out and hope this helps...
 
  • Like
Reactions: jackuphill

jackuphill

Member
Sep 22, 2013
25
5
I suggest you running badabing2003's Pixel Flasher, using the December Full Factory image, making sure to enable "Expert mode" and select "Keep Data" & "flash to both slots" (I suppose you could always "flash to inactive slot" but why risk it, there shouldn't be any harm flashing the full factory image to both slots -- just to be safe) -- disclaimer: I have never used Pixel Flasher, so I'm only going off of screenshots of the GUI; i'm fairly certain you can select "Keep Data" & "flash to..." at the same time, but i'm not 100%, but if not for some reason I can walk you through doing this manually without the GUI -- and then re-rooting which you can also do in the GUI.
I imagine the only real way to find out if your slot_a is corrected is by switching your active slot (of course by rebooting to bootloader first) and seeing if it loads up properly. It seems you can do all of that also using the Pixel Flasher GUI.

Hopefully it works out and hope this helps...
Thanks for the suggestion. I don't have any data to be saved and don't mind loosing root as it can be done as a later step. Will try out and share the result.
 
  • Like
Reactions: simplepinoi177

jackuphill

Member
Sep 22, 2013
25
5
I suggest you running badabing2003's Pixel Flasher, using the December Full Factory image, making sure to enable "Expert mode" and select "Keep Data" & "flash to both slots" (I suppose you could always "flash to inactive slot" but why risk it, there shouldn't be any harm flashing the full factory image to both slots -- just to be safe) -- disclaimer: I have never used Pixel Flasher, so I'm only going off of screenshots of the GUI; i'm fairly certain you can select "Keep Data" & "flash to..." at the same time, but i'm not 100%, but if not for some reason I can walk you through doing this manually without the GUI -- and then re-rooting which you can also do in the GUI.
I imagine the only real way to find out if your slot_a is corrected is by switching your active slot (of course by rebooting to bootloader first) and seeing if it loads up properly. It seems you can do all of that also using the Pixel Flasher GUI.

Hopefully it works out and hope this helps...
I just downloaded the pixel flasher and had a look and the how to part. But I guess I would better prefer your suggestion of walking me through manually without GUI. Hope you could spare some time and help me through!! Thanks in advance.
 

simplepinoi177

Forum Moderator
Staff member
I just downloaded the pixel flasher and had a look and the how to part. But I guess I would better prefer your suggestion of walking me through manually without GUI. Hope you could spare some time and help me through!! Thanks in advance.
alright, i'll be happy to help & give it a shot...
just a couple of questions before we begin; just to know where to start... What kind of computer OS do you use (Windows, Mac, Linux)? and Are you familiar with platform-tools, bootloader mode, and/or have experience using adb or fastboot commands?
 
Last edited:

jackuphill

Member
Sep 22, 2013
25
5
alright, i'll be happy to help & give it a shot...
just a couple of questions before we begin; just to know where to start... What kind of computer OS do you use (Windows, Mac, Linux)? and Are you familiar with platform-tools, bootloader mode, and/or have experience using adb or fastboot commands?
I am on Windows 11 and familiar with platform tools / bootloader and fast boot
 

simplepinoi177

Forum Moderator
Staff member
This write-up should still be applicable to this thread's OP's problem; for anyone who comes into this thread seeking some possible solution/advice.

I am on Windows 11 and familiar with platform tools / bootloader and fast boot
Great! Good to know...

*Now a disclaimer: You stated you are using a Pixel 6 even though this is a Pixel 7 Pro forum and the only Pixels I have experience with is the Pixel 2 XL & Pixel 5 and I am currently using the P7P; so while I am fairly certain all the advice I give should be applicable to your Pixel 6, I can't be 100% sure. So, keeping that in mind, if there is anything you, or anyone reading that has experience with the Pixel 6, sees that may be inaccurate, I hope you speak up and enlighten and/or you might need to transpose it to work on the Pixel 6; but I will try my best to make it applicable to your Pixel 6 -- case in point; I almost wrote this leading you to flash the init_boot partition when IIRC all Pixels before the Pixel 7's implement flashing the boot partition. In any case, be prepared that there may be hiccups or unforeseen (be me) issues that you may need to, after first seeking help here of course, turn to those in the Pixel 6 forum and/or the users who are more familiar with that device; but I am sure nothing I will advise will hard-brick your device and is fairly universal to Pixels that there should be no consequence where you can't access the bootloader or recovery mode and be able to fix anything bad that may have happened. So considered yourself warned...

Although there is a way to accomplish the aforementioned steps/goal using Windows Powershell, I am unfamiliar using it (and it does seem to have its own hiccups & random issues) and am going to direct using the regular ol' CMD (command prompt) as is even preferred by the creators of the very well-established guides roirraW "edor" ehT and Homeboy76. Also, I have never used Windows 11, but am hoping all of the things from Windows 10 I advise are still applicable...
Also, please excuse me if I retread on information you may (obviously) already know; I can only glean that you used Magisk's patch to inactive slot (after OTA) method instead of implementing Full Factory images to update, but state you are familiar with adb and fastboot commands (so that leads me to believe you know how to extract the stock boot.img, but maybe have never ran the flash-all script because you may only update using OTA's), so in the interest of not using up more time to see where exactly your experience is and tailor my advice to that, I am just going to start at the very basic/start and work my way up where you would hop along wherever you are familiar with. Also, it helps anyone else who is in the same boat who reads this but may be inexperienced...

So, in essence, I am going to be referencing badabing2003's post & template HERE to manually flash the Full Factory image to both slots & root.

  1. Download the December (or latest, for anyone who might come upon this at a far later date) Full Factory image of your Pixel 6 to your computer. You can download it HERE; I would have given you the direct URL, but I am unsure whether you are using a Pixel 6 or Pixel 6 Pro. Also, download the latest platform-tools HERE (this is directly from Google's developer's site -- you'd be surprised how many people get it from the Android Studio or minimal-adb-and-fastboot and then wonder why they get into trouble).
  2. Extract both .zip's; PLEASE extract them in a totally different location than one you may have used before -- preferably a root directory like C:\ or D:\ -- in the interest of not running into issues of using outdated platform-tools and/or "image not found" type errors (that are very frequent and numerous in the forum here because users fall into the trap of having multiple of these platform-tools folders).
  3. Extract the boot.img (init_boot.img file for you Pixel 7 people) file from the image-whateverpixelcodenameyouhave-randomalphanumerics.zip (either go into the image .zip file or extract the whole thing into another folder if you must).
  4. Connect your phone to your computer
  5. Move the stock boot.img (init_boot.img for you Pixel 7 users) file to your phone.
  6. Load Magisk on your phone (Install Magisk from the .apk from their Github if you are running stock and/or unrooted)
    1. patch the boot.img (init_boot.img for you Pixel 7 users)
      1. *for anyone not familiar with this process, jackuphill is already familiar with this process, but to anyone reading who is not, please refer to the plethora of rooting guides on your device's forum; I particularly suggest using roirraW "edor" ehT rooting guide if it's available for your device.
    2. copy the magisk_patched-randomalphanumerics.img file (in your Downloads folder) to the platform-tools folder that has the adb.exe and fastboot.exe files in it.
  7. Go back to the folder where you extracted the Full Factory image .zip files. Right-click the flash-all.bat file and click Edit -- there are two flash-all files, so you may need to check/enable "file name extensions" to find out which one is the .bat file.
    1. remove ANY reference to "-w"; there will most likely be only one, but you don't want that anywhere in the script -- this is if you do NOT want to reset your device to start stock/fresh. Consider the W in "-w" stands for "Wipe". You, @jackuphill, stated that you do not have any data to save, so this may not apply to you if you wish to start fresh with your device.
    2. where it says "fastboot flash bootloader..." & "fastboot flash radio...", I want you to input "--slot all" after fastboot so it looks like "fastboot --slot all flash bootloader..." & "fastboot --slot all flash radio..."
    3. copy the image-whateverpixelcodenameyouhave-randomalphanumerics.zip filename & paste it in another place (another notepad text file, notes app, word document, etc.) in preparation for the next step
    4. replace the last fastboot command ("fastboot update image....") with the following code:
      Code:
      fastboot --skip-reboot update image-whateverpixelcodenameyouhave-randomalphanumerics.zip
      echo Switching active slot to the other ...
      fastboot --set-active=other
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-whateverpixelcodenameyouhave-randomalphanumerics.zip
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      echo flashing Magisk patched image ...
      fastboot --slot all flash boot magisk_patched_randomalphanumerics.img
      echo rebooting to system ...
      fastboot reboot
    5. optional: I like to remove the last command of "exit" so it doesn't close the command prompt when the flash-all is finished...
    6. In the end, it should look like something similar to my (please remember to keep in mind I am using a Pixel 7 Pro, so codenames & version #'s are different and I'm using init_boot) flash-all.bat script:
      Code:
      @ECHO OFF
      :: Copyright 2012 The Android Open Source Project
      ::
      :: Licensed under the Apache License, Version 2.0 (the "License");
      :: you may not use this file except in compliance with the License.
      :: You may obtain a copy of the License at
      ::
      ::      http://www.apache.org/licenses/LICENSE-2.0
      ::
      :: Unless required by applicable law or agreed to in writing, software
      :: distributed under the License is distributed on an "AS IS" BASIS,
      :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      :: See the License for the specific language governing permissions and
      :: limitations under the License.
      
      PATH=%PATH%;"%SYSTEMROOT%\System32"
      fastboot --slot all flash bootloader bootloader-cheetah-cloudripper-1.0-9231809.img
      fastboot reboot-bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --slot all flash radio radio-cheetah-g5300g-220923-221028-b-9229469.img
      fastboot reboot-bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-cheetah-tq1a.221205.011.zip
      echo Switching active slot to the other ...
      fastboot --set-active=other
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-cheetah-tq1a.221205.011.zip
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      echo flashing Magisk patched image ...
      fastboot --slot all flash init_boot magisk_patched-25200_LYxqV.img
      echo rebooting to system ...
      fastboot reboot
      
      echo Press any key to exit...
      pause >nul
    7. exit & close the notepad (or wordpad if that's how Windows 11 does it, i'm guessing) MAKING SURE it asks & confirms to save changes to the file before closing.
  8. Move all the files you extracted from the Full Factory .zip to the platform-tools folder that has the magisk_patched-randomalphanumerics.img file, adb.exe, and fastboot.exe files in it.
  9. Activate the Run window (⊞Win + R), type CMD, check "Run as Administrator" if there is an option/box to check, and press Ctrl+Shift+Enter (just for good measure to make sure to run the command prompt as Administrator).
    *some people may be familiar with merely opening the platform tools folder in Windows Explorer and typing cmd in the path name, but that does not ensure running the command prompt with elevated Administrator privileges and to potentially avoid issues of that nature, I prefer doing it this way...
    1. navigate to the platform-tools folder
      1. I suggest running the cd command like, for example cd "C:\platform-tools\" -- instead of cd'ing into each folder individually -- if you did extract it to my suggestion of the root folder; this is why I suggest it, because navigating to the default folders like Desktop or My Documents folder is a bit more convoluted. I myself know a little better and have my own dedicated folder in my D drive, so I have to direct my cd command to drive first by first typing "D:", then "cd "D:\Phone Stuff\Pixel 7 Pro\platform-tools\" (I usually just copy & paste folder name from the top of my window in explorer).
        Many people who use Powershell instead may be familiar with merely drag & dropping the flash-all.bat file into the Powershell window. This section/explanation is in case you are one of those people and are not familiar with navigating in CMD.
    2. type adb reboot bootloader . Hopefully, you have enabled USB debugging; but you may still have to watch your phone to authorize your computer to your phone -- if so, you will have to run the adb command again. When your phone is in bootloader/fastboot mode, type flash-all.bat and press Enter.
    3. make sure you do NOT touch ANYTHINGuntil it loads back into the OS. You shouldn't have to type anything further or press anything on your phone until the OS loads up. It will frequentlyreboot on its own between bootloader/fastboot mode and fastbootd mode.
      1. hopefully nothing happens and no hiccups come up. But if it does and say something like "waiting for device" for longer than 5 minutes, it is safe to attempt to disconnect then reconnect the phone to your computer (this has worked for some people). And/Or you can manually close the command prompt, navigate to reboot to bootloader on your phone, and run the flash-all.bat command again (I had to do this randomly because I was running an timedout adb-server). But if it "craps out" at sending/writing sparse parts or "can't load partition" or something like that, this may not have worked out and may have soft-bricked the device and will have to do further more specific troubleshooting. But you definitely do not want to touch or stop it when it's in the middle of sending/writing sparse parts -- like some users earlier on have done because they might be unfamiliar with fastbootd mode and/or not seeing the output in the Pixel Flasher GUI.
*I'm not 100% sure if running a magisk patched boot image/partition will properly work and properly load up the set up process on a stock initial set up if you have opted to keep the "-w" intact (as I've never done it this way before [I only update without wiping]; I believe this should work in theory. Then again, this template is taken from updating using the Full Factory images flashing to both slots and re-applying root...). If it does not, you must go back to the flash-all.bat script, edit out & remove the lines
Code:
echo flashing Magisk patched image ...
fastboot --slot all flash boot magisk_patched_randomalphanumerics.img
save, close, and run the flash-all.bat from the bootloader mode once more -- if you can get into the OS, you can run the adb command, but if not, you can get there using button combinations. Then, only after setting up the phone, do you flash the magisk boot .img and install/load up Magisk.


This was a pretty extensive write-up, so I may have missed something; but I am hoping to God that I didn't. If I did, I hope it doesn't cause too much trouble and isn't too hard to remedy, and you can always come back here and I will work my hardest to rectify the mistake. Of course, if anything at all, I hope it all goes well and this works and helps...
 
Last edited:

phoinix_gr

Senior Member
Mar 27, 2011
52
19
I've updated my Pixel 7 Pro (November Update) with the method described here

1. Uninstall magisk
2. Install OTA update
3. Install magisk using magisk Install to Inactive slot(After OTA)
4. Restart

No problems whatsover.
So, to get this correctly, this method is now not supported, and should be avoided or else it might corrupt the phone?
 
Last edited:

simplepinoi177

Forum Moderator
Staff member
I've updated my Pixel 7 Pro (November Update) with the method described here

1. Uninstall magisk
2. Install OTA update
3. Install magisk using magisk Install to Inactive slot(After OTA)
4. Restart

No problems whatsover.
So, to get this correctly, this method is now not supported, and should be avoided or else it might corrupt the phone?
Yes, the install to inactive slot (after OTA) is now not supported I would say it is very much not suggested with a very unlikely possibility of successfully working (with the highest risk of needing to plug in your phone to a computer & downloading images from Google anyway when it causes a bootloop is the same amount of trouble but at least you won't disable your device first); at the very least for the Pixel 7's -- it seems to still work on past Pixels, but then again I did a whole workup to jackuphill and he is using the Pixel 6 and ran into problems. It has to do with topjohnwu not updating the code perfectly when backing up the init_boot instead of boot as well as patching to that as well, AFAIK.

If you insist on still using OTA's, you can still sideload the OTA's. But in my opinion, if one is going to update by sideloading OTA's, you might as well update with the Full Factory images. You have to open up a command prompt and run commands anyways (also you would need to if you plan to re-root), the major differences is you run commands in the bootloader mode (than recovery mode) and run a few more commands (fastboot than adb); one other important addition is you MUST remove "-w" from the flash-all script to keep your data -- but that's basically it. And you get the added benefit of updating the system and partitions "wholesale" versus the incremental patchwork at various intermittent points the OTA update implements -- which would be layers upon layers of modifications as time goes by.
Just something to think about and consider...
 
Last edited:
  • Like
Reactions: Lughnasadh

Lughnasadh

Senior Member
Mar 23, 2015
4,945
5,703
Google Nexus 5
Huawei Nexus 6P
The "Install to Inactive Slot" upgrade method in Magisk is very hit or miss, mostly miss. Some have been successful, but for the most part most have been not. However, here are 2 reports of it actually being successful when updating to the December Security build on the Pixel 7 (I've seen a few successful reports in other months as well):

Still probably best to use another method to update...

 
Last edited:
  • Like
Reactions: simplepinoi177

jackuphill

Member
Sep 22, 2013
25
5
This write-up should still be applicable to this thread's OP's problem; for anyone who comes into this thread seeking some possible solution/advice.


Great! Good to know...

*Now a disclaimer: You stated you are using a Pixel 6 even though this is a Pixel 7 Pro forum and the only Pixels I have experience with is the Pixel 2 XL & Pixel 5 and I am currently using the P7P; so while I am fairly certain all the advice I give should be applicable to your Pixel 6, I can't be 100% sure. So, keeping that in mind, if there is anything you, or anyone reading that has experience with the Pixel 6, sees that may be inaccurate, I hope you speak up and enlighten and/or you might need to transpose it to work on the Pixel 6; but I will try my best to make it applicable to your Pixel 6 -- case in point; I almost wrote this leading you to flash the init_boot partition when IIRC all Pixels before the Pixel 7's implement flashing the boot partition. In any case, be prepared that there may be hiccups or unforeseen (be me) issues that you may need to, after first seeking help here of course, turn to those in the Pixel 6 forum and/or the users who are more familiar with that device; but I am sure nothing I will advise will hard-brick your device and is fairly universal to Pixels that there should be no consequence where you can't access the bootloader or recovery mode and be able to fix anything bad that may have happened. So considered yourself warned...

Although there is a way to accomplish the aforementioned steps/goal using Windows Powershell, I am unfamiliar using it (and it does seem to have its own hiccups & random issues) and am going to direct using the regular ol' CMD (command prompt) as is even preferred by the creators of the very well-established guides roirraW "edor" ehT and Homeboy76. Also, I have never used Windows 11, but am hoping all of the things from Windows 10 I advise are still applicable...
Also, please excuse me if I retread on information you may (obviously) already know; I can only glean that you used Magisk's patch to inactive slot (after OTA) method instead of implementing Full Factory images to update, but state you are familiar with adb and fastboot commands (so that leads me to believe you know how to extract the stock boot.img, but maybe have never ran the flash-all script because you may only update using OTA's), so in the interest of not using up more time to see where exactly your experience is and tailor my advice to that, I am just going to start at the very basic/start and work my way up where you would hop along wherever you are familiar with. Also, it helps anyone else who is in the same boat who reads this but may be inexperienced...

So, in essence, I am going to be referencing badabing2003's post & template HERE to manually flash the Full Factory image to both slots & root.

  1. Download the December (or latest, for anyone who might come upon this at a far later date) Full Factory image of your Pixel 6 to your computer. You can download it HERE; I would have given you the direct URL, but I am unsure whether you are using a Pixel 6 or Pixel 6 Pro. Also, download the latest platform-tools HERE (this is directly from Google's developer's site -- you'd be surprised how many people get it from the Android Studio or minimal-adb-and-fastboot and then wonder why they get into trouble).
  2. Extract both .zip's; PLEASE extract them in a totally different location than one you may have used before -- preferably a root directory like C:\ or D:\ -- in the interest of not running into issues of using outdated platform-tools and/or "image not found" type errors (that are very frequent and numerous in the forum here because users fall into the trap of having multiple of these platform-tools folders).
  3. Extract the boot.img (init_boot.img file for you Pixel 7 people) file from the image-whateverpixelcodenameyouhave-randomalphanumerics.zip (either go into the image .zip file or extract the whole thing into another folder if you must).
  4. Connect your phone to your computer
  5. Move the stock boot.img (init_boot.img for you Pixel 7 users) file to your phone.
  6. Load Magisk on your phone (Install Magisk from the .apk from their Github if you are running stock and/or unrooted)
    1. patch the boot.img (init_boot.img for you Pixel 7 users)
      1. *for anyone not familiar with this process, jackuphill is already familiar with this process, but to anyone reading who is not, please refer to the plethora of rooting guides on your device's forum; I particularly suggest using roirraW "edor" ehT rooting guide if it's available for your device.
    2. copy the magisk_patched-randomalphanumerics.img file (in your Downloads folder) to the platform-tools folder that has the adb.exe and fastboot.exe files in it.
  7. Go back to the folder where you extracted the Full Factory image .zip files. Right-click the flash-all.bat file and click Edit -- there are two flash-all files, so you may need to check/enable "file name extensions" to find out which one is the .bat file.
    1. remove ANY reference to "-w"; there will most likely be only one, but you don't want that anywhere in the script -- this is if you do NOT want to reset your device to start stock/fresh. Consider the W in "-w" stands for "Wipe". You, @jackuphill, stated that you do not have any data to save, so this may not apply to you if you wish to start fresh with your device.
    2. where it says "fastboot flash bootloader..." & "fastboot flash radio...", I want you to input "--slot all" after fastboot so it looks like "fastboot --slot all flash bootloader..." & "fastboot --slot all flash radio..."
    3. copy the image-whateverpixelcodenameyouhave-randomalphanumerics.zip filename & paste it in another place (another notepad text file, notes app, word document, etc.) in preparation for the next step
    4. replace the last fastboot command ("fastboot update image....") with the following code:
      Code:
      fastboot --skip-reboot update image-whateverpixelcodenameyouhave-randomalphanumerics.zip
      echo Switching active slot to the other ...
      fastboot --set-active=other
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-whateverpixelcodenameyouhave-randomalphanumerics.zip
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      echo flashing Magisk patched image ...
      fastboot --slot all flash boot magisk_patched_randomalphanumerics.img
      echo rebooting to system ...
      fastboot reboot
    5. optional: I like to remove the last command of "exit" so it doesn't close the command prompt when the flash-all is finished...
    6. In the end, it should look like something similar to my (please remember to keep in mind I am using a Pixel 7 Pro, so codenames & version #'s are different and I'm using init_boot) flash-all.bat script:
      Code:
      @ECHO OFF
      :: Copyright 2012 The Android Open Source Project
      ::
      :: Licensed under the Apache License, Version 2.0 (the "License");
      :: you may not use this file except in compliance with the License.
      :: You may obtain a copy of the License at
      ::
      ::      http://www.apache.org/licenses/LICENSE-2.0
      ::
      :: Unless required by applicable law or agreed to in writing, software
      :: distributed under the License is distributed on an "AS IS" BASIS,
      :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      :: See the License for the specific language governing permissions and
      :: limitations under the License.
      
      PATH=%PATH%;"%SYSTEMROOT%\System32"
      fastboot --slot all flash bootloader bootloader-cheetah-cloudripper-1.0-9231809.img
      fastboot reboot-bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --slot all flash radio radio-cheetah-g5300g-220923-221028-b-9229469.img
      fastboot reboot-bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-cheetah-tq1a.221205.011.zip
      echo Switching active slot to the other ...
      fastboot --set-active=other
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      fastboot --skip-reboot update image-cheetah-tq1a.221205.011.zip
      echo rebooting to bootloader ...
      fastboot reboot bootloader
      ping -n 5 127.0.0.1 >nul
      echo flashing Magisk patched image ...
      fastboot --slot all flash init_boot magisk_patched-25200_LYxqV.img
      echo rebooting to system ...
      fastboot reboot
      
      echo Press any key to exit...
      pause >nul
    7. exit & close the notepad (or wordpad if that's how Windows 11 does it, i'm guessing) MAKING SURE it asks & confirms to save changes to the file before closing.
  8. Move all the files you extracted from the Full Factory .zip to the platform-tools folder that has the magisk_patched-randomalphanumerics.img file, adb.exe, and fastboot.exe files in it.
  9. Activate the Run window (⊞Win + R), type CMD, check "Run as Administrator" if there is an option/box to check, and press Ctrl+Shift+Enter (just for good measure to make sure to run the command prompt as Administrator).
    *some people may be familiar with merely opening the platform tools folder in Windows Explorer and typing cmd in the path name, but that does not ensure running the command prompt with elevated Administrator privileges and to potentially avoid issues of that nature, I prefer doing it this way...
    1. navigate to the platform-tools folder
      1. I suggest running the cd command like, for example cd "C:\platform-tools\" -- instead of cd'ing into each folder individually -- if you did extract it to my suggestion of the root folder; this is why I suggest it, because navigating to the default folders like Desktop or My Documents folder is a bit more convoluted. I myself know a little better and have my own dedicated folder in my D drive, so I have to direct my cd command to drive first by first typing "D:", then "cd "D:\Phone Stuff\Pixel 7 Pro\platform-tools\" (I usually just copy & paste folder name from the top of my window in explorer).
        Many people who use Powershell instead may be familiar with merely drag & dropping the flash-all.bat file into the Powershell window. This section/explanation is in case you are one of those people and are not familiar with navigating in CMD.
    2. type adb reboot bootloader . Hopefully, you have enabled USB debugging; but you may still have to watch your phone to authorize your computer to your phone -- if so, you will have to run the adb command again. When your phone is in bootloader/fastboot mode, type flash-all.bat and press Enter.
    3. make sure you do NOT touch ANYTHINGuntil it loads back into the OS. You shouldn't have to type anything further or press anything on your phone until the OS loads up. It will frequentlyreboot on its own between bootloader/fastboot mode and fastbootd mode.
      1. hopefully nothing happens and no hiccups come up. But if it does and say something like "waiting for device" for longer than 5 minutes, it is safe to attempt to disconnect then reconnect the phone to your computer (this has worked for some people). And/Or you can manually close the command prompt, navigate to reboot to bootloader on your phone, and run the flash-all.bat command again (I had to do this randomly because I was running an timedout adb-server). But if it "craps out" at sending/writing sparse parts or "can't load partition" or something like that, this may not have worked out and may have soft-bricked the device and will have to do further more specific troubleshooting. But you definitely do not want to touch or stop it when it's in the middle of sending/writing sparse parts -- like some users earlier on have done because they might be unfamiliar with fastbootd mode and/or not seeing the output in the Pixel Flasher GUI.
*I'm not 100% sure if running a magisk patched boot image/partition will properly work and properly load up the set up process on a stock initial set up if you have opted to keep the "-w" intact (as I've never done it this way before [I only update without wiping]; I believe this should work in theory. Then again, this template is taken from updating using the Full Factory images flashing to both slots and re-applying root...). If it does not, you must go back to the flash-all.bat script, edit out & remove the lines
Code:
echo flashing Magisk patched image ...
fastboot --slot all flash boot magisk_patched_randomalphanumerics.img
save, close, and run the flash-all.bat from the bootloader mode once more -- if you can get into the OS, you can run the adb command, but if not, you can get there using button combinations. Then, only after setting up the phone, do you flash the magisk boot .img and install/load up Magisk.


This was a pretty extensive write-up, so I may have missed something; but I am hoping to God that I didn't. If I did, I hope it doesn't cause too much trouble and isn't too hard to remedy, and you can always come back here and I will work my hardest to rectify the mistake. Of course, if anything at all, I hope it all goes well and this works and helps...
Thankyou for the elaborate guide. I was able to learn a few new things.
As I was prepared do away with my data and to re-root again, I did the following.
1. I used the android flash tool and flashed the full december factory image which reset everything in slot b (option is available to do so without a full wipe, but as I didn't have any data to be saved so went along with a full wipe) and the device booted with boot slot as "b" itself.
2.Then sideloaded the full december OTA image using adb sideload, which updated the slot "a", and also changing the boot slot to "a" in the process.
3. Going to re-root now with Magisk,and from next time as suggested would use the option of "Update and Root the OTA sideload or factory image".

The only minor hiccup I faced was that during adb sideload, the verifying package was taking too long, so had to replace the USB C cable with a USB A to USB C cable.
 
  • Like
Reactions: simplepinoi177

simplepinoi177

Forum Moderator
Staff member
Thankyou for the elaborate guide. I was able to learn a few new things.
As I was prepared do away with my data and to re-root again, I did the following.
1. I used the android flash tool and flashed the full december factory image which reset everything in slot b (option is available to do so without a full wipe, but as I didn't have any data to be saved so went along with a full wipe) and the device booted with boot slot as "b" itself.
2.Then sideloaded the full december OTA image using adb sideload, which updated the slot "a", and also changing the boot slot to "a" in the process.
3. Going to re-root now with Magisk,and from next time as suggested would use the option of "Update and Root the OTA sideload or factory image".

The only minor hiccup I faced was that during adb sideload, the verifying package was taking too long, so had to replace the USB C cable with a USB A to USB C cable.
I guess my post scared you huh...I guess it was pretty daunting manually flashing the full factory image to both slots. the way you went about it is pretty clever, I'll keep it in mind to suggest next time a similar issue is brought up...
But I'm glad you got it worked out.

I'm just curious; the way you worded it is baffling -- you make it seem that there's an option in the Android Flash tool to "Update and Root the OTA sideload or factory image" which I can't imagine Google offering that option in their tool...🧐
 
  • Love
Reactions: jackuphill

jackuphill

Member
Sep 22, 2013
25
5
I guess my post scared you huh...I guess it was pretty daunting manually flashing the full factory image to both slots. the way you went about it is pretty clever, I'll keep it in mind to suggest next time a similar issue is brought up...
But I'm glad you got it worked out.

I'm just curious; the way you worded it is baffling -- you make it seem that there's an option in the Android Flash tool to "Update and Root the OTA sideload or factory image" which I can't imagine Google offering that option in their tool...🧐
I think you misread or I should say rather I wrongly worded the sentence. (Point no.3). What I meant was, in future, instead of using the Magisk option of "installing to inactive slot", would sideload the OTA and then fastboot boot the patched image, and then do direct install (Magisk). Once again thanks for all your valuable tips it was really quite informative.
 
  • Like
Reactions: simplepinoi177

Lughnasadh

Senior Member
Mar 23, 2015
4,945
5,703
Google Nexus 5
Huawei Nexus 6P
I think you misread or I should say rather I wrongly worded the sentence. (Point no.3). What I meant was, in future, instead of using the Magisk option of "installing to inactive slot", would sideload the OTA and then fastboot boot the patched image, and then do direct install (Magisk). Once again thanks for all your valuable tips it was really quite informative.
You can't temporarily boot (fastboot boot) the patched init_boot.img, so just flash (fastboot flash) the patched init_boot image instead.

fastboot flash init_boot <nameofpatchedinit_boot.img>
 
  • Like
Reactions: jackuphill

simplepinoi177

Forum Moderator
Staff member
You can't temporarily boot (fastboot boot) the patched init_boot.img, so just flash (fastboot flash) the patched init_boot image instead.

fastboot flash init_boot <nameofpatchedinit_boot.img>

Oh ok. Thanks for correcting.
Just be careful @jackuphill, while @Lughnasadh is correct where you can't temporarily boot, he might not be aware -- as I am because I wrote up that long-winded walkthrough but had to "transpose" it a bit for your case -- that although you sought help here, you are in fact using a Pixel 6; you wouldn't patch & flash init_boot.img but plain & simple boot.img instead. I'm sure you are most likely aware of this as you have just successfully rooted, but I just wanted to point it out just as a reminder/caution and just in case you (unlikely as it is) might take his suggestion/code exactly....
 

Lughnasadh

Senior Member
Mar 23, 2015
4,945
5,703
Google Nexus 5
Huawei Nexus 6P
Just be careful @jackuphill, while @Lughnasadh is correct where you can't temporarily boot, he might not be aware -- as I am because I wrote up that long-winded walkthrough but had to "transpose" it a bit for your case -- that although you sought help here, you are in fact using a Pixel 6; you wouldn't patch & flash init_boot.img but plain & simple boot.img instead. I'm sure you are most likely aware of this as you have just successfully rooted, but I just wanted to point it out just as a reminder/caution and just in case you (unlikely as it is) might take his suggestion/code exactly....
Yeah, had no clue that person is on a Pixel 6 since we're in the Pixel 7 Pro forum.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    I followed this guide exactly: https://topjohnwu.github.io/Magisk/ota.html

    Before starting the guide, I had a pretty new Pixel 7 Pro with the latest version of Magisk successfully installed (with bootloader UNLOCKED) and some small Magisk modules to tweak things (iOS emojis). I made sure to restore boot images and got the "restoration complete" toast message.

    I saw the notification for the November update, downloaded and installed it. I did NOT reboot after that. I then went into the Magisk app and tapped "install to inactive slot (after OTA)" and rebooted from within the Magisk app.

    My device rebooted, and showed me the bootloader unlocked screen, then showed me the "your device is corrupt" warning and said "press power button to continue". I pressed the power button and my device is now stuck on the Google logo.

    Has this happened to anyone else? And is there any way to fix this (preferably without data loss)?
    That´s a bug within AVB. Unfortunately it can happen on Pixel 6 and 7 devices.

    There´s one thing that can clear it:

    I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.

    fastboot flash init_boot init_boot.img

    Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
    If it boots already don´t forgot to flash init_boot from november firmware still.

    Then download november factory image, extract init_boot.img, flash it via fastboot as well. This might get you out of the loop.
    If you want you can use a magisk_patched init_boot.img as well so you´re rooted.
    That last step should get you out of the corruption loop, as flashing outdated init_boot and then correct init_boot will somehow clear avb.

    I´ll attach patched init_boot.img from november firmware TD1A.221105.001, Nov 2022 for you.
    3
    Ok so I did this part:
    "I know this sounds a bit counter intuitive, but download october factory image, extract init_boot.img, flash it via fastboot on your device with nov firmware.

    fastboot flash init_boot init_boot.img

    Try to let it boot, if it fails or crashes go back to bootloader via long press power and volume down. (can take up to 30 seconds on p7pro)
    If it boots already don´t forgot to flash init_boot from november firmware still."

    And it works, however when I go to "About Phone" the build number is still the October version. Is this expected, given that I flashed the october init_boot.img onto a phone with November firmware? Or did my phone perhaps reboot into the older partition which the phone ran before switching to the inactive slot?

    EDIT: Even after flashing the november init_boot.img after temporarily reverting to the october init_boot.img, it's still showing that I have build TD1A.220804.031 installed.
    init_boot doesn´t contain the props that set the security patch state iirc. so flashing it won´t change the security patch date you see in settings.

    Maybe the OTA wasn´t successful, silently failed in the background and you´re still on October. Or your device switched slots.

    I´d just flash november firmware via either web tool or factory image. :) Check the guides in this forum, you´ll find it :)
    3
    I don't believe so, as I can only connect to my phone via PC over fastboot mode right now, so I'll have to check for logs after fixing my device.

    One other question though, the guide you linked mentioned disabling magisk modules before flashing the factory image. I was never able to do that because I used the inactive slot guide which made no mention of it. Will the enabled magisk modules prevent me from using the guide you linked?

    I am also unable to do this step as I can't transfer files from my pc to my p7p when I cant access the phone aside from fastboot mode: "Copy the init_boot.img from the PC to the phone's internal storage." Can I skip this step?
    Just restore your device by flashing the whole ROM. This will get rid of magisk and you should have no problem booting back into the system. You will have lost the root at that point. Once inside, transfer the init_boot.img into /sdcard and run magisk and ask it to patch that. Bring the patched file to your PC, and flash it to init_boot partition like the guide says. At that point, you should be able to boot back into the system and root should be good.

    I did not disable Magisk modules and it worked fine. I have magiskhide props, shmiko, systemless hosts, zygisk - lsposed, universal safety net fix.

    If you have trouble with Magisk modules, you can recover by booting into Safe Mode (restart and press down volume and keep it pressed). Magisk detects the Safe Mode and disables the modules. Done that many times.
    3
    yes, you flash the old outdated init_boot via fastboot on november firmware.

    afterwards you flash back the correct one for november. that will hopefully clear the avb bug you´re experiencing.

    You flash only this img, not anything else. do precisely the steps I described. you don´t have to flash the full firmware, as you already updated to november if I read your initial post correctly and OTA to november was successful.



    no it has not been fixed.

    no, with the steps detailed there´s no data loss.


    I wouldn´t recommend updating your phone with the magisk flash to inactive slot method. That´s not working for most people on p6 and p7 devices.


    the method I described doesn´t involve using that script. no data will be lost.
    How do you expect this to work for p7p? The Magisk code has not been updated yet to flash init_boot partition instead of boot partition on p7p. Of course, it will corrupt your boot partition.

    Update Magisk using the method outlined in the main thread for OTA and Magisk: https://forum.xda-developers.com/t/...-safetynet-all-relevant-links.4502805/page-61

    If what @devsk states is true, you also need to flash back stock boot.img from november firmware via fastboot @Pritster5.

    fastboot flash boot boot.img

    Since magisk can patch init_boot.img´s, I assumed it would account for pixel 7 pro, having ramdisk inside init_boot instead of boot.img. It´s a bad design choice by magisk app to show this option to users on Pixel 7 pro in that case. :/ but even on pixel 6, the forums are full of people running into issues with that method.
    3
    You can't temporarily boot (fastboot boot) the patched init_boot.img, so just flash (fastboot flash) the patched init_boot image instead.

    fastboot flash init_boot <nameofpatchedinit_boot.img>

    Oh ok. Thanks for correcting.
    Just be careful @jackuphill, while @Lughnasadh is correct where you can't temporarily boot, he might not be aware -- as I am because I wrote up that long-winded walkthrough but had to "transpose" it a bit for your case -- that although you sought help here, you are in fact using a Pixel 6; you wouldn't patch & flash init_boot.img but plain & simple boot.img instead. I'm sure you are most likely aware of this as you have just successfully rooted, but I just wanted to point it out just as a reminder/caution and just in case you (unlikely as it is) might take his suggestion/code exactly....