Porting LineageOS to FP2

I was basing that stuff off the CyanogenMod 12.1 port (which was never working) but I had to fix a lot of issues in very different parts of the boot process.

Are you willing to share your fixes? I was about to look into fp2 cm-12.1 issues, but it might be a better investment to look into 14.1, it looks promising already! Kudos!

Investing into 12.1 is not worth it tbh. Lineage 13 could be interesting but I thought why not just jump to the latest and fix stuff there. Yes, it would have been easier with the steps in-between but I think itā€™s too late and too much work right now.

I think itā€™s the right way to let the Fairphone Team work on Marshmellow and concentrate on Nougat.

Agreed, do you have your fixes somewhere accessible? I.e. github?

Regards!

Device tree: https://github.com/z3ntu/android_device_fairphone_fp2
Kernel source: https://github.com/z3ntu/android_kernel_fairphone_fp2 - see branches cm-14.1 and cm-14.1-merge right now.

4 Likes

Hey, @z3ntu, given that @Arvil nor me are currently working on the port, youā€™re free to use and manage the WeAreFairphone organization repos if you wish:

(I finally managed GitHub Support to point the repos to the original ones, not mines, as you could see)

Congrats on your booting milestone, again. Iā€™ll try to setup a server and try a few compilations, but Iā€™m afraid I wonā€™t have the time to work on this, only occasionally.

PS: Does anyone know if this Docker image works? It seems it had a reputation on XDA while it was docker-cyanogenmod.

4 Likes

Awesome work, thank you.

I actually want to keep the repos seperate for now.
About the docker image: I am actually using my own custom image for building found here.

Thanks :slight_smile:

1 Like

Would be great if we could join forces at WeAreFairphone (Github).

1 Like

Later hopefully :wink:

and some additional characters for 20 chars minimum

1 Like

After some initial trouble, my setup is finally up and running and I was able to test my first build.

Unsurprisingly I didnā€™t get everything right the first timeā€¦

01-01 04:58:01.628   870   870 E libEGL  : load_driver(/vendor/lib/egl/libEGL_adreno.so): 
dlopen failed: cannot locate symbol "RSA_verify_PKCS1_PSS" referenced by 
"/system/vendor/lib/egl/libEGL_adreno.so"...
01-01 04:58:01.628   870   870 F libEGL  : couldn't find an OpenGL ES implementation

My best guess is that Iā€™m using the wrong library here. @z3ntu, which rom did you use to pull the blobs off the device? Was it the latest Fairphone Open (17.03.0), or some other version?

Yep thatā€™s because you donā€™t have the beautiful proprietary blobs :wink:

Put that stuff into your local manifest (you probably only have the first two repos in there) - and donā€™t ask why I declare a new remote for GitHub, I have my reasons:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="https://github.com/" name="github2" />
  <project name="z3ntu/android_device_fairphone_fp2" path="device/fairphone/fp2" remote="github2" revision="cm-14.1" />
  <project name="z3ntu/android_kernel_fairphone_fp2" path="kernel/fairphone/fp2" remote="github2" revision="cm-14.1" />
  <project name="FairBlobs/proprietary_vendor_fairphone" path="vendor/fairphone" remote="github2" revision="cm-14.1" />
</manifest>

I see. Was hoping the extract-files.sh would pull everything I need.
Will give it a try tomorrow, thanks!

Take the repo as already there are files from other phones that are tedious to get manually :slight_smile:

Btw the blobs are from a 6.0 preview build (17.04.1 to be precise) so I have no idea if 5.1 blobs work.

Good news! The correct blobs did the trick. My build (Android 7.1.2) boots fine now. Debugging from here is a bit tricky though, since the USB port doesnā€™t work at all. This means no ADB or easy file transfer. Iā€™ll try to sort that out first.

On a side note, thereā€™s also bad news. A portion of my touch screen broke somewhere along the way (not related to the rom but more likely a hardware issue from what I read here on the forums). Which means that my phone might become unusable for a while soonā€¦

3 Likes

Iā€™ll probably get my display replaced because of the ā€œbright spotā€ issue but Iā€™ll travel to England on Sunday and I need my phone thereā€¦

Debugging from here is a bit tricky though, since the USB port doesnā€™t work at all. This means no ADB or easy file transfer. Iā€™ll try to sort that out first.

compiling with brunch lineage_fp2-eng instead of brunch fp2 does the trick with ADB. Unfortunately I have no time to do debugging and developing, but I hope this helps someone :slight_smile:

2 Likes

Hey,

it might help you guys, what I have recently done for FP2 and lineage.

It is pretty much a WIP (work-in-progress) and nowhere near a proper lineage device bringup.

But what works so-far to some extend:

  • Wifi, Bluetooth, 4G modem, audio, GPS, sensors, led notifications

What does not work at all:

  • Camera, Netflix (widevine?)

Not tested:

  • FM radio

Known issue:

  • Audio volume e.g. hangout calls too low.

Sources:



19 Likes

Actually: camera works now :slight_smile:

9 Likes

Netflix works when downgrading to older version.

2 Likes