UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to install to A/B slot devices?

    Scheduled Pinned Locked Moved Porting
    3 Posts 3 Posters 2.6k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • X Offline
        xonq
        last edited by xonq

        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

        1 Reply Last reply Reply Quote 2
        • S Offline
          supaiku
          last edited by

          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:
          https://www.bountysource.com/issues/61605333-device-port-marlin-google-pixel-xl-1st-gen

          It seems like they figured a work around?

          The notes say:

          Specific features
          Dual-boot
          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
          No recovery
          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.

          1 Reply Last reply Reply Quote 1
          • flohackF Offline
            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.

            My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

            1 Reply Last reply Reply Quote 0
            • First post
              Last post