I’ve finally had some free time and tried to compile LineageOS for the Fairphone 4. While extracting the proprietary vendor blobs from the phone using the extract-files.sh script, I realized, that a lot of them could not be pulled from the phone, for example:
- vendor/lib64/libthermalclient.so !! vendor/lib64/libthermalclient.so: file not found in source
Which later prevents you from compiling:
error: vendor/fairphone/FP4/Android.bp:28:1: module "libthermalclient" variant "android_vendor.30_arm64_armv8-a_cortex-a76_shared": module source path "vendor/fairphone/FP4/proprietary/vendor/lib64/libthermalclient.so" does not exist
I assume some blobs cannot be extracted since adb cannot run as root on a stock rom:
adbd cannot run as root in production builds
This brought up some questions.
Is this assumption correct, do you need root to extract all of the blobs?
You don’t need to root your phone, just booting from a rooted boot.img should be enough to grant you the needed privileges (you’ll probably have to extract the files by hand, not with the script)
Those files haven’t been released so far
Complete stock images haven’t been released either
Probably, but extracting them from custom images isn’t really any less effort than booting a rooted boot.img, if you want to try it, imjtool should be helpful
Thank you! I found an iodé beta build and extracted the files from the payload.bin. It had all the necessary files except vendor/etc/acdbdata/adsp_avs_config.acdb which I could luckily pull from my phone. I merged the two extractions, overwriting with the files from the phone just in case, and now everything seems to be compiling just fine. Currently at 50%, I expect it to take another half hour until it’s done.
This thread has been split into another about building LineageOS in general:
For the sake of completeness, here is the solution again:
It worked To recap: I extracted the proprietary files from my phone. The missing files were added from the iodé build. The roomservice.xml file looks like this:
Other than a few warnings, the build finished successfully. Nevertheless, I’m still hesitant to actually install it on my phone since I haven’t seen a clear path to restoring the device to its initial conditions should something go wrong.
I assume Fairphone would have to release a complete stock image for that to be easily possible.