Invalid Broken dynamic system updates caused by XEU's problematic implementation of Dynamic Partitions


kikmyaz

Members
May 3, 2024
16
15
Potentially in a bid to reduce image sizes, XEU opted to remove the "_b" partitions in "super". This seems reasonable in general if the intent was to leave the dynamic partitions empty, but nuking {system,vendor,product,odm,mi_ext,system_dlkm,vendor_dlkm}_b out of existence completely is going beyond.

I work in aftersales. I realised there have been a fair number of customer reports of data loss/bootloops during upgrades. The way I managed to fix them was to just set the active slot back to "a" and make sure everything there is consistent if they were on XEU. Having investigated this further I saw something seems strange with XEU's super image in that all the "_b" parts are gone. This is bad because some of Xiaomi's code will attempt to write data there despite the fact that you have patched out Updater. This was discovered after I did a quick "ls /dev/block/mapper/" on the affected devices.

I guess if bandwidth was a concern in the decision to remove these parts, maybe just leave them as empty but properly formatted instead of removing the records. The XEU implementation deviates from Android's officially supported implementation (which iirc was the one Xiaomi originally used). This is incredibly dangerous. I guess it also explains the numerous reports of DSU loader not working specifically on XEU (despite activity being present in developer options).
 
1. Our logical partition structure in super partition is 1:1 identical to official partition structure used by Xiaomi.
2. Slot B is empty, has always been empty, as our ROMs are distributed as full OTA packages.
3. We've never distributed incremental OTA packages in the payload.bin format, hence dynamic system updates were never used with our ROMs, which means Slot A is the only one ever being used and Slot B remains empty (specifically in the super partition, for the rest of partitions Slot B is a mirror of Slot A).

You clearly don't know what the hell you're talking about, or what kind of "aftersales" you're ranting about as we're a custom ROM.
 
  • Like
Reactions: iGears88