[ROM][10][UNOFFICIAL] lineage-17.1 for Pixel 4a (sunfish)

liamwhite

Member
Dec 5, 2020
17
6
3


LineageOS is a free, community built, aftermarket firmware distribution of android, which is designed to increase performance and reliability over stock android for your device. This is a straightforward port of the device tree for flame (Pixel 4) to sunfish (Pixel 4a).

Downloads:
sunfish (Pixel 4a) rom (v2): https://mega.nz/file/zG4UVTQB#ZXLw_qULzC8-an-MEdxdAvUMhmIa5qLI6YG54Feh2z0
410b3f523795d9d1481d183309adb170 lineage_sunfish-qd3a.200805.001-rel-v2.zip
sunfish (Pixel 4a) rom (v1, broken, do not install): https://mega.nz/file/jXRB2a4B#a5Dcf9T6emWAwvAj3oFvofkI0la0zf7vj5KIMn-yQaM
MD5: 86743134c3032a030d35195d44f02e1b lineage_sunfish-qq3a.200805.001.zip

This is not a recovery-installable zip! Please read below for how to install this image

Prerequisites:
Like the TWRP build for this device, this ROM build is only known to be compatible with older firmware. I only tested QD4A.200805.003, but .001 would likely work as well. If you have a newer version, you will need to downgrade at least the bootloader and radio first. I recommend installing the QD4A.200805.003 firmware image from Google, as that's what I tested with.

Instructions:
1. Flash the vbmeta.img file in the included zip (fastboot flash vbmeta vbmeta.img)
2. Reboot into fastbootd (fastboot reboot fastboot)
3. Run fastboot update -w lineage_sunfish-qd3a.200805.001-v2.zip
(If you do not have a working fastbootd, extract boot.img from the update zip and flash it from the bootloader first)

Working:
- Camera
- Fingerprint
- Wi-Fi
- Bluetooth
- Sound
- Mobile data (tested with T-Mobile only)

Not tested:
- Google apps (should work fine, but you never know)

Changelog/Source Code:
sunfish device tree: https://github.com/liamwhite/android_device_google_sunfish
sunfish kernel tree: https://github.com/liamwhite/android_kernel_google_sunfish

Credits:
Many thanks to all LineageOS team members and all the contributors out there in the community.

Android version: 10
Kernel version: 4.14.117
 
Last edited:

Edmontonchef

Senior Member
Nov 30, 2016
726
286
73
39
edmonton
Sorry if this a dumb question but couldn't we use the same boot image used in derpfest and superior os to sideload the rom?
just asking because that's how I flashed a lineage test build.
 

liamwhite

Member
Dec 5, 2020
17
6
3
Sorry if this a dumb question but couldn't we use the same boot image used in derpfest and superior os to sideload the rom?
just asking because that's how I flashed a lineage test build.
thank you sir my devices 4a .. build number RP1A200720.010 this rom dont work....
Like the TWRP build for this device, this ROM build is only compatible with older firmware. I only tested QD4A.200805.003, but .001 would likely work as well. If you have a newer version, you will need to downgrade at least the bootloader and radio first. I recommend installing the QD4A.200805.003 firmware image from Google, as that's what I tested with.

The Derpfest build uses the newer firmware and I don't think it would be compatible. You could certainly try, though.
 

TheSayaMan

Senior Member
Sep 12, 2016
111
33
28
Like the TWRP build for this device, this ROM build is only compatible with older firmware. I only tested QD4A.200805.003, but .001 would likely work as well. If you have a newer version, you will need to downgrade at least the bootloader and radio first. I recommend installing the QD4A.200805.003 firmware image from Google, as that's what I tested with.

The Derpfest build uses the newer firmware and I don't think it would be compatible. You could certainly try, though.
I'm no expert but my guess is that it won't work because the sideloaded versions, Dirty Unicorns, Derpfest, and Superior have the boot.img inside a payload.bin file so that recovery wouldn't recognize this. But then again, what do I know?
 
Last edited:

TheSayaMan

Senior Member
Sep 12, 2016
111
33
28
I can't install this. I keep getting a error that the device is corrupt and can't be trusted and may not work properly. Does not boot. Followed instruction to a T. Flashed to another rom. Also confirmed that flashing through du or twrp recovery does not work as I stated previously.
 
Last edited:

liamwhite

Member
Dec 5, 2020
17
6
3
I can't install this. I keep getting a error that the device is corrupt and can't be trusted and may not work properly. Does not boot. Followed instruction to a T. Flashed to another rom. Also confirmed that flashing through du or twrp recovery does not work as I stated previously.
If this is what you're seeing, it typically means either the bootloader wasn't unlocked or verity was still enforcing. I am not sure how this could have broken considering I didn't take any special steps besides unlocking my bootloader before flashing the update image, and I even reflashed the phone to factory first before applying it and it still worked.

I added a MD5 of the zip image I flashed to the OP.
 
Last edited:

TheSayaMan

Senior Member
Sep 12, 2016
111
33
28
If this is what you're seeing, it typically means either the bootloader wasn't unlocked or verity was still enforcing. I am not sure how this could have broken considering I didn't take any special steps besides unlocking my bootloader before flashing the update image, and I even reflashed the phone to factory first before applying it and it still worked.

I added a MD5 of the zip image I flashed to the OP.
I'm sure it's not broken. Probably a issue with my phone. I'm getting a error in the bootloader about debug policy enabled, not in list. I know that's not normal because my wife has the same phone and hers doesn't say that. And I have no idea what or how to change verity. My bootloader is unlocked.
 

liamwhite

Member
Dec 5, 2020
17
6
3
Yea this was tested on the tmobile brand. I'm assuming this does not work on the google store unlocked version. I give up.
For what it's worth, I purchased my phone from the play store online. I didn't buy a T-Mobile branded version.

Board: sunfish MP1.0(NA)
Bootloader: s5-0.2-6539975
Baseband: g7150-00018-200701-B-6643937
Secure boot: PRODUCTION
NOS production: yes
 

liamwhite

Member
Dec 5, 2020
17
6
3
Hmm, it seems like my bootloader was more up-to-date than I realized. The one I am running is actually the one from the RP1A factory image, not sure how/when it updated, because I definitely downgraded it first to get TWRP booting.
 

TheSayaMan

Senior Member
Sep 12, 2016
111
33
28
Hmm, it seems like my bootloader was more up-to-date than I realized. The one I am running is actually the one from the RP1A factory image, not sure how/when it updated, because I definitely downgraded it first to get TWRP booting.
Your going completly around what I asked. I'm done with this. Moving to another thread.
 

liamwhite

Member
Dec 5, 2020
17
6
3
I rebuilt my entire source tree, reflashed the Pixel system images and reproduced the corrupt device warning. Picking through the changes, it didn't work because I had inadvertently flashed vbmeta.img on my build but not included it in the zip. I've posted an updated version of the zip and provided new instructions for how to flash this, because Lineage's fastboot does not allow flashing the vbmeta partition (you have to first flash it from the bootloader).

I tested again with a clean wipe, reset to Pixel factory image QD4A.200805.003 and this time it worked without a problem. The android-info.txt will now ensure that you are using the right bootloader when flashing, so that issue should go away too.
 

TheSayaMan

Senior Member
Sep 12, 2016
111
33
28
Cool I'll give it a try tomorrow


What does this mean

This doesn't work. That's what it means. If you want to waste about an hour of your life flashing this then having to flash back to stock or another custom rom than be my guest. This was posted by a new member, not a developer at all. I messed around with this quite awhile and no one is reporting success except the one that started this thread.
 

liamwhite

Member
Dec 5, 2020
17
6
3
This doesn't work. That's what it means. If you want to waste about an hour of your life flashing this then having to flash back to stock or another custom rom than be my guest. This was posted by a new member, not a developer at all. I messed around with this quite awhile and no one is reporting success except the one that started this thread.
The fact that I messed up and didn't realize I had to include the vbmeta.img file in the first zip is my fault, and I totally own that. It isn't able to be flashed in Lineage's fastbootd ("file not found", presumably it's missing a devfs node) so I accidentally excluded it from the image I shipped, not realizing it was mandatory.

Yes, I'm new to this forum, but I'm not new to building Lineage and I've done it many times before. I have serial UARTs for my phones. I'm posting this build here because I'm excited to be the first to get stable lineage running on the 4a, with the full list of vendor blobs and such (see my posted device tree), and this is the first time I've ported Lineage to a new board. It took me a week of tiring work bootstrapping the board, getting the first serial output, getting into recovery, and then finally figuring out that the kernel modules were missing before getting a full boot.

I was annoyed that the flashable zip generated by mka bacon doesn't include the required modules, and in my testing applying it never worked (they were always excluded from the vendor parition, even after multiple makefile changes), which is why I decided to make an ad-hoc flash method using a fastboot update zip, which reliably worked. That was the primary source of the error here. I won't make that mistake again.

I know you're frustrated that the first image I provided didn't work, but I have looked into it, reproduced your issue, and fixed it (and it ironically was only missing one 4K file needed to make it work).