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 ccachegit clone https://github.com/akhilnarang/scripts; cd scripts; sudo bash setup/android_build_env.shafter 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-python3If 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 evorepo init -u https://github.com/Evolution-X/manifest -b bka --git-lfsrepo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tagsYou can find EvolutionX’s manifest right here
Source the Build Environment
Run this command to load the necessary tools required for building.
. build/envsetup.shYou can add this in your .bashrc to automatically run it:
echo 'cd evo && source build/envsetup.sh && cd' >> ~/.bashrcThe Keys
Without this, your build won’t be able to pass DEVICE or BASIC integrity. Remember to BACKUP your keys !
Unofficial Build
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.shBuilding
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=OfficialIn 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 ~/.bashrcThen keep reading this.
Before running compilation process you can Set up custom OTA updates.
For official and unofficial maintainers
lunch lineage_$device-$release-$build_typeKindly 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 evolutionAnd the build will start.
That’s all you need to do! You’re good to compile the build and #KeepEvolving!