This guide also work for the most Debian-based systems like: Ubuntu, Linux Mint, etc
Please make sure to upgrade the system before installing new packages, by doing apt update && apt dist-upgrade -y
as root.
cd ~
sudo apt install git aria2 -y
git clone https://gitlab.com/OrangeFox/misc/scripts
cd scripts
sudo bash setup/android_build_env.sh
sudo bash setup/install_android_sdk.sh