Good to see this thread.
Sad to see that
the GitHub branch has been deleted. Wat?
As I
talked ranted about in my post
here, what I think needs to be done is to do-away with Seamless A/B system and replace system_b with vendor. EDIT: Actually, with the knowledge I found, we could have system_a, system_b, vendor_a and vendor_b too, but the Seamless A/B is probably pointless for the custom ROM's we'll surely need to even use Treble anyway.
Here is my quick initial research on that matter.
From what I can see, the partition map is "soft" in this device - meaning it's defined by GPT binary files rather than embedded in the bootloader. So in theory we can try and edit this without risk of hard-brick.
We have the following files in full official fastboot ROM:
gpt_backup0.bin
gpt_both0.bin
gpt_main0.bin
partition.xml
Then I found this article, which mentions these files:
GUIDE -->> How To Create Partition.xml [GPT]
According to this guide, gpt_main0.bin is what's flashed to "partition" via Fastboot. This is also what appears in the flash_factory script in official fastboot ROM.
I think we can build a new gpt_main0.bin from partition.xml, patch0.xml and rawprogram0.xml but I'm really not sure. This is where I'm up to.
EDIT:
It seems we can factory-flash the partition map in XML directly if we use Qualcomm QFIL tool (via MBN loader), which is part of QPST, but I am not sure if it will cause issues if we modify XML partition map since the gpt bin files will not match the XML. Also I don't know if QPST talk is allowed on XDA, it is probably some internal Qualcomm tool that's only for their partners...?
EDIT2: Best avoid the QPST and factory flash stuff, that can brick and wipe IMEI. I think all we need to do is edit the partition table via parted, and then the partition table data is actually stored in the "partition" partition, which can then be dumped to a new gpt_both0.bin. Will try this out.