[OnePlus 8T Guides, News, & Discussion] BillGoss:
Update 220823: Update for TWRP 12 and some other minor changes due to the switch from SafetyNet API to Play Integrity API

Updated 211203: include Magisk Canary

Edited 220113: correct a mistake in the Keeping Root process; some formatting changes

I keep seeing posts that say you can't root OOS after an OTA unless you have a full image installation zip. That's just not true these days (September 2021).

You can use @osm0sis' method in https://xdaforums.com/t/tools-zips-...ices-platforms.2239421/page-149#post-84764713

And @g96818 suggests using "Install to inactive slot" which works provided you do it properly - see https://xdaforums.com/t/guide-how-t...00-kb2001-kb2003-kb2005.4178675/post-85801253.

And here's how to do it using TWRP.

What you'll need:

OOS 11: TWRP image (.img) and (optionally) installer zip from https://xdaforums.com/t/recovery-11-alpha-teamwin-recovery-project-8t-kebab.4302449

OOS 12: TWRP image (.img) and (optionally) installer zip from https://xdaforums.com/t/recovery-12-unofficial-teamwin-recovery-project-8t-9r-2022-07-27.4473983

Magisk apk - using stable from https://github.com/topjohnwu/Magisk/releases or using Canary from https://github.com/topjohnwu/magisk-files/tree/canary

Universal SafetyNet Fix (UNSF-MOD) by @Displax from https://github.com/Displax/safetynet-fix/tree/integrity

I'm also assuming you have an unlocked bootloader, know how to use fastboot, how to use TWRP, and how to use Magisk.

I'll go through rooting a currently unrooted version of OOS and then doing an incremental update OTA.

Root unrooted OOS

Install the Magisk APK. I find that this works nicer than letting the stub download the full app the first time you use it.

Boot into bootloader mode.

Boot TWRP using fastboot boot x.img where x.img is the TWRP image file.

Take a backup of the current boot and recovery partitions as you'll need them for successfully updating when the next incremental OTA becomes available.

Install the Magisk APK, just like you would install any zip file in TWRP. Note: the APK must be named Magisk-*.apk otherwise TWRP won't list it. Also install USNF if you are using Magisk Canary.

If you want to keep TWRP then install the TWRP installer zip.

Reboot.

If you are using Magisk Canary, in Magisk>Settings enable Zygisk, Enforce DenyList, and Configure DenyList. Then reboot.

Keeping Root on an incremental OTA update

Note: you do NOT need to (but can if you want to) follow this process if you're installing a full OTA. You only need to install the full OTA and then install Magisk to the inactive slot and reboot from Magisk when it prompts you.

If your phone tells you you have an update:

If you have TWRP installed, then boot into TWRP and restore the stock recovery and reboot.

In Magisk tap on "Uninstall Magisk" and select "Restore images".

Install the OTA update but don't reboot yet.

Turn on airplane mode so that apps can't call SafetyNet when you reboot the phone without root.

Reboot

When the phone has successfully rebooted the updated system, boot into bootloader mode.

Boot TWRP using fastboot boot x.img where x.img is the TWRP image file.

Take a backup of the current recovery partition as you'll need it for successfully updating when the next incremental OTA becomes available.

Install the Magisk APK, just like you would any zip file in TWRP. Note: the APK file name must start with Magisk- otherwise TWRP won't list it. Your existing Magisk settings, modules, and [hidden] Magisk app will be preserved.

If you want to keep TWRP then flash the TWRP installer zip.

Reboot and disable airplane mode.