Will the Updater App support A/B in the future?


Tobi_Peter

Members
Feb 21, 2022
11
15
Hey there,

I've bought a new A12 device recently with the A/B partition scheme and noticed that every update writes to both slots. I wondered, if it would be possible for the inbuilt updater app to directly support A/B updates, thus with no need to reboot in the recovery to install an update, but a simple, normal reboot, just to the other slot.

I also saw, that LineageOS has it's own recovery and updater and they're able to normally utilize the A/B partition scheme.

Would it be possible for xiaomi.eu to support those as well?
There'd be no need anymore to reboot to the recovery to install an update, but they can be installed from within the running system.
This also includes a fallback for a broken update, as the device can simply be rebooted to the other, intact slot.

For example, the LineageOS recovery and updater could be forked (or their code inspected to find out how they manage updates), to copy their behavior.
As the xiaomi.eu updater currently also suffers from instability issues (at least I noticed some), this would fix those as well.

The app would just have to be redesigned to match the xiaomi update style.

I'd like to know what you think about this or if this is even possible!
 
I am all for improvement, but knowing that the current Updater is maintained by only one developer, I have a hard time thinking positively about this poll.
 
I am all for improvement, but knowing that the current Updater is maintained by only one developer, I have a hard time thinking positively about this poll.
Oh OK, I didn't know that.
Xiaomi.eu always seems to be quite popular, so I thought there'd be more people involved.
Nevertheless, especially since there's already an open source infrastructure to perform those updates, it would at least be possible.

I would help if I could, but unfortunately, I have 0 experience with android app development, so I'd probably not be helpful at all.
But maybe someone out there in the community thinks this would be a cool project and would help out. :)
 
So, I found some more information about A/B updates.
Here is roughly explained what it is and what changes would roughly need to be applied for it to work.

Here, on the other hand, is described how OTA packages would have to be built to be able to utilize A/B updates:

This might be my biggest concern, as I don't know how xiaomi.eu modifies the ROMs and builds them.
Are they using the normal AOSP tools to do that?
In that case, it should be fairly simple to adapt as well.
 
I am all for improvement, but knowing that the current Updater is maintained by only one developer, I have a hard time thinking positively about this poll.
The Updater has little to do with A/B OTA updates, it merely passes a command to the recovery and reboots to recovery.
The actual job is done by the recovery (i.e. TWRP) and a mandatory payload.bin (flashing format used for A/B).

Are they using the normal AOSP tools to do that?
In that case, it should be fairly simple to adapt as well.
Yes, we use normal AOSP tools to build our ROM images.
No, we are not interested in investing into A/B support, which would require building both full ROMs and incremental updates.
Everything is "fairly simple" when it comes to talking, not so simple when it comes to doing.
It's a waste of our time and bandwidth. Enjoy the ROMs as-is.

I removed the poll because it's irrelevant and going to change nothing.
It's just a push poll that attempts to put pressure on us by showing us how many people are interested in such idea.
 
The Updater has little to do with A/B OTA updates, it merely passes a command to the recovery and reboots to recovery.
The actual job is done by the recovery (i.e. TWRP) and a mandatory payload.bin (flashing format used for A/B).


Yes, we use normal AOSP tools to build our ROM images.
No, we are not interested in investing into A/B support, which would require building both full ROMs and incremental updates.
Everything is "fairly simple" when it comes to talking, not so simple when it comes to doing.
It's a waste of our time and bandwidth. Enjoy the ROMs as-is.

I removed the poll because it's irrelevant and going to change nothing.
It's just a push poll that attempts to put pressure on us by showing us how many people are interested in such idea.
Oh OK, thanks for clearing that up!
I didn't want to put pressure on anyone with the poll, it was more a personal interest, I'm sorry if it seemed that way.

As far as I understood the documentation, incremental updates can be used but full updates can also be used, but I probably misunderstood that.
Anyway, I learned a bit about the A/B update process and that's something as well. :)
Have a nice day and thanks for your work! :)