Status: I can boot the device, and it is able to drive the display, but it cannot read the touch display yet.
My work derives from the documentation about Mobian on the Pixel 3a and the porting documentation. I’ve also received help from @erebion.
The Process
You will need to clone mobian-recipes. Do read the README file carefully, for a Pixel 4a, the architecture is Qualcomm-based and you will need to install the additional packages listed in the README file.
You can build an image with:
./build.sh -s -t sm7150
The -t sm7150 argument selects the device and the -s argument specifies that you want sshd running right off the bat. This argument also requires that you provide an authorized_keys files. (There may be a way to do it without the file, but I did not investigate.)
Once the build process is over, you flash the images by using the fastboot command. My device was already unlocked. I don’t remember exactly how I did it, but there are plenty of resources out there for unlocking the device. You’ll have to be booted into fastboot mode to flash it. I do this by powering on the device while holding the volume down key. Then you do:
fastboot flash boot mobian-sm7150-phosh-[date].boot-sunfish.img
fastboot reboot-bootloader
fastboot -S 100M flash userdata mobian-sm7150-phosh-[date].rootfs.img
fastboot reboot-bootloader
fastboot erase dtbo
fastboot reboot-bootloader
fastboot oem uart enable
fastboot reboot
The device will then start, and you should see the boot up sequence dump text to the screen. However, the device is missing some firmware. In theory, droid-juicer should take care of copying the necessary firmware to root filesystem, but it does not.
On my device, it looks for the vendor files in /dev/disk/by-partlabel/, but the vendor partition is in . It is moreover not a straight partition, but one mapped by /dev/disk/by-label/device-mapper. I don’t know what is going on there.
What I did to move forward is to mount manually /dev/disk/by-label/vendor and copied the firmware files that droid-juicer would, and I did the same with /dev/disk/by-partlabel/modem. This allowed the device to display a lock, but it is unable to read my touch. So I am currently stuck here.