Skip to Navigation Skip to Main Content

CalyxOS

Building CalyxOS

Table of contents

CalyxOS is Android-based, and the usual procedure to build AOSP applies. If you’re already familiar and setup to build Android, you can see the short version to get a quick idea. Otherwise, the long version goes into full detail to set it up from scratch.

This will help you setup a build environment for CalyxOS from scratch

Computer setup

OS

Hardware requirements

Install packages

For Debian Stable and other Debian based distros:

Other distributions may have the same or similar names for packages.

You may need to run the below command to prevent some warnings when building

Downloading the source code

repo

repo is the tool used to download all the different CalyxOS (and AOSP) source code repositories

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

CalyxOS

Now you can download the CalyxOS source code.

mkdir ~/calyxos/android11-qpr1
cd ~/calyxos/android11-qpr1
repo init -u https://gitlab.com/CalyxOS/platform_manifest -b android11-qpr1
repo sync -j8 # You may use a higher number here if you have a fast computer and fast internet

This will be a big download and may take a long time. Once it’s done, you can build CalyxOS

Proprietary files

Phones need a lot of proprietary files to boot and for all hardware to work, we have automated scripts to download and set them up.

./vendor/calyx/scripts/setup-apv.sh sunfish # Replace sunfish (Pixel 4a) with your device codename here

Building

You made it this far! Now you can finally build CalyxOS

source build/envsetup.sh
lunch calyx_sunfish-user # Replace sunfish (Pixel 4a) with your device codename here, and user with userdebug if you want a debug build
m # Yes, just the letter 'm'

This will be the longest step, it may take hours depending on your computer. Sit back and watch it build!

Installing

Congrats! You just compiled and installed a build of CalyxOS on your device.

Components built outside the OS

To keep the OS build simple and fast we build some components separately outside the AOSP build system, and copy them to a prebuilts repository so they don’t need to be built every time the OS is built. A list of those with links to build instructions:

Additionally, we include some apps from F-Droid in the build process. These are the upstream binaries shipped as-is without any modifications.

Emulator

To build and run CalyxOS Emulator images, see Emulator

Releases

The official production builds process is described under production