English | Русский
You'll need to get familiar with Git and Repo as well as How to build a GSI.
As a first step, you'll have to create and enter a folder with the appropriate name To do that, run these commands:
mkdir LineageOS
cd LineageOS
repo init -u https://github.com/MisterZtr/android.git -b lineage-22.1 --git-lfs
git clone https://github.com/MisterZtr/treble_manifest.git .repo/local_manifests -b 15-los
repo sync --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j$(nproc --all)
Copy the patches folder to rom folder and in rom folder
bash patches/apply-patches.sh .
Clone this repository, and then in device/phh/treble folder, run following commands:,
cd device/phh/treble
bash generate.sh lineage
Also, copy the files treble_arm64_bgN.mk and treble_arm64_bvN.mk to this folder
You can speed up subsequent builds by adding these lines to your ~/.bashrc OR ~/.zshrc file:
export USE_CCACHE=1
export CCACHE_COMPRESS=1
export CCACHE_MAXSIZE=50G # 50 GB
In ROM folder, for vanilla version:
. build/envsetup.sh
ccache -M 50G -F 0
lunch treble_arm64_bvN-ap4a-userdebug
make systemimage -j$(nproc --all)
For version with google services:
. build/envsetup.sh
ccache -M 50G -F 0
lunch treble_arm64_bgN-ap4a-userdebug
make systemimage -j$(nproc --all)
After compilation, If you want to compress the build, i recommend use 7-zip, for a fast and safe way In rom folder,
cd out/target/product/tdgsi_arm64_ab
7zz a system.img.xz "system.img"
If you face any conflicts while applying patches, apply the patch manually
These people have helped this project in some way or another, so they should be the ones who receive all the credit: