[Unofficial] Help building LineageOS for Fairphone 5

Well, thank you and @ochorocho for your previous input - I wouldn’t be able if it weren’t for the work you already put into it. And as updated in my previous post, the build succeeded :call_me_hand:t2: :call_me_hand:t2: :call_me_hand:t2: (although I have just built it with Step9-Option1, without the pull-request, that still is not merged - @yvmuell can you please have a chat with the Fairphone guys/devs that they can at least comment on that pull request? Or do you have contacts to trigger anything - if that’s possible? Thank you!)

Regarding the …

  • git-lfs issue: yeah, I’ve updated my post - I think I didn’t begin with the apt install ... part - that’s probably on me :grin:
  • python issue: probably the same. when I apt list I see that python-is-python3 is installed. So I’d also put that in the same category as with git-lfs for now.

Yes, I have an FP5 to test with in the next few days. I just ordered a second one, because otherwise I see myself switching back and forth between /e/OS and custom image installations - and having spare parts for the next n years isn’t that bad either. But I am fairly new to the android ecosystem. So debugging errors, like @ochorocho has, will take some time for me - just to put a little expectation management in place :sweat_smile:

1 Like

Just a basic technical question… would GitHub - LineageOS/android_frameworks_base be the base from which the e.foundation would have forked downstream? Because there’s the e / os / android_frameworks_base · GitLab repository on /e/'s side where they actively pull changes from the base origin/lineage-20.0 branch.

(There are too many git repositories to digest for me for now… And it’s a pitty that we have to reverse engineer the changes from /e/, because they are not upstreaming their changes to LOS - or is it LOS that’s not accepting these changes? Much more people would benefit from their work, if they would have split the code into device-specifics → LOS-github, /e/ specifics → e-gitlab. And as long as this code structure is present as it is I see multiple efforts done by /e/-devs and the community in parallel to support the FP5 - and the community will always lag behind.) ← sorry for that rant :grin:

Just to mention, first IodeOS beta is out

I’m not an employee, so have no special contacts however @lucaweiss as you commented here already, anything you could do?

Thank you @yvmuell for your feedback. I was just assuming you are having any kind of contact, because you’re a moderator here. But yeah, since @lucaweiss is fp employee, maybe he can help here.

Is that a regular process for iode to provide beta builds on some github account releases page, where the last commit of that repository is 3 years ago and their official code hosting is iode · GitLab ? And also odd, that the official code at fairphone · GitLab has no FP5 device repository either. I am definitely not going to touch that image :grin:

Yes vincent is the main developer and as I’m not a developer

I dont know why this should be an issue.

I corrected the link didnt want to post the link the the zip and just to the overall page.

Iode OS isnt anything suspicious at all, and often more up to date than e/OS and they also sell pre-installed FPs.

I personally like it more, as it actually looks like LOS plus microG and additional blocker App/tools.

Well, as of now - and please, all of you, correct me if I am wrong - the FP5 build from iode isn’t Open Source. And since their FP5 specific stuff isn’t publicly available in any of their code repositories, their build does not add any value in our current effort to bring LineageOS to FP5. (I guess the folks over there still struggle with some habits from their proprietary era - but I guess this will change for the better in the future?)

And having read into https://xdaforums.com/t/iode-os-vs-lineageos-vs-e-os.4569695/ and the analysis documents from the divest-guys (that are linked in that xda forum thread) my mind gets hardened for what I really want: A LineageOS (or at best pure AOSP) based image with some added stuff, like /e/'s or iode’s privacy apps and the security mitigations from divestOS. But lets focus on the first step: a functional LineageOS image for FP5 :slight_smile:

Here are some logs/infos i was able to extract from the device while my own build if LineageOS installed
(downloaded from recovery mode)

recovery.gpx (35.3 KB)
dmesg.gpx (188.9 KB)
(could not upload txt or log files, so please rename it after download to *.txt)

But still no clue what is going wrong :grimacing:

Thank you for the files, @ochorocho !

According to dmesg it seems to me that the Qualcomm Firmware (Yupik) cannot be loaded, because the firmware file cannot be found:

[  237.028080] ueventd: firmware: loading 'yupik_ipa_fws.mdt' for '/devices/platform/soc/soc:qcom,ipa_fws/firmware/yupik_ipa_fws.mdt'
[  237.028504] ueventd: firmware: could not find firmware for yupik_ipa_fws.mdt
[  237.028523] ueventd: firmware: attempted /etc/firmware/yupik_ipa_fws.mdt, open failed: No such file or directory
[  237.028535] ueventd: firmware: attempted /odm/firmware/yupik_ipa_fws.mdt, open failed: No such file or directory
[  237.028546] ueventd: firmware: attempted /vendor/firmware/yupik_ipa_fws.mdt, open failed: No such file or directory
[  237.028557] ueventd: firmware: attempted /firmware/image/yupik_ipa_fws.mdt, open failed: No such file or directory

In my build directory in (croot) ./out/target/product/FP5/vendor/firmware/yupik_ipa_fws.mdt file exists, but I have no clue (for now) how this file becomes part of the image itself. If I were you I would check (adb shell ls -lha ...) all mentioned locations on the mobile to verify that it’s actually not there. Because if it isn’t there I’d assume that there is some problem while packaging the image/bin/zip, since the file is present in the out directory (well, in mine).

Or, since that firmware is part of the “vendor” partition, I’d check if that partition is mounted (adb shell mount).

But - since I am new to android - this is just poking around in a huge pile I also don’t fully understand :smiley:

Darn, I want my second phone so I also can deep-dive into this…

1 Like

Actually, @lucaweiss - since you’ve been involved in this on the linux kernel side (see [PATCH 00/11] Initial support for the Fairphone 5 smartphone ) can you probably give us a little hint?

I see multiple efforts done by /e/-devs and the community in parallel to support the FP5 - and the community will always lag behind

Sadly that is also the impression i have atm. Given that developers/maintainers are a scarce resource, a little bit of documentation would go a long way so not everybody has to go through the same steps again.

I just compared the android_device_fairphone_FP5 repositories from
/e/OS and WeAreFairphone using meld (directory compare tool) , hoping to find out what /e/OS modified.
The are similarities in the directory structure but a lot was changed in sub-dirs and files. I haven’t tried building an image using the /e/OS repository, but that would maybe be a next step.

@ochorocho How did you flash your image exactly?

The LineageOS FP4 guide uses a recovery.img and than sideloads a .zip.

I just looked at the way /e/OS does it for the FP5, they use a script and flash a whole lot of partitions
from *.img files in their .zip.
The official installing Fairphone OS manually guide also writes to a lot of partitions for the initial setup, not just one .zip file.

You mentioned that your device booted to the LineageOS animation after flashing /e/OS, my guess would be we are missing something with our build. I do not see many of the .img, .bin or .mbn files in my build/output directory that are written to the FP5 by the other setups.

Also there are no build instructions for the FP5 (only for the FP4) from Fairphone directly, i hope they will be released soon so we can build their image as a first step to see how it is done in general and then adapt to LineageOS.

First, i flashed e/OS to test it. After that i noticed, i was able to ignore “Signature verification”.

So i flashed the image using this command while running sideload in recovery mode:

adb sideload /Users/jochen/Desktop/LineageOS/12-12/lineage-20.0-20231212-UNOFFICIAL-FP5.zip

Regarding the partitions, that confused me as well. In LineageOS i used to flash a single zip file on my old OnePlus One. Maybe that depends on the device. Would be great to have a single zip file to flash the OS. But dunno if it is possible at all.

@_elpato_9 I can’t really contribute more than [Unofficial] Help building LineageOS for Fairphone 5 - #2 by lucaweiss right now, I haven’t taken a look at the build myself. If it’s not booting, then one of the log lines in adb logcat should probably tell you why.

… still trying to figure out what /e/OS is doing to get a working image, her is what i found out so far:

Apparently this is the /e/OS FP5 manifest and here are the repos used in the manifest.
Missing from the manifest are the vendor blobs, according to the /e/OS forum they are only available for their build team and when building an unofficial image they have to be extracted through one of the known ways (extract-files.sh etc.).

Comparing the manifest to the one we used in this thread:

  • The ‘android_device_fairphone_FP5’ repo is different, see this post from above

  • The ‘android_kernel_fairphone_FP5’ repo is also from /e/ and from what i saw it is based on the same repo as the one we used but they are missing ~30commits. The /e/ kernel FP5 repo has the last commit from 2023-08-25 and the commit hash matches the same commit in the repo we used.

  • The ‘android_device_fairphone_FP5-kernel’ repo is new and according to the README it contains pre-built kernel files. I do not know why they do this (speed up the build process?) but i think this is not neccessary for a working build.

They also use their own repo for the default.xml adding their /e/OS apps etc. (see this for /e/ and this for LineageOS).

I just made the connection. When installing the build for the first time you need to flash every single partition manually using fastboot. This process is tedious because there are about 40 partitions or images to be flashed, so e/os/ uses a script to create a zip file from the product/FP5/out directory. The unofficial build zip file you get is for flashing through recovery when you are up and running with lineageos’ recovery.

So the build works fine, it’s just the last packaging step that is wrong.

I will post a more detailed description on it later on.

7 Likes

Fantastic… I’m considering buying a fairphone 5… but I want to run LineageOS with microg on it… Any ideas when an install guide may be added to devices list for LineageOS? :slight_smile: :crossed_fingers:

This is great news! Let me know once you have the script.
Happy to test.

Me and several of my colleagues are waiting for official lineageos (or other AOSP android with microg instead of google?) support for FP5 - before we buy it… so really hoping here :slight_smile:

IodeOS and e/OS are already available…CalyxOS has at least beta builds

iodeos includes non-removable software additions, such as their adblocking
e/os comes with their own online services, so instead of google spying, e/os is spying
rooting calyxos seems much more troublesome than lineage, thus removing some user control for sake of security

i am still on debate about whether to get this phone when lineageos comes out due to their incredibly terrible customer service, but any alternative isn’t worth the tradeoffs they give. i most certainly would not pay for this phone and run one of the alternatives suggested above.

lineageos is like a blank slate you can work with without the hassle of bloatware or forced privacy/security restrictions.

1 Like