User Tools

Site Tools


android:oneplus

This is an old revision of the document!


Headline

OnePlus 6T

Partitions

A/B system updates, also known as seamless updates, ensure a workable booting system remains on the disk during an over-the-air (OTA) update. This approach reduces the likelihood of an inactive device after an update, which means fewer device replacements and device reflashes at repair and warranty centers.

Non-A/B Android phones actually had two kernel images. One lived in the recovery partition, while the other lived in the boot partition. This allowed the phone to boot into recovery and make major changes to the rest of the system. But the A/B approach gets rid of the separate recovery partition and integrates it into the boot partition. In an A/B system it's no longer necessary to have a separate dedicated recovery since updates happen directly to the inactive partition.

This creates a challenge for phone modding, however. Without a separate recovery partition, the stock recovery has to be replaced with a custom recovery, inside the boot partition where the kernel lives. But on Android, you cannot modify partitions through fastboot – you can only flash over them. So installing a custom recovery like twrp for the first time requires you to fastboot boot into twrp from your computer, then flash an installer once you are booted. .

There's another problem: Rooting via magisk makes modifications to the boot sector. So does flashing xposed or (obviously) a custom kernel. With recovery and these other custom mods now all living together in the same partition, it is possible for one of them to overwrite files used by another mod. This is why you may need to reflash magisk after updating a custom kernel or custom recovery, and why not doing so can result in a bootloop. You've overwritten files magisks uses for root, so your phone can no longer boot (this isn't the case with all mods; many are now coded to avoid this problem).

Though there are two versions of many partitions (boot_a, boot_b, system_a, system_b, and so on) there's only one userdata partition. So your data isn't affected by the update.

When you do OTA updates partition is changed to other one..you can change partition in TWRP. The following command will show what the current boot slot is “_a” or “_b”.

> adb shell
> getprop | grep slot

In principle you could dual boot … but there is only one data partition !!! So if might be that your data partition is not compatible with one of both.

I am using dual boot. Slot _a contains the original OTA 9.0.7; slot _b contains a debloated version with additions for pixel functionality. I use _b as daily driver, but if something goes wrong as a result of my patching on _b, I can quickly switch to _a and have a working phone.

The data partition is compatible in this case.

You can switch between _a or _b in TWRP.

This is not really suitable for dual booting, because there is only a single data partition, so if you try to have different OS on each slot then you will have problems because all of the data may not be compatible. TWRP will flash/install to the “current” partition.

Unlocking

Rooting

android/oneplus.1642246727.txt.gz · Last modified: by 127.0.0.1