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!