• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

OTA update on rooted device with MagiskProps -> 3a

Search This thread

swangjang

Senior Member
Sep 12, 2018
136
90
Google Pixel 5
Hi all,

TLDR QUESTION: do I have to "fastboot flash boot magisk_patched_boot.img" every time after "adb sideload ota_file.zip" ?

-------------------------------------------------------------------------------------------------------------------------------------------------

I'm coming over from only using samsung galaxy series to Pixel 5.
I've always used custom roms with root and whenever there was an update available, the usual process was:
1. Flash updated rom.zip
2. Flash magisk.zip
Done.

I assume it's a similar process for pixel phones and I intend to stay on stock rom with root.
I need to pass safetynet for google pay so I have to change the device fingerprint to Pixel 3a to bypass hardware attestation (as written on this forum guides).

1. Does changing the fingerprint to 3a break the on-device OTA updates?
2. Does changing the fingerprint to 3a break updates for Pixel 5 apps?
3. After an OTA update, (either by on-device or sideload), do I have to re-flash the magisk patched boot.img to retain root?

4. Also, if I decide to un-root, does bootloader re-locking also require a device wipe?

Thank you.
 
Last edited:

dirtyreturn

Senior Member
Aug 14, 2011
1,139
252
Nexus 7
Huawei Nexus 6P
Hi all,

TLDR QUESTION: do I have to "fastboot flash boot magisk_patched_boot.img" every time after "adb sideload ota_file.zip" ?

-------------------------------------------------------------------------------------------------------------------------------------------------

I'm coming over from only using samsung galaxy series to Pixel 5.
I've always used custom roms with root and whenever there was an update available, the usual process was:
1. Flash updated rom.zip
2. Flash magisk.zip
Done.

I assume it's a similar process for pixel phones and I intend to stay on stock rom with root.
I need to pass safetynet for google pay so I have to change the device fingerprint to Pixel 3a to bypass hardware attestation (as written on this forum guides).

1. Does changing the fingerprint to 3a break the on-device OTA updates?
2. Does changing the fingerprint to 3a break updates for Pixel 5 apps?
3. After an OTA update, (either by on-device or sideload), do I have to re-flash the magisk patched boot.img to retain root?

4. Also, if I decide to un-root, does bootloader re-locking also require a device wipe?

Thank you.


This may help. https://forum.xda-developers.com/pixel-5/how-to/tutorial-unlock-bootloader-root-valid-t4178673/page1


For bootloader, I'm pretty sure that relocking would wipe the device. I think unlocking it wipes the device.
Though, it's not entirely necessary, I think, to relock the bootloader after unrooting. I think, for preference of complete security over device. I believe it disallows device modification.
 

swangjang

Senior Member
Sep 12, 2018
136
90
Google Pixel 5
This may help. https://forum.xda-developers.com/pixel-5/how-to/tutorial-unlock-bootloader-root-valid-t4178673/page1


For bootloader, I'm pretty sure that relocking would wipe the device. I think unlocking it wipes the device.
Though, it's not entirely necessary, I think, to relock the bootloader after unrooting. I think, for preference of complete security over device. I believe it disallows device modification.


Hi, thanks for your response however I have already read that guide but it does not answer any of my questions.
 

dirtyreturn

Senior Member
Aug 14, 2011
1,139
252
Nexus 7
Huawei Nexus 6P
Hi, thanks for your response however I have already read that guide but it does not answer any of my questions.


Oh, sorry.

1) I think it changes a build.prop entry for device manufacturer or model.
2) Pixel 5 apps? Do you mean specifically designed for this device? I have a 3xl also, and I think and it seems, that stock apps are the same. Ah, for example, the Google stock camera app - I am not sure if a Pixel 5 specific feature would disappear or not work or something.
3) I THINK you will need to. Like, at least with elementalx and kirisakura kernel the (?)script(?) looks to see if Magisk is installed and retains it. I am assuming the Google stock kernel does not .
4) unlocking the bootloader wipes the device, I believe. I would assume relocking the bootloader would. Personally, I've never relocked the bootloader on any device after unrooting . If you do relock, back up your internal storage as an incase , failsafe, or general rule or something.

Hopefully, there will be someone to chime in in case I am wrong.
 
Last edited:

nico22320

Member
Oct 25, 2020
36
0
Hi, i don't use OTA but full image for update but no, it don't break change props on pixel 5 but yes you need to flash magisk again.

Good update. No issues for november update
 

cescman

Senior Member
Nov 5, 2013
143
30
As the december system/security update is coming, may I confirm the correct way to update:
1. disable all magisk modules, unhide magisk manager
2. Flash newest factory image, or flash OTA zip
3. reboot, and you get an updated but unrooted device
4. root the device as usual with magisk
5. Reapply all the magisk modules you use
 
As the december system/security update is coming, may I confirm the correct way to update:
1. disable all magisk modules, unhide magisk manager
2. Flash newest factory image, or flash OTA zip
3. reboot, and you get an updated but unrooted device
4. root the device as usual with magisk
5. Reapply all the magisk modules you use

That's typically the way I've always do it except you do not unhide MM. I also modify the batch file named ‘flash-all.bat’ and remove the ‘-w' so it doesn't wipe my device.
 
  • Like
Reactions: cescman

l7777

Senior Member
May 2, 2007
554
176
As the december system/security update is coming, may I confirm the correct way to update:
1. disable all magisk modules, unhide magisk manager
2. Flash newest factory image, or flash OTA zip
3. reboot, and you get an updated but unrooted device
4. root the device as usual with magisk
5. Reapply all the magisk modules you use
With the Pixel 2 my process was
1. fastboot flash stock boot and dtbo images for your current build version. (Not sure if dtbo is really needed)
2. Apply OTA via ADB
3. Allow phone to boot and finish update
4. Use magisk to patch the boot image from the new build version
5. fastboot flash patched boot image.

I have used this method for three years with the Pixel 2 and only had one issue. I used smalipatcher to make mock GPS look like real GPS and apparently the magisk module needs to be re-created for each build.
 
  • Like
Reactions: cescman

TonyApuzzo

Senior Member
Aug 20, 2010
70
27
I hope to get a more streamlined solution eventually, but this is what I did to upgrade my Unlocked Pixel 5:

  1. Download factory image
  2. Unzip
  3. Edit "flash-all.bat" to remove the "-w", save as "flash-nowipe.bat"
  4. plug in phone and enable debugging
  5. adb reboot bootloader
  6. flash-nowipe.bat
  7. unzip "image-redfin*" into a temp folder
  8. cd into the temp folder
  9. adb push boot.img /sdcard/Download/boot.img
  10. on phone run Magisk Manager and patch /sdcard/Download/boot.img
  11. adb pull /sdcard/Download/magisk_patched.img
  12. adb reboot bootloader
  13. fastboot flash boot magisk_patched.img
  14. fastboot reboot
I didn't need to uninstall / reinstall any modules, they were all there after the final reboot. I did have to uninstall / reinstall vanced using vanced manager to get it working.

Next time I will try patching the boot image and repacking so I need fewer reboots.
 

eric_4321

Member
Dec 18, 2020
5
1
I hope to get a more streamlined solution eventually, but this is what I did to upgrade my Unlocked Pixel 5:

  1. Download factory image
  2. Unzip
  3. Edit "flash-all.bat" to remove the "-w", save as "flash-nowipe.bat"
  4. plug in phone and enable debugging
  5. adb reboot bootloader
  6. flash-nowipe.bat
  7. unzip "image-redfin*" into a temp folder
  8. cd into the temp folder
  9. adb push boot.img /sdcard/Download/boot.img
  10. on phone run Magisk Manager and patch /sdcard/Download/boot.img
  11. adb pull /sdcard/Download/magisk_patched.img
  12. adb reboot bootloader
  13. fastboot flash boot magisk_patched.img
  14. fastboot reboot
I didn't need to uninstall / reinstall any modules, they were all there after the final reboot. I did have to uninstall / reinstall vanced using vanced manager to get it working.

Next time I will try patching the boot image and repacking so I need fewer reboots.
1. What's your build.prop before upgrade?
2. Did you uninstall Magisk (restore/complete) before upgrade?
3. If #2 is 'NO', did your 'Restore Magisk Manager' and disable 'MagiskHide' before upgrade?
Thank you very much!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    As the december system/security update is coming, may I confirm the correct way to update:
    1. disable all magisk modules, unhide magisk manager
    2. Flash newest factory image, or flash OTA zip
    3. reboot, and you get an updated but unrooted device
    4. root the device as usual with magisk
    5. Reapply all the magisk modules you use

    That's typically the way I've always do it except you do not unhide MM. I also modify the batch file named ‘flash-all.bat’ and remove the ‘-w' so it doesn't wipe my device.
    1
    As the december system/security update is coming, may I confirm the correct way to update:
    1. disable all magisk modules, unhide magisk manager
    2. Flash newest factory image, or flash OTA zip
    3. reboot, and you get an updated but unrooted device
    4. root the device as usual with magisk
    5. Reapply all the magisk modules you use
    With the Pixel 2 my process was
    1. fastboot flash stock boot and dtbo images for your current build version. (Not sure if dtbo is really needed)
    2. Apply OTA via ADB
    3. Allow phone to boot and finish update
    4. Use magisk to patch the boot image from the new build version
    5. fastboot flash patched boot image.

    I have used this method for three years with the Pixel 2 and only had one issue. I used smalipatcher to make mock GPS look like real GPS and apparently the magisk module needs to be re-created for each build.