[Google Pixel 8 Pro] BillGoss:
@badabing2003,

Let me start off by sharing some numbers about the super partition.

The super partition (aka /dev/block/sda33) is allocated 8,331,264 1kB blocks (from cat /proc/partitions), giving it a total size of 8,531,214,336 bytes.

The super partition's internal allocation of space can be seen by running /system/bin/lpdump -a (I've attached a copy of the output). Amongst other things it shows that the super partition has a size of 8,531,214,336 bytes and that I'm on slot _b.

Furthermore there are two slots defined (0 and 1). In the output you can see that slot 0 (under "Super partition layout:") has all the _a logical partitions plus system_b defined. On the other hand, slot 1 (again under "Super partition layout:") has a raft of _b partitions defined (the logical partitions plus many *-cow ones).

My last update to the phone was an incremental update which explains why there are all the *-cow partitions.

The sizes of the logical partitions, using the files in the factory image for my current rom, are:

bill@Inspired:.../bill/@ignore $ ll ap31*
-rwxrwxrwx 1 bill bill 3838894080 09-01-01 01:00 ap31-product.img
-rwxrwxrwx 1 bill bill 880742400 09-01-01 01:00 ap31-system.img
-rwxrwxrwx 1 bill bill 10981376 09-01-01 01:00 ap31-system_dlkm.img
-rwxrwxrwx 1 bill bill 309927936 09-01-01 01:00 ap31-system_ext.img
-rwxrwxrwx 1 bill bill 735010816 09-01-01 01:00 ap31-vendor.img
-rwxrwxrwx 1 bill bill 27533312 09-01-01 01:00 ap31-vendor_dlkm.img

The total, therefore, of all these logical partitions in super slot 1 is 5,803,089,920 bytes. Slot 1 additionally includes the *-cow partitions.

It's clear that the super partition cannot hold two versions of the logical partitions because 2 x 5,803,089,920 > 8,531,214,336.

It follows from this that you can't have the phone set up to boot one rom on one slot and a different one on the other slot.

But the reason that applying a full OTA image twice (and then rooting the phone) allows you to have a rooted version on one slot and an unrooted one on the other slot is, not because there are two copies of the logical partitions in the super partition, but because a single instance of the logical partitions can be used on both physical slots (_a and _b).

I know this because I've run different regional variants of the same OnePlus 8T rom on each slot. I manually flashed all the physical partitions on different slots, but only flashed the logical partitions once after wiping the super partition.

I know that the super partition appears to hold two full sets of logical partitions, but these are definitions rather than actual physical allocations. If you add the total "allocated" storage for slots 0 and 1, it will exceed the physical size of the super partiton.

After writing the above I wondered if there was a way to demonstrate this. And there is! I flashed the factory image of the current rom over the top. Since a factory image doesn't change slots, it simply overwrote the current slot. And what this did to the super partition is create a clean slot 1 with no *-cow partitions with each logical partion having exactly the same size as the image files. And, even though a factory image doesn't touch the inactive slot, the slot 0 "Super partition layout:" section is now identical to the slot 1 section!

I've attached a zip file containing the lpdump outputs. lpd-af-incr is the super structure after my last incremental update; lpd-af-fact is the super structure after flashing the factory image of the update.

Incremental updates verify that all partitions have the expected contents and will not start if any partition fails the test.

An existing modified partition does not cause a rollback because the actual update process will not start unless the current system passes the test. This is why we (P8P owners) will not even be offered an OTA update if the phone is rooted.

As I've pointed out above, the super partition does not hold two full sets of logical partitions. It only holds one.

Aside: I'm rather annoyed with Google for not allowing users to manually install an OTA on the phone. This would have enabled us to see what changes in the super partition by running lpdump -abefore and after a full image OTA. And you can't run shell commands in recovery either :(

However, the OnePlus 8T (my old phone) does and that's how I learnt what goes on in the super partition.

I never said or suggested that you could go back to the previous version of the system if the factory image update fails. But I did say that if a full image OTA fails to boot, you also won't be able to return to the previous system. And that's because the super partition only ever has a single set of working logical partitions (see the beginning of this post :) )

I had some more comments about full image OTAs, but given that there is no way to currently verify what I would say (we can't manually apply an OTA while the system is running and can't run shell commands in recovery) I'm not including them.

From my point of view the only truly safe update is an incremental OTA.

And, as you pointed out, installing a full OTA twice gives you two bootable slots, but flashing a factory image to both slots only gives you one bootable slot (the last flash) because of the system-other image messing up the inactive system partition.

It's been fun to go over this topic again (for me), do some testing, and to learn more about my Pixel phone.