[Sony Xperia Miro, Tipo (Dual), J, E] UltraGamerHD:
Setup ABE (Android Build Environment To Compile Roms) ​

For this you tutorial you need to be running Ubuntu 13.10 64-Bit (32-Bit Will Not Work).

Does Not Matter if you are running this in a virtual machine or not. (Will work on Both)

Also I will also be showing a Guide to Syncing CM11 Repo and TamsuiCM11 Repo.

Instructions (Read Carefully):

First, let's set up the correct JDK.

Many of you probably have some kind of wrong Java installed unless you're starting with a fresh Ubuntu base, and even then maybe.

Let's get rid of that. Copy and paste this into a Terminal window:

sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

Follow the instructions to remove OpenJDK. If you must keep it, it's possible. But I'm not going to tell you how to do it here. I don't want any chance of confusion or mistake.

Now copy and paste the following into the Terminal:

sudo add-apt-repository ppa:webupd8team/java

This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10. No more unrecognized Java version errors! And it will update automatically with the rest of your system.

Next, we actually need to install the package. More copy-paste:

sudo apt-get update && sudo apt-get install oracle-java6-installer

Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:

sudo apt-get install git-core lzop ccache gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python gcc g++ cpp gcc-4.8 g++-4.8

When that is done installing, run the following command 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.

You guessed it, time for more Terminal. This really is the easiest way, seriously. And it's totally worth it when you're basking in the glory of a bunch of people on XDA.

The binary for a program called "repo" will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:

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

Use your favorite text editor to open ~/.bashrc

I like nano:

sudo nano ~/.bashrc

At the very bottom, add the following line:

export PATH=~/bin:$PATH

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

In the terminal, navigate to where you would like to store the Android source code. The directions 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 is basically unusable. Here we go:

mkdir ~/cm11
cd ~/cm11

We will configure your information, your name and email address, In terminal type:

git config --global user.name your name
git config --global user.email your email

Now you're going to initialize the repo. Here's where you decide the flavor of Android you want to build for, ie AOKP, CyanogenMod, AOSP etc. The following, for the purposes of this tutorial, will initialize for Stable CM11:

repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-11.0

Almost there. Last step, but it's a doozy. You're going to get the source. Prepare yourself, mere mortal. 10+ GB of downloading await you. Don't worry, it's automated. Go to sleep. Eat something. Perhaps you have heard of this new thing the kids are doing called "going outside"? Yeah, I didn't think so. Me neither. The final terminal command, to be run from your android directory:

repo sync

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After that is done its time to Sync TamsuiCM11 Repo:

Go into your file browser and to your username then your cm11 folder, once there press Ctrl+H on your keyboard. Go into the folder .repo and make a folder called:

local_manifests

Once done exit out of the repo folder and press Ctrl+H on your keyboard once again.

Now its time you configure the local manifest, this will download all necessary files for the devices in this forum.

Type this in terminal:

. build/envsetup.sh
[B]breakfast jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E)
gedit ~/cm11/.repo/local_manifests/local_manifest.xml

Now go to this link: https://github.com/TamsuiCM11/local_manifest/blob/master/tamsui.xml

Copy everything in the file into the open window of gedit hit save and close.

Go back to Terminal and type:

repo sync

This will download all necessary files, once done type the following into terminal:

cd ~/cm11/vendor/cm
. get-prebuilts
croot

Finally type:

[B]brunch jlo[/B] (For Xperia J) [B]tapioca[/B] (For Xperia Tipo) [B]mesona[/B] (For Xperia Miro) [B]nanhu_ds[/B] (For Xperia E

It will begin to build, if you run into any errors, do some research before creating tons of threads.

THANK ME IF I HELPED!