• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

TheSayaMan

Senior Member
Sep 12, 2016
242
117
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).

Understood and I'm sorry, I appreciate all the work that all the devs do. Taking time away from their families and other job functions to build a rom and I know it's not easy. Even more so with these later versions of Android firmware. I can try again later and report back. I do make donations. I have donated to the other roms and will do the same as long as it boots. I'm not picky, I understand, things happen and I was frustrated, my apologies.
 

ny-hardcore

Senior Member
Jan 21, 2006
431
505
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).
Strange. I built 18.0 last week or so , I produced a zip file that is flashable using adb side load. It includes a disabled vbmeta
 

liamwhite

Member
Dec 5, 2020
17
8
Strange. I built 18.0 last week or so , I produced a zip file that is flashable using adb side load. It includes a disabled vbmeta
vbmeta inclusion in the OTA zip is not the problem, that appears to be fully functional. What is a problem is vendor inclusion/extraction. The generated OTA zip consistently fails to put in place the proprietary kernel modules in /vendor/lib/modules which are explicitly specified in the proprietary files list I generated and required for boot. make vendorimage, on the other hand, generates a fully functional vendor partition image, so...
 

ny-hardcore

Senior Member
Jan 21, 2006
431
505
vbmeta inclusion in the OTA zip is not the problem, that appears to be fully functional. What is a problem is vendor inclusion/extraction. The generated OTA zip consistently fails to put in place the proprietary kernel modules in /vendor/lib/modules which are explicitly specified in the proprietary files list I generated and required for boot. make vendorimage, on the other hand, generates a fully functional vendor partition image, so...
Why build modules? Build a monolithic kernel instead? Or do you use prebuilt kernel?
 

Nut_House

Senior Member
Feb 21, 2013
53
13
When running the fastboot update command I get the following error and the installation fails. Any ideas?

checking product...
OKAY [ 0.000s]
checking version-bootloader...
OKAY [ 0.000s]
sending 'boot_a' (65536 KB)...
OKAY [ 1.647s]
writing 'boot_a'...
OKAY [ 0.266s]
sending sparse 'system_a' 1/2 (515788 KB)...
OKAY [ 12.789s]
writing 'system_a' 1/2...
OKAY [ 2.008s]
sending sparse 'system_a' 2/2 (504152 KB)...
OKAY [ 12.474s]
writing 'system_a' 2/2...
FAILED (remote: Operation not permitted)
finished. total time: 30.418s
 

liamwhite

Member
Dec 5, 2020
17
8
Is this rom compatible with twrp?
If you mean the ability to take backups, I wasn't able to get the prebuilt in the previous thread to decrypt my data partition, so it doesn't seem like it right now.
there are no gapps preinstalled in this rom
I didn't preinstall them or even test them at all, as I have no use or interest in them and they are not present as part of a stock lineage install anyway. You should be able to go install whatever gapps package you like from here after wiping data.
When running the fastboot update command I get the following error and the installation fails. Any ideas?

checking product...
OKAY [ 0.000s]
checking version-bootloader...
OKAY [ 0.000s]
sending 'boot_a' (65536 KB)...
OKAY [ 1.647s]
writing 'boot_a'...
OKAY [ 0.266s]
sending sparse 'system_a' 1/2 (515788 KB)...
OKAY [ 12.789s]
writing 'system_a' 1/2...
OKAY [ 2.008s]
sending sparse 'system_a' 2/2 (504152 KB)...
OKAY [ 12.474s]
writing 'system_a' 2/2...
FAILED (remote: Operation not permitted)
finished. total time: 30.418s
You have to be running fastbootd (userspace fastboot) on the device, not the bootloader, to flash dynamic partition images on the Pixel 4a. To do this run fastboot reboot fastboot from the bootloader. You will know the difference because it will say "fastbootd" in centered text at the top of the screen. Here is a picture of AOSP fastbootd I ripped off a random news site:
Google-Pixel-Android-10-fastbootd-Dedicated-Fastboot-Mode-800x450.jpg
Here's what the fastbootd from lineage looks like if you needed to install the boot.img first to get a working system (my picture of my Pixel 4a):
bYmDvIT.jpg
 
  • Like
Reactions: Nut_House

liamwhite

Member
Dec 5, 2020
17
8
Nice work on the trees man!
I just kanged Dirty Unicorns trees :)

Any plans on building lineage 18.0 / update trees to 11?
Yes, I was hoping to build 18.0 but I instantly ran into problems with the sm8150 display library on this line about QC_OPEN_PATH (and similar errors in v4l2 code), and didn't have time to update my codeaurora tree before I went back and cleaned my tree to fix the error on the previous page.
 

Nut_House

Senior Member
Feb 21, 2013
53
13
You have to be running fastbootd (userspace fastboot) on the device, not the bootloader, to flash dynamic partition images on the Pixel 4a. To do this run fastboot reboot fastboot from the bootloader. You will know the difference because it will say "fastbootd" in centered text at the top of the screen. Here is a picture of AOSP fastbootd I ripped off a random news site:

Thanks. Finally got things working, it turns out the version of fastboot on my Ubuntu system isn't new enough to correctly flash the update even after making sure all is up to date. Had to revert to my Windows laptop to get things working.

Just an FYI, I'm on T-Mobile using an eSIM and mobile network connectivity does not work. The eSIM isn't recognized. Don't know if that's a capability the Pixel 4 had, so don't know if you can easily port over or not. All else seems to be working well so far. Thanks for your work (y)
 

liamwhite

Member
Dec 5, 2020
17
8
Thanks. Finally got things working, it turns out the version of fastboot on my Ubuntu system isn't new enough to correctly flash the update even after making sure all is up to date. Had to revert to my Windows laptop to get things working.

Just an FYI, I'm on T-Mobile using an eSIM and mobile network connectivity does not work. The eSIM isn't recognized. Don't know if that's a capability the Pixel 4 had, so don't know if you can easily port over or not. All else seems to be working well so far. Thanks for your work (y)
Try installing the two apps in this zip along with gapps: https://mega.nz/file/fSRA2LZB#1bvAUuFpVv0TFDIq-4CYMKUFt_2-tynNxonv_TyNa8w (EuiccGoogle.apk, EuiccSupportPixel.apk, zip MD5 c0a92cf70f634a52ac4e49819e6ab629).

I removed them from the completed build because they would repeatedly crash on startup unless gsf was also installed. I have no idea if it will work, but worth a shot.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    yUIn6TF.png


    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
    4
    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).

    Understood and I'm sorry, I appreciate all the work that all the devs do. Taking time away from their families and other job functions to build a rom and I know it's not easy. Even more so with these later versions of Android firmware. I can try again later and report back. I do make donations. I have donated to the other roms and will do the same as long as it boots. I'm not picky, I understand, things happen and I was frustrated, my apologies.
    2
    Flashing now, heads up your guide is wrong, q in place of d

    3. Run fastboot update -w lineage_sunfish-qq3a.200805.001-v2.zip
    ->
    3. Run fastboot update -w lineage_sunfish-qd3a.200805.001-v2.zip

    e: Definitely running now. I feel you've had the worst start to a thread, I appreciate your work!
    1
    Why build modules? Build a monolithic kernel instead? Or do you use prebuilt kernel?
    Because I am replicating the config for lineage on flame/coral (Pixel 4/XL) which also builds modules. No, I'm not using the prebuilt kernel.
    1
    Is this rom compatible with twrp?
    If you mean the ability to take backups, I wasn't able to get the prebuilt in the previous thread to decrypt my data partition, so it doesn't seem like it right now.
    there are no gapps preinstalled in this rom
    I didn't preinstall them or even test them at all, as I have no use or interest in them and they are not present as part of a stock lineage install anyway. You should be able to go install whatever gapps package you like from here after wiping data.
    When running the fastboot update command I get the following error and the installation fails. Any ideas?

    checking product...
    OKAY [ 0.000s]
    checking version-bootloader...
    OKAY [ 0.000s]
    sending 'boot_a' (65536 KB)...
    OKAY [ 1.647s]
    writing 'boot_a'...
    OKAY [ 0.266s]
    sending sparse 'system_a' 1/2 (515788 KB)...
    OKAY [ 12.789s]
    writing 'system_a' 1/2...
    OKAY [ 2.008s]
    sending sparse 'system_a' 2/2 (504152 KB)...
    OKAY [ 12.474s]
    writing 'system_a' 2/2...
    FAILED (remote: Operation not permitted)
    finished. total time: 30.418s
    You have to be running fastbootd (userspace fastboot) on the device, not the bootloader, to flash dynamic partition images on the Pixel 4a. To do this run fastboot reboot fastboot from the bootloader. You will know the difference because it will say "fastbootd" in centered text at the top of the screen. Here is a picture of AOSP fastbootd I ripped off a random news site:
    Google-Pixel-Android-10-fastbootd-Dedicated-Fastboot-Mode-800x450.jpg
    Here's what the fastbootd from lineage looks like if you needed to install the boot.img first to get a working system (my picture of my Pixel 4a):
    bYmDvIT.jpg