Create a directory for the source files
mkdir LOS-22 && cd LOS-22
Install Repo in the created directory
repo init --depth=1 --no-repo-verify -u https://github.com/LineageOs-Special-Project/losp_manifests -b lineage-22.1 --git-lfs
This is what you will run each time you want to pull in upstream changes. Keep in mind that on your first run, it is expected to take a while as it will download all the required Android source files and their change histories.
- Let Repo take care of the hard work
repo --no-pager --color=always sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags --optimized-fetch --prune
- Set up the build environment
source build/envsetup.sh
- Lunch a target
lunch lineage_codename-ap3a-userdebug
- To start compiling (fastboot flashable image)
m updatepackage