UPDATING Pixel 5 Factory Image & Re-Rooting

Search This thread

donlu30

Senior Member
Jan 2, 2008
81
22
Google Pixel 2
Google Pixel 5
Just sharing how I do it in case someone is interested in a shorter path:

1. Download the new full factory image
2. Extract the file. Then extract boot.img from the image zip file within.
3. Copy boot.img to your pixel 5
4. Patch it with magisk
5. Move back the patched file, rename it to boot.img
6. Update the original zip file titled image-redfin-r*.zip with the new boot.img file (override the older one)
7. Edit flash-all file by removing -w so it won't wipe your device clean
8. Flash with flash-all

No need to unroot and reroot.
So no need to disable modules or anything?
 

andybones

Forum Moderator
Staff member
May 18, 2010
14,906
15,231
Google Pixel 5
So no need to disable modules or anything?
I always do, and would suggest it, as a Module could very easily be incompatible with the new update. What has worked for me since I've owned the device since release is this:
1) disable all modules (remove them if you want, but I just disable)
reboot
1a) un-hide Magisk if you hide it
2) download the latest factory image
2a) extract and remove the -w from flash-all as to not lose anything
2b) while I'm doing this, I pull the boot.img and put onto my Internal storage sdcard
2c) (optional) backup your internal storage, just incase
3) adb reboot bootloader
4) flash the factory image
5) reboot
6) patch the boot.img from 2b
7) adb reboot bootloader
8) fastboot flash boot magisk_patched_boot.img
9) re-enable the magisk modules 1 at a time
9a) go to the XDA threads of certain modules known to cause issues with updates, and make sure it's compatible BEFORE re-enabling that module
10) done
 
Last edited:
  • Like
Reactions: donlu30

donlu30

Senior Member
Jan 2, 2008
81
22
Google Pixel 2
Google Pixel 5
So I flashed the update and no problems, but flashing the patched boot I get "failed to write to partition not found". Any suggestions?
I always do, and would suggest it, as a Module could very easily be incompatible with the new update. What has worked for me since I've owned the device since release is this:
1) disable all modules (remove them if you want, but I just disable)
reboot
1a) un-hide Magisk if you hide it
2) download the latest factory image
2a) extract and remove the -w from flash-all as to not lose anything
2b) while I'm doing this, I pull the boot.img and put onto my Internal storage sdcard
2c) (optional) backup your internal storage, just incase
3) adb reboot bootloader
4) flash the factory image
5) reboot
6) patch the boot.img from 2b
7) adb reboot bootloader
8) fastboot flash boot magisk_patched_boot.img
9) re-enable the magisk modules 1 at a time
9a) go to the XDA threads of certain modules known to cause issues with updates, and make sure it's compatible BEFORE re-enabling that module
10) done
So I flashed the update and no problems, but flashing the patched boot I get "failed to write to partition not found". Any suggestions?
 
Last edited by a moderator:

andybones

Forum Moderator
Staff member
May 18, 2010
14,906
15,231
Google Pixel 5
Never did and my modules always work when I reboot into the new rooted firmware.
It's not a very good suggestion for others to do this, because everyone uses different Modules.
Many Modules need to be updated for each OTA, or at the least, check the files against the new OTA files, and see if the Module needs anything updated within.
Such as these 2 Modules I use:

Others may be at a risk of bootloop from this suggestion.
Simply disabling the module takes no more than a toggle off and a reboot, and can save a lot of headache. And they will be at risk of bootloop once on the new OTA and re-enabling the module. Which is why I suggested in my previous post to also enable them 1 at a time, and to better yet, check the XDA thread before hand, especially for known at risk modules such as the ones I linked above.


So I flashed the update and no problems, but flashing the patched boot I get "failed to write to partition not found". Any suggestions?
Umm. Off the top of my head would be something wrong with the patched boot.img (maybe it didn't transfer fully?)
or out-of-date fastboot drivers installed.
 
Last edited:

andybones

Forum Moderator
Staff member
May 18, 2010
14,906
15,231
Google Pixel 5
I always do, and would suggest it, as a Module could very easily be incompatible with the new update. What has worked for me since I've owned the device since release is this:
1) disable all modules (remove them if you want, but I just disable)
reboot
1a) un-hide Magisk if you hide it
2) download the latest factory image
2a) extract and remove the -w from flash-all as to not lose anything
2b) while I'm doing this, I pull the boot.img and put onto my Internal storage sdcard
2c) (optional) backup your internal storage, just incase
3) adb reboot bootloader
4) flash the factory image
5) reboot
6) patch the boot.img from 2b
7) adb reboot bootloader
8) fastboot flash boot magisk_patched_boot.img
9) re-enable the magisk modules 1 at a time
9a) go to the XDA threads of certain modules known to cause issues with updates, and make sure it's compatible BEFORE re-enabling that module
10) done
Hey guys,
Sorry, update on this,
And someone please correct me if I am wrong.

EDIT: disabling the modules is suggested
Disabling the Magisk modules I suppose is more apart of my OCD,
thinking on it again,
I don't believe it to be necessary,
as once the new factory image is flashed,
it flashes the stock boot.img,
which will un-root you,

thus making step 1) disabling all modules, not needed.
 
Last edited:

donlu30

Senior Member
Jan 2, 2008
81
22
Google Pixel 2
Google Pixel 5
Hey guys,
Sorry, update on this,
And someone please correct me if I am wrong.

Disabling the Magisk modules I suppose is more apart of my OCD,
thinking on it again,
I don't believe it to be necessary,
as once the new factory image is flashed,
it flashes the stock boot.img,
which will un-root you,
thus making step 1) disabling all modules, not needed.
So I would say correct, but to an extent. Modules related to themes have given me trouble. Caused me to wipe the other day... But you won't have an issue until you flash the patched boot.
 

andybones

Forum Moderator
Staff member
May 18, 2010
14,906
15,231
Google Pixel 5
So I would say correct, but to an extent. Modules related to themes have given me trouble. Caused me to wipe the other day... But you won't have an issue until you flash the patched boot.
Hey sorry, I think I may be mis-understanding.
So, this is in relation to taking the OTA, and the steps I initially outlined?

If I am reading this correctly, and I may not be.
A Magisk Module with theming components, such as something like this:
which modified the SystemUIGoogle (Statusbar) and NexusLauncherRelease (Pixel Launcher) .apks --
caused you to have to wipe your device the other day?
Because you didn't disable the Magisk Module with theme before flashing the Factory image?'
I'm having a hard time understanding why this would have caused the need to wipe.

Unless you mean, you flashed the Factory image, then re-enabled the Magisk module 1 by 1 and had an issue.
That would make more sense to me.

And until you flashed the patched boot.img you are not rooted.

As for theme, I mentioned in this post
"9a) go to the XDA threads of certain modules known to cause issues with updates, and make sure it's compatible BEFORE re-enabling that module".
 

donlu30

Senior Member
Jan 2, 2008
81
22
Google Pixel 2
Google Pixel 5
Hey sorry, I think I may be mis-understanding.
So, this is in relation to taking the OTA, and the steps I initially outlined?

If I am reading this correctly, and I may not be.
A Magisk Module with theming components, such as something like this:
which modified the SystemUIGoogle (Statusbar) and NexusLauncherRelease (Pixel Launcher) .apks --
caused you to have to wipe your device the other day?
Because you didn't disable the Magisk Module with theme before flashing the Factory image?'
I'm having a hard time understanding why this would have caused the need to wipe.

Unless you mean, you flashed the Factory image, then re-enabled the Magisk module 1 by 1 and had an issue.
That would make more sense to me.

And until you flashed the patched boot.img you are not rooted.

As for theme, I mentioned in this post
"9a) go to the XDA threads of certain modules known to cause issues with updates, and make sure it's compatible BEFORE re-enabling that module".
Actually, your instructions were spot on until I flashed the patched boot. I use swift theme from the playstore that installs a module to give root to theme. When I flashed the patched boot without disabling the module related to the theme, it caused a bootloop and black screen. When I reflashed the stock image I became unrooted but flashbooted twrp to gain access to the folder containing the modules, tried to delete modules as instructed from another source, rebooted and deleted magisk and tried to start over with no avail. I pretty much wiped to keep from having to go back through the a**pain of having to flash a bunch of crap. I had a good backup and usually wipe and start fresh every few months anyway. So the wiping was on me, but I personally will disable modules from now on just in case. It takes 3 seconds to disable a module but 10 minutes to flash a fresh image. I like easy, but that's just me. And thanks for the help in update as it was pretty cut and dry unlike a lot of other threads
 
  • Like
Reactions: andybones

andybones

Forum Moderator
Staff member
May 18, 2010
14,906
15,231
Google Pixel 5
Actually, your instructions were spot on until I flashed the patched boot. I use swift theme from the playstore that installs a module to give root to theme. When I flashed the patched boot without disabling the module related to the theme, it caused a bootloop and black screen. When I reflashed the stock image I became unrooted but flashbooted twrp to gain access to the folder containing the modules, tried to delete modules as instructed from another source, rebooted and deleted magisk and tried to start over with no avail. I pretty much wiped to keep from having to go back through the a**pain of having to flash a bunch of crap. I had a good backup and usually wipe and start fresh every few months anyway. So the wiping was on me, but I personally will disable modules from now on just in case. It takes 3 seconds to disable a module but 10 minutes to flash a fresh image. I like easy, but that's just me. And thanks for the help in update as it was pretty cut and dry unlike a lot of other threads
Very sorry about the bootloop, even with a backup and knowing it's just part of tinkering, still stinks.
I'll go and edit my post to say to disable the modules before-hand, thanks for posting back in here with the results to help others (and myself).

Can you link me to the Swift you're using? Is this for Android 11 Pixel 5? Or another device? I remember using Swift theme back on Nougat and it was the best.
But I love to be able to help others. This thread is great. @Az Biker did a wonderful job starting this thread, and it has helped me as well!
This being my first Pixel device, I still had to search to find update instructions.
I remembered hearing stories about how everyone kind of has their own method, some even prefer sideloading the OTA if understand correctly.

But disabling the modules, and a quick reboot takes nearly no time at all, like you mentioned, especially compared to re-flashing fresh factory image.
 

donlu30

Senior Member
Jan 2, 2008
81
22
Google Pixel 2
Google Pixel 5
Very sorry about the bootloop, even with a backup and knowing it's just part of tinkering, still stinks.
I'll go and edit my post to say to disable the modules before-hand, thanks for posting back in here with the results to help others (and myself).

Can you link me to the Swift you're using? Is this for Android 11 Pixel 5? Or another device? I remember using Swift theme back on Nougat and it was the best.
But I love to be able to help others. This thread is great. @Az Biker did a wonderful job starting this thread, and it has helped me as well!
This being my first Pixel device, I still had to search to find update instructions.
I remembered hearing stories about how everyone kind of has their own method, some even prefer sideloading the OTA if understand correctly.

But disabling the modules, and a quick reboot takes nearly no time at all, like you mentioned, especially compared to re-flashing fresh factory image.
It's all good bro. I used to wipe 3-4 times a day back in the day when I had the moto razr and the HTC m8 flashing all the time when it was easy and you didn't need a computer!

Yes, swift installer is what I use and it is pretty seamless, without the need for the substratum app. I would definitely check it out and purchase if you like it.
 

nostromo12

Senior Member
Sep 23, 2008
110
16
Grossenseebach
My Pixel 5 is rooted with magisk23 and I want to apply the first time an OTA update.
Therefore I want to check the procedure.
Switched auto OTA to OFF.
Hope that sometime there will be an indication, that the sept update is available.
Then I want to proceed according that guide:

Is this a valid option? It seems to be a simple way avoiding all the fastboot staff
 

nostromo12

Senior Member
Sep 23, 2008
110
16
Grossenseebach
I did the Sept update exactly the way described in No20 of this thread.
It worked like a charm!! Thanks guys!!

Installed modules: acc, universalfix, hardware off
 
Last edited:

l7777

Senior Member
May 2, 2007
561
181
My Pixel 5 is rooted with magisk23 and I want to apply the first time an OTA update.
Therefore I want to check the procedure.
Switched auto OTA to OFF.
Hope that sometime there will be an indication, that the sept update is available.
Then I want to proceed according that guide:

Is this a valid option? It seems to be a simple way avoiding all the fastboot staff
Should work yes. It doesn't seem any easier to me but would allow you to update without a computer.

And you should definitely disable your Magisk modules during the process.
 

Az Biker

Sr. Mod / Mod & RC-RT Committees / Shred'r of MTBs
Staff member
Just sharing how I do it in case someone is interested in a shorter path:

1. Download the new full factory image
2. Extract the file. Then extract boot.img from the image zip file within.
3. Copy boot.img to your pixel 5
4. Patch it with magisk
5. Move back the patched file, rename it to boot.img
6. Update the original zip file titled image-redfin-r*.zip with the new boot.img file (override the older one)
7. Edit flash-all file by removing -w so it won't wipe your device clean
8. Flash with flash-all

No need to unroot and reroot.
Just a quick bump to keep it from getting buried :p
 

nostromo12

Senior Member
Sep 23, 2008
110
16
Grossenseebach
I updated my pixel 5 to last factory image, but did not disable the magisk modules and and un-hide magisk. Now I have severe crashes when using android auto. could that be the reason? Have I to factory reset and install everything new?
 

V0latyle

Forum Moderator
Staff member
OP, I recommend updating the title to reflect that this only applies to Android 11.

The process for Android 12 will be slightly different, due to the introduction of boot verification. See my post here which explains how this works.

NOTE: DO NOT DIRTY FLASH THE FACTORY IMAGE TO UPDATE FROM ANDROID 11 TO 12. If you want to preserve data during the update, use the OTA, either via Android Update or via ADB sideload.

Subsequent updates for Android 12 may be dirty flashed.

The key difference:
Vbmeta must be flashed with the DM-Verity and boot verification flags set to Disabled to be able to use a patched boot image, otherwise the bootloader will return an "Unable to load/verify boot image".

If you intend to update via OTA:
1. Extract vbmeta.img from the factory ZIP to your ADB folder. Not yet known if this will have to be done with every update or whether you can use the same image over and over again.
2. Install the OTA and let the update complete, including a reboot.
3. Reboot to bootloader, then re flash vbmeta:
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
4. Reboot back to bootloader
5. You can now flash your patched boot image (if you patched it manually) or live boot an older patched boot image, then use Magisk to directly patch /boot.

If you intend to update via factory zip: (DO NOT USE THIS TO UPDATE FROM ANDROID 11 UNLESS YOU WIPE!)

Manually via ADB:

1a. If you use the flash-all script, ensure you edit
"fastboot -w update image-redfin.zip" to
"fastboot -w --disable-verity --disable-verification update image-redfin.zip"
1b. If you prefer to do your updates manually, update bootloader and radio (if necessary) then use the same command as above to update system:
Code:
fastboot -w --disable-verity --disable-verification update image-redfin.zip
2. Let the update complete including a reboot
3. Reboot to bootloader
4. You can now flash your patched boot image (if you patched it manually) or live boot an older patched boot image, then use Magisk to directly patch /boot.

Via the Android Flash tool:
1. Select the update file, uncheck all boxes except "Wipe Data, Disable verity" and "Disable verification"
2. Let update complete including a reboot
3. Reboot to bootloader
4. You can now flash your patched boot image (if you patched it manually) or live boot an older patched boot image, then use Magisk to directly patch /boot.

Note: If you update via OTA, you should be able to dirty flash the factory image without a wipe. Make sure the disable flags are set. I personally wouldn't do this as it is redundant and reflashes all the partitions the OTA already updated. This takes about 10 minutes, vs less than 10 seconds to flash vbmeta alone. I would reserve this option for circumstances where you run into problems after taking the OTA.

Hope this helps when the Android 12 public release finally drops!
 
Last edited:
  • Like
Reactions: kfhughes

ZeoFateX

Member
Apr 5, 2011
21
9
Google Pixel 5
Sigh, updated via fastboot update, booted fine, went to install patched boot, received the "unable" error message. Came here to search. Followed the disable verity stuff and now I'm getting put into recovery and told 'Cannot load Android system' with both the patched boot image and with the original. Realize I probably should have read before doing that, but any way to revert the verity change or do I need to wipe? Thanks.

Was able to factory data reset ok. Thanks!

@V0latyle
 
Last edited:

V0latyle

Forum Moderator
Staff member
Sigh, updated via fastboot update, booted fine, went to install patched boot, received the "unable" error message. Came here to search. Followed the disable verity stuff and now I'm getting put into recovery and told 'Cannot load Android system' with both the patched boot image and with the original. Realize I probably should have read before doing that, but any way to revert the verity change or do I need to wipe? Thanks.

@V0latyle
Were you on the beta or Android 11 before you started?

Did you dirty flash?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    Why This Thread?

    I have seen several questions on the process for updating a rooted Pixel 5, since the existing guides only explain the unlock and initial rooting, I thought I'd throw together a quick HOW TO on UPDATING and Re-Rooting for anyone who might still be uncertain about "update" procedures, I've followed thie below method twice now with no issues at all,> None of my data was lost and I kept my EX kernel!.

    If You Want To Unlock Your Bootloader and Root Your Pixel 5:

    This guide takes you step by step through bootloader unlock, using magic to patch the boot image and get your device rooted.

    If You're Already Unlocked & Rooted, and Want To Update The Factory Image And Re-Root:

    If you're already rooted and want to update to the next factory image, just follow the standard update factory image routine for the Pixel series of devices, then following the below:

    After extracting the primary factory zip, and the secondary zip that is created from the first extraction (all done within the platform tools folder with the fastboot app)

    Edit the FLASH-ALL file.... keep the -w for a clean install that wipes everything, or remove the -w to keep your data.

    This will install the latest factory image and remove root.

    Now, follow these steps here, they're perfect. (these are the same instructions for unlocking bootloader, and initial install of Magisk listed above)

    If you were previously rooted, and just updating the next factory image, you can skip the entire sections on installing and hiding Magisk manager in the above instructions, (these settings remained in Magisk Manager when I did this).

    And you're done!

    KNOWN ISSUE:
    * * * MagiskHide Props Config IS NO LONGER WORKING * * *

    Please follow THIS LINK for the Universal Safetynet Fix that replaces the MagiskHide Props Config process.

    If you know an easier, shorter, more efficient, or UPDATED method, please share it and I'll make the necessary corrections/adjustments (y)
    5
    My method is updating via the OTA packages. Similar to using the factory image but no editing of files.

    1. Download the factory image for your current software version.
    2. Extract the boot.img from #1
    3. Download the factory image of the version you're updating to.
    4. Download the OTA image for the version you're updating to.
    5. Turn off magisk modules
    6. Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
      1. adb reboot bootloader
      2. fastboot flash boot "path to boot.img"
      3. fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
      4. Sanity check phone
      5. adb reboot recovery
    7. Once in recovery hold the power button and click volume up
    8. Use the volume keys to highlight "Apply update from ADB"
    9. Click the power button.
    10. On your computer run: adb sideload "path to #4" and wait for it to finish. You'll get status on the adb command and on the phone.
    11. Once finished restart the phone and let it finish the update.
    12. Your phone is now updated but without root.
    13. Extract boot.img from #3 above.
    14. Copy it to the phone
    15. Open magisk manager and patch the boot.img you just copied
    16. Copy the patched boot.img file created by magisk manager back to your computer
    17. Apply this file using fastboot
      1. adb reboot bootloader
      2. fastboot flash boot "path to patched boot.img"
      3. fastboot reboot
    18. Turn on your magisk modules and test
    19. You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
    20. You should now have an updated rooted device.
    4
    Just sharing how I do it in case someone is interested in a shorter path:

    1. Download the new full factory image
    2. Extract the file. Then extract boot.img from the image zip file within.
    3. Copy boot.img to your pixel 5
    4. Patch it with magisk
    5. Move back the patched file, rename it to boot.img
    6. Update the original zip file titled image-redfin-r*.zip with the new boot.img file (override the older one)
    7. Edit flash-all file by removing -w so it won't wipe your device clean
    8. Flash with flash-all

    No need to unroot and reroot.
    3
    My method is updating via the OTA packages. Similar to using the factory image but no editing of files.

    1. Download the factory image for your current software version.
    2. Extract the boot.img from #1
    3. Download the factory image of the version you're updating to.
    4. Download the OTA image for the version you're updating to.
    5. Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
      1. adb reboot bootloader
      2. fastboot flash boot "path to boot.img"
      3. fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
      4. Sanity check phone
      5. adb reboot recovery
    6. Once in recovery hold the power button and click volume up
    7. Use the volume keys to highlight "Apply update from ADB"
    8. Click the power button.
    9. On your computer run: adb sideload "path to #3" and wait for it to finish. You'll get status on the adb command and on the phone.
    10. Once finished restart the phone and let it finish the update.
    11. Your phone is now updated but without root.
    12. Extract boot.img from #2 above.
    13. Copy it to the phone
    14. Open magisk manager and patch the boot.img you just copied
    15. Copy the patched boot.img file created by magisk manager back to your computer
    16. Apply this file using fastboot
      1. adb reboot bootloader
      2. fastboot flash "path to patched boot.img"
      3. fastboot reboot
    17. You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
    18. You should now have an updated rooted device.

    Thank you. Well-written, just a few minor corrections.
    1. Download the factory image for your current software version.
    2. Extract the boot.img from #1
    3. Download the factory image of the version you're updating to.
    4. Download the OTA image for the version you're updating to.
    5. Apply the boot.img from step #2 (I save this from my previous update so I can skip steps 1 & 2 above.)
      1. adb reboot bootloader
      2. fastboot flash boot "path to boot.img"
      3. fastboot reboot (this is a sanity check to make sure things are normal. The phone should be normal and without root. It can be skipped if you wish, simply use the fastboot menu on the phone and boot to recovery skipping steps 4 & 5.)
      4. Sanity check phone
      5. adb reboot recovery
    6. Once in recovery hold the power button and click volume up
    7. Use the volume keys to highlight "Apply update from ADB"
    8. Click the power button.
    9. On your computer run: adb sideload "path to #4" and wait for it to finish. You'll get status on the adb command and on the phone.
    10. Once finished restart the phone and let it finish the update.
    11. Your phone is now updated but without root.
    12. Extract boot.img from #2 above.
    13. Copy it to the phone
    14. Open magisk manager and patch the boot.img you just copied
    15. Copy the patched boot.img file created by magisk manager back to your computer
    16. Apply this file using fastboot
      1. adb reboot bootloader
      2. fastboot flash boot "path to patched boot.img"
      3. fastboot reboot
    17. You can now delete 1, 3, & 4. I save #12 for the next update. This eliminates the need for 1 & 2.
    18. You should now have an updated rooted device.
    2
    Thank you. Well-written, just a few minor corrections.
    Thanks, updated the original.