Quick update: Building the recovery works, but I see some error messages. In the end itās around 18 M.
./extract-files.sh is also able to work with rom images to make things easier. Try using fp2-sibon-16.07.1-ota-userdebug.zip as an example. Just unzip it somewhere and use something ugly like:
The current problem I have is that the device doesnāt boot but doesnāt show any error, even with adb logcatā¦ So I have no idea what the problem isā¦
I recently purchased a FP2 and Iām quite satisfied with it. However, I would like to see a running port of CM as I used it in the past with other devices and liked it very much. Currently Iām running Fairphone Open OS 16.07.1 but not 100% happy with stock Android OS, so I think having the ability to install alternative, stable OSs would make FP2 a better, longer-lasting device and more open to community contributions (which personally I think itās very relevant step to make this a fairer, sustainable phone).
At the moment Iām downloading the repositories (it will still take a few hours) and following steps from the wiki. Iām running Linux Rebecca 17 on my computer. Iām also reading some documentation on building/porting CM to get familiar with the processes involved in the meanwhile. For a start I would like to perform all steps to get to the current state (boot.img not working), from that point I could do some additional testing/debugging maybeā¦
Iām familiar with computers and development but never ported CM for any device. Still I would like to give it a try. Iām aware this is now in a very early stage and far from having a stable working OS, but Iām optimistic we could see a running CM over Fairphone in the near future if the project gets enough momentum and more people gets involved with it.
Yeah, welcome to the (small) club of people trying to get a working CM
If you have any questions, donāt hesitate! I think @Roboe start to have a good expertise in Android in general and Cyanogen in particular.
It is the first time I cook rom too, it take a bit of time to start understanding how it works, but at the end it is pretty clear
Currently, @NicoM and I followed almost all the steps of the Porting CM article on CyanogenMod wiki. We are currently using a precompiled kernel, and the device configuration needs to be merged somehow with a Qualcomm general msm8974 config. The wiki post Nico did is a great knowledge base to start with.
Iām right now in a personal situation that doesnāt allow me to work on the port, but Iāll be happy to solve any doubd youād have, if I have the knowledge to, and to bring ideas for anything. Just drop me a message,
PD: I check GitHub every night, so your pull requests are welcome!
OK, so I finished syncing the repos and I was about to launch a build.
As far as I see the idea behind is to take a device with same hardware as a starting point for the CM build, in this case the MSM8974AB. I see this referenced on many places as the FP2 SoCā¦
Should I trust Androidās info or the spec sheets? I see this model is also used on the OnePlus X and is actually not the same chip as the AB. It would be something in between the snapdragon 800 and 801 series (CPU from the 800 and GPU from the 801) but itās not very well documented. Would this have any implications with the build?
PS: I just came over this thread and I see Iām not the first to realize
So after some problems setting the build environment I successfully ran my first build. Repo sync is incredibly slow and unstable from my home network so I finally decided to run the build on a hosted server I have around.
Followed all steps from @NicoMās wiki and finally got the build.
Now Iām wondering how to properly flash the resulting .img files as Iām pretty new to androidās partitions, filesystems and boot process in general. Is it necessary to flash the recovery.img? Iām currently using TWRP, canāt I just keep this? Or do I specifically need the one from CM?
I tried to use this commands (no recovery.img flashed):
Your commands are right I think. And I have the same result, the boot doesnāt work and doesnāt show any errors, this is the big problem actually :-/
The adb logcat not working may be caused by adb authentication (enabled by default). If the RSA key of the computer is not known (and itās not since we just flashed with a fresh build) adb connection wonāt work. adb Auth can be overriden adding this to default.prop:
ro.adb.secure=0
I will try to manually regenerate the boot.img with this modification and give it another try. Maybe then we could see the boot logsā¦
I also didnāt manage to make it work yet. I donāt know if thereās another way to debug the generated boot.img, but some virtual device/emulator would be useful for sure.
In the meanwhile I managed to have the repos synced on my desktop, so now I can do builds and deploy faster. Iām trying to play around with different .mk files and following the CM porting tutorial from scratch to get an idea of what weāre actually doing
Iām also looking at the Fairphone Open OS source as I think we could get some valuable info from there for the CM build.
@NicoM, @Roboe: Which prebuilt kernel are you using in this blobs folder? Did you extract it from the device? Did you also try to build from source? Could it be broken?
Iām also concerned about the partition scheme. I could not get a clear picture of which partitions and filesystems currently exist on the device. I read this should be on /proc/mtd or /proc/emmc, but neither of them exist on my deviceā¦ I could however get some info from /proc/partitions and /proc/last_kmsg. Then I compared this to the recovery.fstab generated by extract-files.sh and it doesnāt make much sense to me.
I think we should take a closer look to the files generated by extract-files.sh as thereās a lot of stuff there that might be breaking the boot.