Setting up the environment
Before you start
- Regular Users
- ElementOS Staff
If you already have a building environment, continue to Building ElementOS.
Make sure you have git installed on your machine, these packages are installed by default on most of the Linux distributions. Follow the commands below to install git and Python.
apt-get update -y; apt-get upgrade -y
apt-get install git python
Also you will need knowledge of / experience with Android Development.
For ElementOS staff, use this repository in order to setup a new VM: ElementOS/tools. To set it up:
git clone https://github.com/elementosrom/tools
cd tools
bash setup_vm.sh
Once done, continue to Building ElementOS.
Installing dependencies
Install repo in order to init and sync the source.
- Make sure that you have a bin/ directory in your home directory and that it's included in your path:
mkdir ~/bin
PATH=~/bin:$PATH
- Download the Repo Launcher and ensure that it's executable:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
- Optionally verify the launcher matches our signatures:
gpg --recv-key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65
curl https://storage.googleapis.com/git-repo-downloads/repo.asc | gpg --verify - ~/bin/repo
Set up dependencies by running the following commands:
git clone https://github.com/akhilnarang/scripts
cd scripts
Now run the script to start fetching the required packages.
. setup/android_build_env.sh
No we will set up ccache for building quicklier (optional).
cd /tmp || exit 1 && git clone git://github.com/ccache/ccache.git && cd ccache || exit 1 && ./autogen.sh && ./configure --disable-man --with-libzstd-from-internet --with-libb2-from-internet && make -j"$(nproc)" && sudo make install && rm -rf "${PWD}" && cd - || exit 1