How to compile ArrowOS from source

guide on how to compile rom from source

October 14, 2018 - 2 minute read -
arrowos guide

Published July 12, 2018 by Kuber Sharma, Bauuuuuu, Ganesh Varma

So before we begin do checkout the below guides!

Establishing a Build Environment
Repo command reference
The Android Source Code & its structure

Lets Begin

Initialize your local repository & Sync:
mkdir arrow
cd arrow
repo init -u -b arrow-9.x
repo sync  -f --force-sync --no-clone-bundle -jX

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: ->

Now inside
  • Change “lineage” to “arrow” & /”” to “”
    for e.g: $(call inherit-product, vendor/arrow/config/
  • 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

"repository": "android_vendor_zuk_z2_plus",
"target_path": "vendor/zuk"
"repository": "android_device_zuk_msm8996-common",
"target_path": "device/zuk/msm8996-common"
"repository": "android_kernel_zuk_msm8996",
"target_path": "kernel/zuk/msm8996"

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:

  • lineage-overlays
  • lineagehw

Simillarly from

# Lineage Hardware

From manifest.xml remove livedisplay HAL:

<hal format="hidl">

From named as your SOC codename like:


# LiveDisplay native

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

. build/
lunch arrow_<devicecodename>
brunch <devicecodename>