How to install to A/B slot devices?
I understand how this layout works, but I'm having trouble.
Say my current slot is A. Is the right thing to do to
- have twrp flashed on boot_a
- flash halium to boot_b
- enter recovery on A
- run twrp-installer.zip
- enter recovery on B
- run install script
unfortunately, either the twrp installer is bad/not working because I can access twrp shell from adb, but don't have touch functionality and it will not boot into twrp on the halium-boot slot, so I'm assuming that the UB installer script won't do anything.
I'm on the essential ph-1
I don't have info, but this is the case on other devices like the Pixel XL. it's mentioned on a github issue here:
It seems like they figured a work around?
The notes say:
This is an A/B device, so dual boot is possible: I'm currently running Android P in slot A along with Halium being installed in slot B.
TODO: Add dual-boot installation instructions
A/B partition scheme means there's no recovery partition anymore. Instead, it's located in initrams of the kernel. At normal boot, bootloader puts skip_initramfs flag into cmdline and Android obeys that. Halium needs initramfs, as some scripts are run there, so there's a dirty hack in the kernel to ignore skip_initrams. Thus, installing TWRP will break Halium and prevent it from booting.
TODO: Research the way Android boots and replicate that behaviour in Halium
I think the answer might be:
Halium needs initramfs, as some scripts are run there, so there's a dirty hack in the kernel to ignore skip_initrams.
Flohack last edited by
The basic idea after I tried on the Pixel 2XL:
- you unlock device as usual (enable developer mode, authorize your PC for USB debugging, boot into bootloader do fastboot flashing unlock)
- Then, do not try to install TWRP permanently. You will have to boot it everytime with fastboot boot twrp-xy.img
- You can select the slot to flash to also with the fastboot command. What I did was:
- Boot TWRP in slot a
- Install LineageOS 16.0 (to get the vendor partition), TWRP will install it to slot b!
- Flash halium-boot.img to slot b
- Install rest of system with halium-install. You also need to specify flag -s to install it with "system-as-root" mode
System is booting now, but recovery cannot be installed ATM with Halium. We are doing work now to integrate our recovery properly, at least then you will be able to use it.