Introduction I'm going to be talking about how to configure a Linux box to build Android without using too many words, I will list the requirements to do this. Required Linux Debian-based distribution Regretfully I love Debian and my configs will reflect that, most people use Ubuntu or Mint anyway which is Debian based so this will work for those distros too... A basic understanding of how to use terminal 1: Get Dependencies In Terminal, issue the following: sudo apt-get install bc bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev curl repo adb fastboot 2: Configure Git Since most people don't care about Git beyond using it to pull stuff, issue the following commands: git config --global user.name None && git config --global user.email None@none.none This will register you with nonsense credentials so you won't be bothered to enter anything when doing a repo init. This can be changed whenever, if you decide to make an account. 3. Get the SDK tools https://dl.google.com/android/repository/tools_r25.2.3-linux.zip Extract the 'tools' folder to the HOME directory. Next issue the following command in terminal: PATH=~/bin:~/tools:~/tools/platform-tools:~/tools/build-tools:$PATH && android This will open the Android SDK, download everything relevant to the version you want to build. 4. Deciding on an OS to build Now the fun part, we need to decide on an OS to build. Some would say LineageOS is best but I don't want to taint folks mind, so I will suggest the following: Create a folder, and open a terminal inside of it by using right click. Issue the following command in the new instance of terminal: PATH=~/bin:~/tools:~/tools/platform-tools:~/tools/build-tools:$PATH && android && repo init -u git://github.com/omnirom/android.git -b android-7.1 && repo sync -c --no-clone-bundle Since people who are pulling a code-base know exactly what they want and probably won't be switching branches, a current-branch pull is the most efficient. 5. Initializing the Build Environment Finally, the long wait is over right? Issue the following in terminal: . build/envsetup.sh or alternatively: source build/envsetup.sh