[Google Pixel 5 Guides, News, & Discussion] xsR1zU:
I presume that because the OTA method has been added as one of the update options in this guide, it must mean that other people have had success with it in the recent past -- Is that true? It's never worked for me. (But my last attempt was 6/8/22 with Magisk 25.001 canary.)

I'll share my update method that I've used with success the past couple updates (including today when updating to A13):

In Magisk: restore the stock boot image, but don't reboot. That way, you continue to have root, but it won't interfere with the OTA update process. I usually do this a day or two before I expect an update to be released.

Wait for the OTA update to become available. When available, proceed with installation. When complete, do NOT click the reboot button.

Grab a copy of the new stock boot image that has been installed as part of the update. You can do this because you still have root. You don't have to wait for the update to be complete before doing this -- just wait at least until the update says that it is "optimizing" your system. By that time, the boot image will have already been updated. Start a shell in Termux and do the following:

You need to know which slot (a or b) is your current active slot, and then grab the image from the other slot. The active slot can be found with:

$ su

# getprop | grep slot

[cache_key.telephony.get_slot_index]: [80256431924873534]

[persist.vendor.mdm.slot.sw]: [UIMDRV,slot_1]

[persist.vendor.mdm.slot.swtime]: [2021-06-05 21:18:02]

[ro.boot.slot_retry_count]: [0]

[ro.boot.slot_successful]: [no]

[ro.boot.slot_suffix]: [_b]

#

Seeing in the example above that the current slot is "_b", copy the boot image from the inactive slot (in this example, slot _a) to the sdcard:

# cp /dev/block/by-name/boot_a /sdcard/

Use Magisk to patch the stock boot image that was copied to /sdcard/boot_a

Move the patched image to your computer.

You are now ready to go back to the system update screen and click the reboot button. The system will do a few more housekeeping items, then the screen will clear and "rebooting..." will appear.

When the system says "rebooting...", press the power button and the vol. down button simultaneously so that it boots into the bootloader (fastboot). (If pressed too quickly, it may instead capture a screen shot -- just release the buttons and press again.)

Use fastboot on your computer to boot the new patched boot image:

fastboot boot <magisk-patched-boot-image>

The system will boot up into the newly updated OTA version. You will still have root, but the boot image on the phone will still be stock. Go into Magisk and use the 'direct install' method to patch the boot image on the phone. Once patched, Magisk will then present a reboot button for clicking. Rebooting at that point is unnecessary -- you are already running a patched boot image.

The advanages of the above method is that you don't have to download a large factory image and extract the stock boot image out of it, nor do you have to flash the factory image, all of which takes time. Instead, you are just letting the OTA process handle the downloading/installing (which can proceed unattended). Furthermore, the OTA download is likely to be much smaller in most cases -- the July OTA update was only 18 MB (although in the case of the OTA for A13, it was rather large at 835 MB). A smaller download means that it will install more quickly.