MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more

Sony to Extend its AOSP Program to Other Devices

Sony will be offering its users the possibility to use AOSP ROMs as an alternative to the … more
Post Reply

[How To] Setup ABE For Compiling Android Roms From Source (CM11) UPDATED 11/1/14

6th January 2014, 07:01 PM   |  #1  
UltraGamerHD's Avatar
OP Senior Member
Thanks Meter: 828
 
872 posts
Join Date:Joined: Aug 2013
More
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:

Code:
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:

Code:
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:

Code:
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:

Code:
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:

Code:
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:

Code:
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:

Code:
sudo nano ~/.bashrc
At the very bottom, add the following line:

Code:
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:

Code:
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:

Code:
mkdir ~/cm11
cd ~/cm11
We will configure your information, your name and email address, In terminal type:

Code:
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:

Code:
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:

Code:
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:

Code:
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:

Code:
. build/envsetup.sh
breakfast jlo (For Xperia J) tapioca (For Xperia Tipo) mesona (For Xperia Miro) nanhu_ds (For Xperia E)
gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Now go to this link: https://github.com/TamsuiCM11/local_...ter/tamsui.xml

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

Go back to Terminal and type:

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

Code:
cd ~/cm11/vendor/cm
. get-prebuilts
croot
Finally type:

Code:
brunch jlo (For Xperia J) tapioca (For Xperia Tipo) mesona (For Xperia Miro) nanhu_ds (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!
Last edited by UltraGamerHD; 11th January 2014 at 10:17 PM.
The Following 11 Users Say Thank You to UltraGamerHD For This Useful Post: [ View ]
6th February 2014, 12:28 PM   |  #2  
Junior Member
Thanks Meter: 4
 
14 posts
Join Date:Joined: Aug 2013
Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!

JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks
Last edited by phn1993; 6th February 2014 at 01:48 PM.
6th February 2014, 03:19 PM   |  #3  
NSDCars5's Avatar
Senior Member
Flag Over there
Thanks Meter: 401
 
1,056 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by phn1993

Thanks a lot for the how to. I'm just "syncing" (don't know if this is how it is said, just entered the command that downloads 10Gb) and it is doing the job! Don't know why this has only 5 "thanks", I found it very useful!!

JUST ONE QUESTION!! If I type breakfast tapioca it gives me "no such file or directory" error. If I type "tapioca_ss" it gives me no problems. Is it right?
Thanks

In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.

Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!
The Following User Says Thank You to NSDCars5 For This Useful Post: [ View ]
6th February 2014, 03:23 PM   |  #4  
Junior Member
Thanks Meter: 4
 
14 posts
Join Date:Joined: Aug 2013
Quote:
Originally Posted by NSDCars5

In your home folder, look in cm11/devices. If there's a folder called tapioca_ss, then you need to use tapioca_ss. If there's a folder called tapioca, then you need to use tapioca.

Yes, this guide is very useful, but unfortunately, you can only thank a post once (I did)!

Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!
6th February 2014, 03:31 PM   |  #5  
NSDCars5's Avatar
Senior Member
Flag Over there
Thanks Meter: 401
 
1,056 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by phn1993

Yes, I noticed!! Thanks!!
One last question (new it's true lol): I get "make" errors (ERROR 1) when compiling audio drivers. I don't know why, but I'm trying to repeat the how to as root!

I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.

And you're welcome.
The Following User Says Thank You to NSDCars5 For This Useful Post: [ View ]
6th February 2014, 03:39 PM   |  #6  
Junior Member
Thanks Meter: 4
 
14 posts
Join Date:Joined: Aug 2013
Quote:
Originally Posted by NSDCars5

I don't think you should do this as root; I've seen some guides that say doing so might deter the building process.

And you're welcome.

I finally decided to repeat all the guide! I think I've just found the problem!! Thanks again
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Xperia Miro, Tipo (Dual), J, E General by ThreadRank