How to build LineageOS

@z2ntu Yery helpful answerd. Thanks.

Is my understanding correct that

  • I can not flash Magisk with the standard Recovery. CWM or TWRP (which are not ported yet) are required.
  • Why can’t I flash and start Magisk with adb?
  • TWRP is not ported yet. It needs Kernel and driver parts of the published sources to be complete and correct. Thus, before someone is able to build FP3 SW from sources and proof it working (flash with adb) it does not make sense to start porting TWRP.
  • Magisk does not need to be ported. I understood that its quite device agnostic
1 Like

Magisk only works on TWRP according to their website. The stock recovery checks signatures and / or doesn’t have the required functionality implemented I’m guessing.

adb is usually used for getting a shell and pushing/pulling files to/from the device, for debugging. You can also use adb (adb sideload) to push installation zips to the device and they will be installed but that only works in the recovery (see answer above). On the running Android system you don’t have any special permissions and can’t modify boot or system partitions - that’s only possible through a different system that basically doesn’t use the permission handling of Android :wink:

You need either the kernel extracted from a stock boot.img or a self-compiled kernel from the Fairphone-released kernel source code in order to get a custom system like TWRP working. Unfortunately I haven’t gotten the compiled kernel booting yet - and Fairphone doesn’t provide factory images yet to extract the kernel from.

Correct.

3 Likes

Maybe this is helpful for other people who want to start building Lineage (maybe this is the type of info newcomers would want to have?)

I followed this guide (https://forum.xda-developers.com/android/software-hacking/guide-how-to-build-lineageos-15-1-t3750175), but what is not in the guide - as it depends on many factors

  • downloading the sources took ages over a 100 MBit/s connection
    • forgot to check my clock, so I don’t know the real duration, but 2+ hours would be a good guess
    • could that be sped up by tweaking repo sync? I could imagine it downloads more than necessary if one just wants to build one version for one device
  • before starting the actual build the folder had ~70GB
  • the initial build took 04:53:51
real    294m7.497s
user    859m27.531s
sys     512m39.719s
  • after the build, ~133 GB space was used (using a CCACHE setting of 50 GB)

That’s on a Windows 10 version 19.09 laptop with i7-6700HQ @ 2.60GHz (4 physical/8 logical cores), 16 GB of RAM and a 1TB WD10SPCX-24HWST1 5400rpm magnetic disc (the laptop has a 128 GB SSD but that’s already used for everything else).
Build environment is Ubuntu 18.04 Core running under the Windows Subsystem for Linux.

[Update]: initial build time, final disk usage and computer specs

9 Likes

A post was merged into an existing topic: LineageOS on the FP1?

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