English

Fairphone 2 and CyanogenMod / LineageOS

Tags: #<Tag:0x00007f05d9e80798>

The blobs need to be copied before starting a build of the full system.

1 Like

I know that. But the normal users will not be able offer to so much cpu power and space to compile/download ~60-70G of code just to build a ROM for their phones. And the final build cannot be shared otherwise, or? Or do you want FP to offer the download for the CM rom?

First of all, there needs to be someone who’s able to produce a bootable image. If this is achieved, there will still be a lot of work to make this image usable. As I said before, I’m not a CM-dev, but I guess, depending on how many people are working together, this can take up to a few months. Until this point it doesn’t make sense for a “normal user” to install these images anyway.

If the port gets into a usable state it is possible to submit it as an official CM port. Once it gets accepted, the images will get hosted by CM and get published on the download page.

I don’t know if they are acting in a legal gray area, but apparently they are hosting the images…

But unfortunately the hard work needs to be done first, before discussing the possibility where to download the result.

Edit:
Out of curiosity I wanted to check whether the images from the CM download page contain blobs or not. They do! You can download a python script from github to access the file system of the images. The latest M8 image for example contains the files listed in common-proprietary-files.txt, linked in my previous post.

7 Likes

Did you try to build an image of Cyanogenmod for the Fairphone 2?
Or someone else?

1 Like

Just trying to revive the thread, Juan Gomez (atilag) from Mozilla did a blobfree Firefox OS (B2G) compilation for the FP2 which extracts blobs from the device before packing the fastboot images.

Due to the similarities between the build processes of CyanogenMod and B2G, because they share the same low level base of Android, I think a port of CM to the FP2 is viable, with the B2G port as an example.

The FP2 configs for B2G are here: https://github.com/mozilla-b2g/device-fairphone2
The list of blob-files needed are here (from FP2-1.2.8-gms, if I recall right): https://github.com/mozilla-b2g/device-fairphone2/blob/master/proprietary-files.txt

Now we have some right things to continue the @keesj’s initial work on the CM12 port. My machine is pretty slow, but, damned, I prefer having it burned down than not trying anything! :fire: :metal:

Edit: CM Recovery successfully compiled, :slight_smile:
Edit2: flashed. It works, yay!
Edit3: I’ve done a new extract-files.sh that seems to extract blobs, at least. I’m kind of improvising… never cooked roms before. See it here.
Edit4: I tried a full CM12 build today. Failed, of course, a lot of things have to be adjusted. I talked with Juan (I know him from some Mozilla meetups, and he has experience with CM ports) for generating an up-to-date blob-list. This is going to be funny, but slow. Should someone wants to help, message me, :wink:

23 Likes

This last post should be in:
/Software/Developing/B2G beta (formerly Firefox OS)
Could any mod shift it?

My post? I don’t think it should. I could have explained myself bad, but I’m trying to build CyanogenMod, not B2G. The FxOS/B2G mention is because it is based on (the low level layer of) Android and both build processes have similarities (one being the blob dependencies to fully work).

I hope more peple who are able to work on a CM port will help you and push it further. I don’t want to lose CM when switching to a FP2, so I rely on guys like you and I want to thank you for your initial work here.

2 Likes

OK, my fault! The missing words were: “with this knowledge we can try to built CM”

3 Likes

You are right! I missed that words, :slight_smile:

Edit: I edited that post. Hope it’s more clear now.

I’m stuck with this error:

JarJar: /home/debian/Workspace/fairphone/cm12_fp2/out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes-jarjar.jar
host SharedLib: libjavacrypto_32 (/home/debian/Workspace/fairphone/cm12_fp2/out/host/linux-x86/obj32/lib/libjavacrypto.so)
target SharedLib: libandroid_runtime (/home/debian/Workspace/fairphone/cm12_fp2/out/target/product/FP2/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so)
target Symbolic: bluetooth.default (/home/debian/Workspace/fairphone/cm12_fp2/out/target/product/FP2/symbols/system/lib/hw/bluetooth.default.so)
frameworks/base/core/jni/android_view_Surface.cpp:404: error: undefined reference to 'android::uirenderer::AnimationContext::AnimationContext(android::uirenderer::renderthread::TimeLord&)'
frameworks/base/core/jni/android_view_Surface.cpp:431: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::syncAndDrawFrame(long long, long long, float)'
frameworks/base/core/jni/android_view_Surface.cpp:425: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::updateSurface(android::sp<ANativeWindow> const&)'
frameworks/base/core/jni/android_view_Surface.cpp:412: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::RenderProxy(bool, android::uirenderer::RenderNode*, android::uirenderer::IContextFactory*)'
frameworks/base/core/jni/android_view_Surface.cpp:413: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::loadSystemProperties()'
frameworks/base/core/jni/android_view_Surface.cpp:414: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::setSwapBehavior(android::uirenderer::renderthread::SwapBehavior)'
frameworks/base/core/jni/android_view_Surface.cpp:415: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::initialize(android::sp<ANativeWindow> const&)'
frameworks/base/core/jni/android_view_Surface.cpp:418: error: undefined reference to 'android::uirenderer::renderthread::RenderProxy::setup(int, int, android::uirenderer::Vector3 const&, float, unsigned char, unsigned char)'
frameworks/base/core/jni/android/graphics/Paint.cpp:809: error: undefined reference to 'android::uirenderer::Blur::convertRadiusToSigma(float)'
collect2: error: ld returned 1 exit status
build/core/shared_library_internal.mk:68: recipe for target '/home/debian/Workspace/fairphone/cm12_fp2/out/target/product/FP2/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so' failed
make: *** [/home/debian/Workspace/fairphone/cm12_fp2/out/target/product/FP2/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/home/debian/Workspace/fairphone/cm12_fp2'

#### make failed to build some targets (09:40 (mm:ss)) ####

I honestly don’t know where’s the error. Any ideas to try?

1 Like

wow! that is the best news i heard since FP2 came out! soooo nice to see, finally it is ging on! keep it up!

2 Likes

Were you able to progress after that error? I’m no Android or Java coder at all :-/.

Linkage errors are really hard to debug…
Best scenario, you just missed a compilation flag on the command line, or you don’t use the correct compiler.
If not, then… go on the code and try to understand why it is not working… But with this kind of code, it’s seems pretty hard.

BTW I am really interested to help building a CM image, but I don’t really have lots of time and I never cooked roms. I will try to dive into this topic and free 50Go on my Debian :slight_smile:

4 Likes

Not yet, I’ve been a little busy this week.

[quote=“NicoM, post:70, topic:10399”]
Linkage errors are really hard to debug…Best scenario, you just missed a compilation flag on the command line, or you don’t use the correct compiler.If not, then… go on the code and try to understand why it is not working… But with this kind of code, it’s seems pretty hard.[/quote]

I’m using CM’s mka for avoid that kind of things.

I’ve not much experience with big builds nor C/C++ matters. I’m on Debian Testing, but seems like I’ll need to move to Ubuntu for this… which means I’ll have to set up a VM and compile time will increase, :confused:

Me neither! Hahaha. Come and help, I’ll appreciate it, :blush:

3 Likes

Maybe someone can wiki-fy the first article and add an up to date howto (what to checkout, how much space will be needed … ) and current problems, so that more people will try it? Most stuff can be copied from the old howto, I assume.

4 Likes

Good idea as a restart :).

Issue solved! :wink:
Just enabling OpenGL solved it

3 Likes

Prety cool, so you’ve got a working CM build now?

Well, this is a rather slow process. CM successfully building is not equal to CM successfully booting (yet), :sweat_smile:. But, obviously, it is the first step, :wink:

3 Likes