Kunjungi website CMD368 2024

M CMD368 Live

A/B + twrp: How do the slots actually work?

After a long time of using cyanogenmod as well as LOS I finally have the first A/B device to install it to, the Sony Xperia XA2 (pioneer). I managed to install a working system with LOS, root as well as gapps on slot A. Slot B is not usable now and is stuck on a Sony logo bootloop.

Now that it’s all working fine on slot A, I’d like to duplicate the currently working installation from slot A onto slot B – just in case something goes wrong with my primary installation, because that is what the new A/B system is made for, right? Except I can’t.

  • Suppose I were able to have both slots working fine. Now I break one slot. I switch to the other and all is well. How can I fix the broken slot now without accidentally breaking the remaining working slot? I want to test this and verify that I can fix it without breaking the remaining slot.
  • If I try to backup the system partition, how do I know which partition it will backup?
  • Note that I always need 3 zips, LOS, root and gapps. Also note that I wipe /system and format /data in between. I fastboot boot the latest twrp each time.
  • First I wipe /system and /data, then reboot into recovery to switch slots and also wipe the other /system. No OS installed in any slot anymore, stock system gone, I should be able to start over fresh. . at least that is what I think.
  • From what I gathered, zip files will be installed to the currently INACTIVE slot. Alright, I can work with that. Install all the zips, switch to the inactive slot that I just installed to and reboot? No, system does not boot. Where did I install all those 3 zips? Which void were they installed into? The slot that was active when I was installing LOS works, but it boots without root or gapps. Wasn’t it supposed to install to the inactive slot instead? Result is that the system is usable but missing the other zips. Let’s start over.
  • The official LOS instructions say that after flashing the LOS zip, the device has to be rebooted into recovery again, to switch slots, before more zip files can be installed. That’s strange, how does twrp decide which zip goes into which slot? Do I have to reboot in between each zip? Or only after the first? How would twrp know what the first zip was, does it keep count? Why do I only have to reboot after the first LOS zip?
  • My point is: TWRP tells me which slot is the active one. But then it installs some zips to the inactive one, and some either on the active one or into a void. There is no manual or information about how TWRP decides which zip goes into which slot. Now how am I supposed to know how I can duplicate the working slot A over to B if I never know which zip is sent to which slot? I tried it and ended up with 2 unbootable slots again.
  • Following the LOS instructions precisely by installing the LOS zip and then rebooting to recovery before installing the other zips, one slot works with everything installed. Following instructions is obviously a good choice. But now I can’t reliably duplicate this to the other slot without ruining both of them again.
  • For example, if I wipe /system, does it wipe the active or the inactive slot. By now I’d assume it wipes the inactive one. But I don’t actually know, because twrp doesn’t bother to tell me whether it wiped /system_a or /system_b.
  • I still do not know why following the instructions worked. Why do I have to reboot in between zips and why only once?
  • From my short experience with this device I gathered that for flashing multiple zip files, I have to reboot once after the LOS zip before installing more zips, and I also gathered that the A/B switch in TWRP is only for switching between two already-working slots. It can’t be used to skip a reboot for zip installations. But why?
  • It would be much easier if we just had both system partitions to chose from when applying zips, then there would be no confusion whatsoever. I guess that would have been too easy.

Locked post. New comments cannot be posted.

TENCON 2024

The Tropical Cyclone Warning Signal Number 8 was hoisted on 2 Nov 2024. The Hong Kong Government has announced that the testing deadline for undergoing compulsory testing will be extended by one day https://www.info.gov.hk/gia/general/202411/02/P2024110200571.htm . Participants who missed their PCR test on 2 Nov 2024 can do their PCR test on 3 Nov 2024.

For participants who arrived Hong Kong on or after 1 Nov 2024, their LeaveHomeSafe App should still be showing the amber code on 3 Nov 2024. They will NOT be able to join the Gala Dinner in the evening of 3 Nov 2024. TENCON 2024 will compensate each of these amber code participants by cash (HKD 800) at the TENCON registration counter (from Eddy Chiu) in HKCEC from 10:00 to 16:00 on 3 Nov 2024. Please present proof of your arrival date (e.g. air ticket) at the registration counter upon receiving the cash compensation.

To participants of the gala dinner, please be reminded to present photo of your (same day) RAT result upon entry of the diner venue.