[OnePlus 8T Guides, News, & Discussion] BillGoss:
What it ain't: it's not a "how-to" manual. There are lots of threads out there that explain how to do things.

What it is: a fairly simple explanation of how things are on this phone written for those who, like me, have come from a phone with no A/B partitions (a far simpler world).

"Toto, I've a feeling we're not in Kansas anymore"​

The OnePlus 8T is an AB device. This means that a large number (but not all) of its hardware partitions have an A and a B version. The A set of partitions are called slot a, the B set are slot b.

The reason for this is to support seamless over-the-air (OTA) updates. These are updates to the operating system (OS) that can be installed while the phone is being used! Once the update has been installed the phone is rebooted (it automatically switches slots) and comes up on the newly updated version of the OS. If the update fails, the phone will simply revert to the original slot.

To implement this a number of things have changed:

The AB partitions have a currently active/running version (called the active slot) and an inactive version (the inactive slot) where the updates can be written to.

An update module (update_engine) is included in the OS to process the updates. Previously this would have been handled by code running in the recovery partition.

To avoid doubling up on large system partitions (system, system_ext, odm, product, vendor) and to can cater for increases in these partions, these are now carved out dynamically from a large super partition. This allows more effective use of the hardware space.

This has some important implications:

While it looks like you could have two versions of the operating system installed on the phone (one on slot a, one on slot b), this is not in fact the case. And that's because the super partition isn't large enough to hold two sets of system partitions. Just like there's only one version of the data partition, so there's only one version of the super partition (containing the system partitions).

You can write to hardware partitions in bootloader/fastboot mode using fastboot flash <partition> <file>, but you can't use this mode to write a specific file within a partition. And, therefore, you can't use this mode to write to the system partitions because they are files within the super partition. For these, you need to use fastbootd which is part of recovery.

Flashing/installing a ROM using the update engine (as done by System update of OOS or a recovery from LineageOS or TWRP) will alwaysbe written to the inactive slot. So, if you are flashing a custom ROM and want it to use the latest OOS firmware installed on the phone, then you will have to either:

Copy the firmware from the currently active slot to the inactive one, or

Swap slots before you do the install so that it gets installed on what was the active slot containing the correct firmware.

If you are used to using TWRP to backup your system partitions, then the way to do it now is to backup the super partition and not the system, system_ext, odm, product, or vendor partitions.

"It's complicated"​

"Delta variants"​

Updates (whether Over-the-air (OTA) or from the OnePlus download site) come in two flavours:

Full update: the files for each updated partition contain the full image. These are quite large, typically about 3-4GB.

Delta update: the files contain only the changes to be applied to each partition and can be quite small in size (MB rather than GB).

Since a delta update only contains changes, it is imperative that the update process check that the current partition contains the expected data that will be updated. The update_engine will check that the current partition hash is what the update is expecting. If it isn't, the update will fail.

If a partition has been modified (you have installed Magisk which changes the boot partition, or installed TWRP which changes the recovery partition), then you will have to restore the changed partition back to their original stock version before starting the update process.

That's why it is best practice to take a copy of the stock partition before you modify it.

"Good memories"​

The 8T came out originally with LPDDR4X memory, but OnePlus then decided to improve it by using LPDDR5 memory. As a result of this change, the xbl and xbl_config partitions now hold different data depending on the type of memory used in the phone. Note: you can find out what type of memory your phone has using:

on OOS 11: getprop ro.boot.ddr_type - 0 means LPDDR4X, 1 means LPDDR5.

on OOS 12 (and later): cat /proc/devinfo/ddr_type - you need to run this as root.

The way this is implemented is by including files for both LPDDR4X (files named xbl, xbl_config) and LPDDR5 (files named xbl_lp5, xbl_config_lp5) in updates/downloads. OnePlus had to make custom changes to update_engine to cater for this. It is only as of 2021-12-22 that a version of TWRP was produced that could handle these files correctly.

"Hitting the books"​

Google has some great documentation about AB devices. If you are using your phone to read this, make sure you use your browser in desktop mode so that you can see the Google documentation's navigation pane on the left hand side.

A/B (Seamless) System Updates: https://source.android.com/devices/tech/ota/ab

Dynamic Partitions: https://source.android.com/devices/tech/ota/dynamic_partitions

Fastbootd: https://source.android.com/devices/tech/ota/dynamic_partitions/implement#fastbootd and https://source.android.com/devices/bootloader/fastbootd

Virtual A/B Overview: this covers how the system partitions in super get updated and it's fairly complex https://source.android.com/devices/tech/ota/virtual_ab