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


kikmyaz

Members
3 May 2024
23
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
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.
Funny you mention this. Lots of repair shops in the UK actually just started to put EU roms on known unlocked devices cos they won't get locked out again even if it's originally a CN device (or with an EDL forced flashed global). Take it as a compliment ig. And yeah the issue is exactly caused by point 2. If the device is stock it should not have an empty slot b. Assuming slot b empty on an A/B device is exactly what we think the problem lies
 
Last edited:
Funny you mention this. Lots of repair shops in the UK actually just started to put EU roms on known unlocked devices cos they won't get locked out again even if it's originally a CN device (or with a forced flashed global). Take it as a compliment ig.
I take that as a nuisance, because of those coming here to complain about stuff that has nothing to do with us.

And yeah the issue is exactly caused by point 2. If the device is stock it should not have an empty slot b. Assuming slot b empty on an A/B device is exactly what we think the problem lies
There is no problem. Everything is as intended. ROMs that are distributed exclusively as full packages have no utility for A/B.
 
There is no problem. Everything is as intended. ROMs that are distributed exclusively as full packages have no utility for A/B.

If the device is stock it should not have an empty slot b.

I mean one could wish "no problem" was actually the case. Samsung gets away with it because nothing in their OEM code makes calls to DSU stuff at all in the past. The same cannot be said for Xiaomi. And even in the case of Samsung they're slowly moving away from the old A-only update model. Just a light caution for XEU.