Skip to Content
manufacturingSetting up environment

Setting up Environments to build Evolution X

This guide is for Linux Users targeting Ubuntu 22.04 LTS.

Make sure you have the appropriate performance requirements to build Android! Minimum requirements for A16 are:

  • 12 cores
  • 64Gb of RAM
  • 64 bit system.

This guide has been tested to work on:

  • WSL 2 Ubuntu 24.04.1 LTS
  • Ubuntu 20.04.6 LTS

Don’t wanna go thru hassles? Introducing akhilnarang’s script  repository. This method is the fastest one.

sudo apt install git curl ccache
git clone https://github.com/akhilnarang/scripts; cd scripts; sudo bash setup/android_build_env.sh

after you’ve done these commands you can skip to Step 3


Setting up a build environment!

Android builds are typically done on Ubuntu LTS (like 22.04), which has the necessary tools. A 64-bit system architecture and CPU are required for building Android

Installing required packages

A 64-bit version of Ubuntu (22.04 is recommended as of now because of LTS).

sudo apt update && sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick protobuf-compiler python3-protobuf lib32readline-dev lib32z1-dev libdw-dev libelf-dev lz4 libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev lib32ncurses5-dev libncurses5 libncurses5-dev python-is-python3

If you want to use latest Ubuntu LTS to build EvolutionX please review Setting up Ubuntu 24.04 to build Evolution X

Make A Folder And Initialize Repo

This will create a folder under /home/$user (your current user) Change it to your convenience.

cd && mkdir evo && cd evo
repo init -u https://github.com/Evolution-X/manifest -b bka --git-lfs
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags

You can find EvolutionX’s manifest right here 

Source the Build Environment

Run this command to load the necessary tools required for building.

. build/envsetup.sh

You can add this in your .bashrc to automatically run it:

echo 'cd evo && source build/envsetup.sh && cd' >> ~/.bashrc

The Keys

Without this, your build won’t be able to pass DEVICE or BASIC integrity. Remember to BACKUP your keys !

If you are an unofficial builder, there is a script  that will generate the keys for you. Simply execute:

croot && git clone https://github.com/Evolution-X/vendor_evolution-priv_keys-template vendor/evolution-priv/keys cd vendor/evolution-priv/keys
./keys.sh

Building

Note for official maintainers

Skip this part if you are not an official maintainer.

In the case where you are an official maintainer, please remember to set up the build type !

export EVO_BUILD_TYPE=Official

In order to set it up, you only have to To make sure it’s applied every time, you can add it at the end of your ~/.bashrc file:

echo 'export EVO_BUILD_TYPE=Official' >> ~/.bashrc source ~/.bashrc

Then keep reading this.

Before running compilation process you can Set up custom OTA updates.

For official and unofficial maintainers

lunch lineage_$device-$release-$build_type

Kindly visit the lunch page to learn about the lunch command.

Using Sargo as an example, building BP2A release, the command would be lunch lineage_sargo-bp2a-userdebug.

When the device is lunched, simply execute

m evolution

And the build will start.


That’s all you need to do! You’re good to compile the build and #KeepEvolving!

Reference

androidAndroid Open Source Project
Last updated on