Published July 12, 2018 by Kuber Sharma, Bauuuuuu, Ganesh Varma
So before we begin do checkout the below guides!
Initialize your local repository & Sync:
Where X in the above command is no.of threads your CPU can handle.
To maintain the quality of device sources we recommend using device Tree, device-common, kernel source, vendor from LineageOS thus this guide will be based on how to compile Arrow OS using LineageOS Device Trees
Adapting Tree to compile ArrowOS:
lineage.mk -> arrow.mk
Now inside arrow.mk:
- Change “lineage” to “arrow” & /”common_full_phone.mk” to “common.mk”
for e.g: $(call inherit-product, vendor/arrow/config/common.mk)
- Change PRODUCT_NAME value “lineage_device-codename”
for e.g: ( “lineage_mido” ) to arrow_device-codename ( i.e, arrow_mido )
Rename “lineage.dependencies” to “arrow.dependencies”. Add all your device dependencies in here (mainly common device repo, kernel repo, vendor repo or if any other like toolchain etc)
Note: The dependencies file is to be only placed in device repo that follows the following naming structure android_device_«manufacturer»_«codename» as the roomservice tool will only be looking into it.
Here is a sample of the dependencies file
Removing stuff related to Lineage SDK etc:
It is necessary to clean up any specific files from LineageOS as these features depend on Los SDK which won’t be available on AOSP and results in build failures. eg: LiveDisplay, LineageParts, LineageOverlays etc.
From the root of your device tree/Common device tree remove the following folders/files:
Simillarly from BoardConfig.mk/BoardConfigCommon.mk:
From manifest.xml remove livedisplay HAL:
From device.mk(also named as your SOC codename like: msm8996.mk):
Note: There is possiblity that some custom packages such as doze etc may have dependency on lineageSDK, it is necessary to fix them to avoid complie errors.
To start the rom compilation:
From the root of your source directory run the following commands