Get proprietary vendor files for FP4

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.

  1. Is this assumption correct, do you need root to extract all of the blobs?
  2. Can I get the files from somewhere else? Like this page for example
  3. Is it possible to extract them from a stock image or did Fairphone not yet make downloading whole images possible?
  4. Could they be extracted from another build, of iodé for example?
3 Likes
  1. 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)
  2. Those files haven’t been released so far
  3. Complete stock images haven’t been released either
  4. 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

Good luck with your hacking, keep us posted :smiley:

3 Likes

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.

3 Likes

45 posts were split to a new topic: Building LineageOS for FP4

Answer moved to the new topic :wink:

2 Likes

This thread has been split into another about building LineageOS in general:

For the sake of completeness, here is the solution again:


It worked :tada: 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:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="device" fetch="https://github.com" revision="lineage-18.1" />
  <remote name="kernel" fetch="https://github.com" revision="lineage-18.1" />
  <project path="device/fairphone/FP4" name="WeAreFairphone/android_device_fairphone_FP4" remote="device" />
  <project path="kernel/fairphone/sm7225" remote="kernel" name="WeAreFairphone/android_kernel_fairphone_sm7225" />
</manifest> 

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.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.