To get started with the building process, you'll need to get familiar with Git and Repo.
Java Open JDK 8
sudo apt install openjdk-8-jdk
Install Packages: If you use Ubuntu 16.04 -> 21.04 ( Not Have 20.04 ):
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev libncurses5 python
If you use Ubuntu 20.04 :
sudo apt install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-gtk3-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev libncurses5 python
Install repo:
mkdir ~/bin
PATH=~/bin:$PATH #You can add this to .bashrc or .zshrc
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
To initialize your local repository, use a command like this:
repo init -u https://github.com/KernelPanic-OpenSource/android.git -b 11
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
From root directory of Project, perform following commands in terminal
. build/envsetup.sh
brunch device-codename