[ROM][UNOFFICIAL] LineageOS 16.0 for FP3

Originally it was started with the base configuration of Motorola’s SDM632 platform and the river configuration was used as an example. Since the /e/ foundation published the sources for FP3 support this was used as base. Advantages are:

  • We can easily sync between the repos.
  • Nearly everything is working with it incl. AVB, SELinux etc.

With that the current state is ready for testing and maybe even for daily usage :wink:

Known Issues
These things are untested or known not to work:

  • OTA Updates
  • Playing videos in fullscreen causing some overlay issue in Chrome

How to install
The LineageOS packages can be flashed with TWRP from k4y0z. TWRP flashes it to the currently inactive slots and activates it afterwards.

  1. Boot device into bootloader.
  2. Boot TWRP from bootloader: fastboot boot twrp-3.3.1-0_k4y0z-20200202-02-fp3.img (or other twrp image)
  3. Install package from TWRP in the preferred way
    a) Sideload the package:
    Go to Advanced -> ADB Sideload -> Swipe
    Run: adb sideload lineage-16.0-20200509-UNOFFICIAL-FP3.zip (adapt file name of course)
    This should flash it to the inactive slot and activate it on success.
    b) Alternatively you can push the package to sd-card and install it from TWRP:
    adb push lineage-16.0-20200509-UNOFFICIAL-FP3.zip /sdcard
  4. Optional when coming from stock firmware: Format data from TWRP.
    If this is not done LineageOS will reboot and ask you for it.
  5. Reboot and LineageOS should boot up.

Find the releases on the corresponding github page.
Builds with microG include patches and pre-installed F-Droid, GmsCore etc.

To activate GCM use this fix from @pigpig:

Install OpenGApps
Not tried yet. Maybe someone can do that and describe required steps here.
Most likely this will break AVB and may require additional steps.
It seems to be possible at least with Magisk. This has been tried by another person with success:

  • boot twrp from fastboot
  • I formatted /data here, don’t know whether this was necessary here, but anyway
  • install LOS
  • boot twrp via fastboot (this switches slots)
  • install Magisk
  • boot twrp via fastboot
  • install OpenGapps (arm64)

Reboot to system. You should be all set

Device tree: https://github.com/WeAreFairphone/android_device_fairphone_FP3
Kernel sources: https://github.com/WeAreFairphone/android_kernel_fairphone_sdm632/tree/lineage-16.0

We tried to describe required steps and information for building in the readme file.

Why completely porting LOS for FP3, there is the GSI version which works fine?
Well, that’s true. But GSI for LOS16 is not maintained anymore, what means there will be no updates. Also it depends very much on the base system (boot and vendor partition) of the stock firmware. With an own configuration for building LOS for FP3, updates could be built and provided much more easy. Also more code and configuration would be under community control. It could even be the base for LOS17 or later and other custom roms.

How to communicate for development?
One proposal would be to use an IRC channel #fairphone3 on freenode (which is also used by the LOS team). But I’m also open to other suggestions.


2020-03-24T23:00:00Z Got Wi-Fi running.
2020-03-29T22:00:00Z Add files for testing.
2020-03-30T22:00:00Z NFC is working

  • Storage encryption and fingerprint sensor is working (Thanks to @dk1978)
  • Tested LTE and noticed it works just fine :+1::smile:
  • Added new archive with images
  • Successfully tested GPS

2020-04-18T22:00:00Z Moved repositories to FairphoneCommunity.
2020-04-20T22:00:00Z Fixed ear speaker.
2020-04-22T22:00:00Z Moved repositories to WeAreFairphone.
2020-05-04T22:00:00Z Added description regarding /e/ config and added some intermediate builds.
2020-05-09T22:00:00Z Major rework of the post. Ready for testing now.
2020-06-16T22:00:00Z Added an intermediate build
2020-06-25T22:00:00Z Added new build
2020-08-17T22:00:00Z Added new build


great, there is some… development!!! thanks!
btw, /e/ already has a booting system since 2 Days. you might want to cooperate with them since /e/ is based on LOS?
edit: I copied the link but I didn’t paste it here… there you are: https://community.e.foundation/t/fairphone-3-fp3-support-on-e/6438/83

1 Like

Great work! All the best to you

1 Like

Yes, I also wondered if they are doing the same or they use a GSI. I asked them in the thread.

They are doing the same (from a mail I received : “we already have all the needed blobs”).

but as far as I know /e/ is based on LOS15. just telling.

They recently released a Android 9 (Pie) build for the FP2, which would be LOS 16 IIRC.

Edit: ah, yes, this post contains a screenshot showing Android 9.


Will the the FM-radio and LED notifications works?

1 Like

I am using LOS16 (GSI) and can tell you that the notification LEDs are working.

1 Like

Thank you very much for the nice preparation.
I was able to follow the steps (in README.md) and compile easily.
However, I’m stuck at flashing as these both files are missing: product.img & dtbo.img.
I also can’t find them somewhere else.
Should they have been generated by the build process?
I see some magic for this in your device tree but I do not really understand it. Can I maybe rebuild just product and dtbo?
Best Regards, Michael

Hi @michlx,
Nice to hear that you were able to build so far. Usually all the image files should be generated with brunch fp3 eng. You can also build the images separately with:

m systemimage
m vendorimage
m productimage
m dtboimage

Prior you need to call lunch lineage_fp3-eng to select the right configuration. The brunch command usually does this for you already.
Also it makes sense to add -j parameter to run jobs in parallel and speed it up little bit. E.g. m -j4 systemimage. Number depends on your CPU of course. brunch also uses a default value here.

However I currently don’t have access to my machine and can’t verify all this.

Hi @Max_S, thanks a lot. That helps a lot to investigate.
I’ve tried to rebuild all the images with the above commands.
The first two succeed; The product also succeeds but doesn’t seem to build anything.
The dtbo fails with an error message:
ninja: error: '/......../out/target/product/fp3/dtbo.img', needed by 'dtboimage', missing and no known rule to make it
I tried to upload a snippet of the build log but it seem as one cant upload text files.
Now here : https://pastebin.com/6DdBsP6d

Maybe a related question:
in your git repo https://github.com/mstaz/android_device_fairphone_fp3
there is a lineage-16.0 branch.
But the tweaked local manifest mentions revision="refs/heads/master" for that repo.
Is that intentional?

Update: I’ve changed the line to revision="refs/heads/lineage-16.0" .
Now dtbo.img and procuct.img are getting build.
I flashed everything and I see a lineageos bootscreen - Wow !
Unfortunaltely, it restarts after some seconds and there is no related ouptut on my UART.

Oh, yes you’re right. That has changed of course. I’ll update that in the readme. I think you can leave the revision completely as this is the default branch now.

UART may not be enabled. But you may have adb available at that point. Can you run adb logcat with the phone connected before starting the system?

does the Fairphone company financially support those efforts?

It’s very essential for users to have an alternative to the Google surveillance capitsalism.

1 Like

Hi @Max_S, at least I begin to understand this build system half way :slight_smile: .
For some reason adb logcat did not work yesterday. Not it works.
I saw complaints about Dalvik in the log so I Wiped Cache and Data partitions. That helped to proceed further but my device still restarts after booting for about 45s.
There are so many issues that is hard to make out a root-cause.
I’m now trying to enable the UART console I hope I see something meaningful there.

Hi @ooXoL4tu, as far as I know there is no financial support. Fairphone announced that they want to release more of the software, like they did for the Fp2 as Fairphone Open.
Up to now that has just happened for an (incomplete) Linux kernel. That means, people just can try to reverse engineer to proceed.

Yes, wiping data or factory reset respectively is required. Does it boot completely or you only see the LOS boot screen?
If you want you can send me the logcat output and I’ll have a look.

No, it does not boot completely. I just see the bubbles moving, then there is a break for one or two seconds and then it reboots.
(The last messages are always different)
Here is a logcat ouput. Pastebin was to small so here it’s in gist:

Did you flash with TWRP? There seem to be some twrp related stuff. Also update_engine seems to crash.
For me at the moment only flashing via fastboot works.