[Android Q&A, Help & Troubleshooting] XxInSaNeClOwNxX:
I am using ubuntu 15.04 vivid vervet and I just setup my rom building environment using these steps:With a new version of Ubuntu comes an update to my world-famous guide for setting up a build environment to compile Android ROMs. The aim of this is to simplify the configuration process for you.

Follow the directions step-by-step. All you have to do is copy and paste the code in order and it will be up and running in no time!

This guide applies to all variations of Ubuntu 15.04 Vivid Vervet 64 bit. Do not use the 32 Bit version.

Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.

Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.

Ready to begin? Ok.

1) Unless it’s a completely fresh Ubuntu installation, many of you have the wrong version of Java installed. Let’s fix that first.

The command below makes sure you’re starting with a clean slate. Copy and paste it into a terminal (command prompt) window:

sudo apt-get remove openjdk-* icedtea-* icedtea6-*

If necessary, follow the on-screen instructions to remove any stray Java versions. Otherwise, move on to the next step.

2) Install the main build tools with this command:

sudo apt-get install openjdk-7-jdk openjdk-7-jre git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev

3) When those are done installing, run the next line in your terminal window:

sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

That’s it on the package side of things.

4) A program called “repo” lets you communicate with git servers and download all that precious source code. The next command will install it:

mkdir ~/bin && curl ttp://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo

5) Use your favorite text editor to open ~/.bashrc – I like nano:

sudo nano ~/.bashrc

6) At the very bottom (use the Page Down key) paste this code to a new line:

export PATH=~/bin:$PATH

7) Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:

source ~/.bashrc

8) In the terminal, navigate to where you would like to download the Android source code. The commands below will make it in your home folder, but if you have limited space you may want to create it somewhere else. Faster is better, i.e. SSD would be best, USB external (even 3.0) will be comparatively slow. Here we go:

mkdir ~/android

cd ~/android

9) Now you’re going to initialize the repo. This is where you decide the flavor of Android you want to build, i.e. AOKP, CyanogenMod, AOSP etc.

For the purposes of the tutorial, here’s the command for SimpleAOSP Lollipop:

repo init -u ttps://github.com/SimpleAOSP-Lollipop/platform_manifest.git -b L

10) Last step, it’s a doozy. Time to get the source. Prepare yourself, many gigabytes of downloading await.

Don’t worry, it’s automated.

Hey everyone, it’s the final terminal command!

repo sync

Check back periodically every hour or so. It all depends on how fast your connection is.

That should be everything. Now you’re ready to build Android. Good luck! .... After I do all of that what do I need to do next to get started? Is that all I need TO get started? thank you for all of your help!