Skip to content

Building

ArnoldasMk edited this page May 31, 2026 · 2 revisions

Building LieppOS

Variants

Variant breakfast target Contents
vanilla lineage_arm64_bvNE_vanilla-bp4a-user No Google, no microG
semi lineage_arm64_bvNE_semi-bp4a-user microG + F-Droid + Privileged Extension
gapps lineage_arm64_bvNE_gapps-bp4a-user Google Apps via MindTheGapps

Step 1 — Host packages (Ubuntu/Debian)

sudo apt update
sudo apt install -y bc bison build-essential ccache curl flex g++-multilib \
  gcc-multilib git git-lfs gnupg gperf imagemagick lib32ncurses-dev \
  lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses-dev \
  libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync \
  schedtool squashfs-tools unzip x11proto-core-dev xsltproc zip zlib1g-dev \
  repo python3 openjdk-17-jdk adb fastboot xz-utils

Step 2 — Init source

mkdir -p ~/android/lieppos && cd ~/android/lieppos

repo init -u https://github.com/LineageOS/android.git -b lineage-23.2 --git-lfs

git clone https://github.com/MisterZtr/treble_manifest.git \
  .repo/local_manifests -b lineage-23.2

repo sync --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j4

Step 3 — Add the LieppOS vendor tree

mkdir -p vendor
git clone https://github.com/LieppOS/android_vendor_lieppos.git vendor/lieppos

Step 4 — Apply patches

./LineageOS_gsi/patches/apply-patches.sh   # TrebleDroid
./vendor/lieppos/apply-personal.sh         # LieppOS

Step 5 — Build environment + ccache

source build/envsetup.sh

export USE_CCACHE=1
export CCACHE_EXEC="$(command -v ccache)"
export CCACHE_DIR="$HOME/.ccache-lieppos"
export CCACHE_COMPRESS=1
ccache -M 100G

Step 6 — Build that variant

export OUT_DIR=out/<variant>
breakfast lineage_arm64_bvNE_semi-bp4a-user
mka -j8 systemimage

Output: out/<variant>/target/product/tdgsi_arm64_ab/system.img

GApps prep (gapps flavor only)

Before building gapps, stage MindTheGapps:

cp /path/to/MindTheGapps-16.0.0-arm64-*.zip ~/Downloads/
vendor/lieppos/tools/extract-mindthegapps.sh ~/Downloads/MindTheGapps-16.0.0-arm64-*.zip

Step 7 — Compress for release

xz -T0 -9e -c out/semi/target/product/tdgsi_arm64_ab/system.img \
  > out/semi/target/product/tdgsi_arm64_ab/system.img.xz

Congratiolations.


Next: Installation · Back: Home

Clone this wiki locally