- Follow the steps for pioneer or really any other device until you get to Initialize the LineageOS source repository:
https://wiki.lineageos.org/devices/pioneer/build/
-
Make a workspace:
mkdir -p ~/android/lineage cd ~/android/lineage
-
Initialize the repo:
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1 --git-lfs
-
Create local manifests, e.g. by checking out a copy of this project and moving the files to the LineageOS folder:
git clone https://github.com/Eclipse-Community/build_lineage.git mv build_lineage/local_manifests/ .repo/
If you want to save some space, you can remove files for devices you're not interested in building. Open .repo/local_manifests/roomservice.xml and remove the repos from the manifest. They're all in groups of three, kernel, common, and device. Remove the three or six that don't match what you're building.
-
Sync the repo:
repo sync
-
Tell git about Change-Id trailers
git config --global --get-regexp 'trailer\.' | grep -qF 'Change-Id' || git config --global trailer.changeid.key "Change-Id"
- For XZ1 Compact (lilac) Only
Copy dumped firmware blobs into place for the build
-
(Semi-)optionally apply patches
Compiling without patches is untested. It will probably work if you want a more stock build. However you will need to comment out 'TARGET_KERNEL_CLANG_VERSION := r416183b1' in /device/sony/$platform-common/BoardConfigCommon.mk or BoardConfigPlatform.mk if you go without --minclang.
To apply all patches (recommended):
build_lineage/patches/applyPatches.sh
To apply only the minimal (required & security fix) patches:
build_lineage/patches/applyPatches.sh --minimal
To apply only the minimal & new Clang patches:
build_lineage/patches/applyPatches.sh --minclang
-
Setup the environment
$device is the device you want to build with. For now lilac, pioneer, and xz2c.
source build/envsetup.sh lunch lineage_$device-userdebug
You may also want to use 'lunch lineage_$device-user' instead if you use certain banking apps and such.
-
(Optional) Build with MicroG apps
!!Requires all patches!! or the signature spoofing patch
export WITH_GMS=true
-
Build LineageOS
m bacon
When completed, the built files will be in the out/target/product/$device
directory.