[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] icantlogin:
I'm not a fan of Android 12's Material You, i.e. dull color schemes, ginormous headers and copious amounts of whitespace. Screens got bigger over time, but information density is getting lower and lower. It's crazy. Anyway, I'll spare you the rant.

As the LineageOS project stopped publishing builds for LineageOS 18.1, but they continue to patch their 18.1-branch with Android's monthly security updates, I decided to start building it myself following the instructions here.

You can download the builds here:

LineageOS 18.1 for Pixel 4a (sunfish) - Browse Files at SourceForge.net

Unofficial builds for those who wish to stay on 18.1 a bit longer.

sourceforge.net

I usually publish an update every month.

Edit June 2024: this ROM has reached the end of its life cycle (EOL) and is not updated anymore.

Additional tweaks​

Default maximum lockscreen password length of 64 characters (instead of 16) [more info]

Firmware​

It's probably best to run the latest Android 11 firmware, since this is Android 11. You can download the last official Android 11 factory image from Google and flash it from fastboot mode (your data will be erased).

Clean install​

Download the latest lineage-18.1-xxxxxxxx-UNOFFICIAL-sunfish-boot.img and lineage-18.1-xxxxxxxx-UNOFFICIAL-sunfish.zip from aforementioned link

Boot to bootloader a.k.a. fastboot

Flash the boot image with this command (replace filename with actual filename):

fastboot flash boot lineage-18.1-xxxxxxxx-UNOFFICIAL-sunfish-boot.img

Boot to recovery

Factory reset > Format data/factory reset > confirm (your data will be erased)

Apply update > Apply from ADB

Sideload the ROM with this command (replace filename with actual filename):

adb sideload lineage-18.1-xxxxxxxx-UNOFFICIAL-sunfish.zip

(If it asks "Signature verification failed. Install anyway?" answer Yes)

Optionally flash Gapps or anything else:

Advanced > Reboot to recovery

Run adb sideload with your zip

Reboot system now

Updating​

Updates are delivered through the built-in updater (Settings > System > Updater).

If you use Magisk, deny the Updater's request to reboot at the end of the update process, open Magisk, tap Install and then "Install to Inactive Slot (After OTA)". Tap reboot after the process completes.

Migrating from last official LineageOS 18.1 build​

So it turns out builds are signed with a secret cryptographic key and when you install an update it has to have the same cryptographic signature or bad things will happen. This means you can't directly update from the last official build (signed by the LineageOS team) to my build (signed by me).

The solution: build and install (as an update a.k.a. dirty flash) a so called "migration build", which "resets the keys on all packages at every boot." I guess after booting into this build once, you can just update to the regular build using the updater (the LineageOS wiki is very concise on this topic and doesn't explain much).

You can download the migration build and boot image from the aforementioned link, they are marked MIGRATION instead of UNOFFICIAL. Don't run this build any longer than necessary, it's a security risk by its very nature.

When I tried this migration, my system wouldn't boot (stuck on boot logo). ADB worked and I could see in dmesg or logcat that, among other errors, SystemUI failed to start. Was it because I didn't reflash Gapps? But I never reflashed Gapps when using LineageOS' builtin updater...

Later I did some testing. I did a clean install of the latest official build, then my migration build, then my normal build, all was fine. Then I did a clean install of the latest official build WITH Gapps, then flashed the migration build WITHOUT Gapps, and the system booted up just fine. Huh? Then I flashed my normal build DIRECTLY over the latest official build, without migration build in between, and all was STILL FINE! So uhm... what's happening, how does this signing work and when does it become a problem? I have no clue.

If you decide to try the migration route, make sure to backup any data you don't want to lose and let us know how it went!

Acknowledgements​

Thanks to the original maintainers PeterCxy, cdesai and mikeioannina for bringing LineageOS 18.1 to the Pixel 4a!

Source code​

LineageOS

A free and open-source operating system for various devices, based on the Android mobile platform. This is a mirror of https://review.lineageos.org/ - LineageOS

github.com