- Dockerfile 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]> |
||
| .devcontainer | ||
| .forgejo | ||
| .gitignore | ||
| .prettierrc.json | ||
| .renovaterc.json | ||
| .yamllint.yml | ||
| LICENSE | ||
| README.md | ||
| roomservice.xml | ||
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