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. Eventually, you’ll see a number pad on the screen. However, the screen cannot read your touch, and I’ve not yet found a solution to this problem.
droid-juicer is supposed to copy the firmware from partitions that exist on the device, but it does a partial job. In particular, it fails to copy the modem files properly. This prevents the wireless from working. Here is my temporary solution:
On the phone:
mount -o ro /dev/disk/by-partlabel/modem_a /media/
On my laptop:
git clone https://github.com/linux-msm/pil-squasher.git
cd pil-squasher
make
mkdir firmware
cd firmware
scp mobian@10.66.0.1:/media/image/* .
../pil-squasher modem.mbn modem.mdt
scp modem.mbn modemr.jsn mobian@10.66.0.1:
On the phone:
sudo su
cd /home/mobian
mv modem.mbn modemr.jsn /lib/firmware/updates/qcom/sm7150/google/sunfish/
reboot
You should now be able to do iwconfig and see the network interface.