Instructions to build Lineage OS for the Xiaomi Mi 11 Lite 4g
This repository has been archived on 2025-11-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Dockerfile 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-11-15 13:36:03 +00:00
.devcontainer chore(deps): update docker.io/library/ubuntu:24.04 docker digest to c35e29c (#56) 2025-11-15 13:36:03 +00:00
.forgejo chore(deps): update git.zarantonello.dev/infra/ci docker tag to v1.1.18 (#53) 2025-11-12 03:02:18 +00:00
.gitignore feat: initial commit 2025-09-10 16:34:09 +02:00
.prettierrc.json feat: initial commit 2025-09-10 16:34:09 +02:00
.renovaterc.json ci: use ci as container to be more flexible (#12) 2025-09-17 08:23:35 +00:00
.yamllint.yml feat: initial commit 2025-09-10 16:34:09 +02:00
LICENSE chore: add license (#4) 2025-09-10 20:48:45 +00:00
README.md feat: initial commit 2025-09-10 16:34:09 +02:00
roomservice.xml feat: initial commit 2025-09-10 16:34:09 +02:00

Lineage Os build for courbet (Xiaomi Mi 11 Lite 4g)

This repository documents how to build the LineageOS rom for the Xiaomi courbet.

Kernel and device specific files are taken from crdroid, another ROM downstream of LineageOS that supports this device officially.

Prepare the environment

AOSP builds are officially supported in Ubuntu 22.04. In case you are using another distribution I would recommend creating a docker container and running the build steps inside there.

For semplicity I set up a devcontainer that you can start using the devcontainer cli tool and later accessed with docker exec.

# Build and start the container.
devcontainer up
# Start a shell into the container.
devcontainer exec bash

You will also need to setup git everytime the container is restarted (your real name and email are not needed unless you plan to contribute to the AOSP project):

git config --global user.name 'Your Name'
git config --global user.email '[email protected]'

Build steps

1. Initialize the repository

The first thing to do is to create the directory where the build process will happen. Then we can enter in that directory and use the repo command to initialize the repository.

export SOURCE_DIR='/workspace/work'
mkdir $SOURCE_DIR

cd $SOURCE_DIR
repo init \
  --depth=1 \
  --git-lfs \
  --manifest-branch 15.0 \
  --manifest-url https://github.com/crdroidandroid/android.git

3. Sync the repository

Now it's time to download all the files needed for building the ROM, to do that run this command inside the $SOURCE_DIR directory.

cd $SOURCE_DIR
repo sync --current-branch

4. Configure ccache

Here we just set some setting for speeding up the compilation process:

ccache -M 20G

6. Build the ROM

It's now time to start compiling, step into the source directory and let the computer do its work.

cd $SOURCE_DIR
source build/envsetup.sh
# This step is requires a large amount of memory, if you run into issues (like
# your computer freezing) try to export the variable NINJA_ARGS='-j=n' where n
# is a number that is a fraction of the number of cores of your processor.
brunch courbet