[HTC One X+] Lloir:
Ok guys i'm doing this as there's only two AOSP dev's (AOSP\CM\AOKP\PA) also i want to help get more people into developing.

This tutorial covers BOTH the AT&T and the International

This tutorial assumes you WONT be using a virtual machine but Linux installed onto your hard drive.

Prerequisites:

Able to read

Able to think

Not wanting your hand to be held

Able to use Linux

Ubuntu 10.04 > 12.04 (one of those)

AT LEAST 80gb free on your hard drive

Time

Patience

fastish internet

coffee (or tea or beer)

Computer Specs MINIMUM Dual core cpu and 4gb of ram and a ubuntu based OS 64bit

So your ready and read everything above lets get the show on the road.

if you are using ubuntu 10.04 to 11.10, you will need these files:

sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc openjdk6-jdk

end of 10.04 > 11.10 section

if you are using Ubuntu 12.04 > you will need these files:

sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 openjdk-7-jdk

and then run this command:

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

if you get any errors showing up simply remove the offending package it's moaning about and install it manually later, i wont hold your hand with this.

end of 12.04 > section

now you have all those packages you want to grab the android source, for this tutorial i'll be using CM10.1 (4.2.2)

1st you will need to grab repo:

you need to make this folder for it to go into

mkdir ~/bin

PATH=~/bin:$PATH this is to tell linux where the bin folder is (in a nutshell)

now to Download the Repo script and ensure it is executable:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

chmod a+x ~/bin/repo

ok that's that part done, now to grabbing the source and so on:

1st you need to make a folder to dump the source in, my folder layout is like this ~/Android/AOSP422 or ~/Android/CM10.1

but you can do it however you want

so for the benefits of this tutorial i'll be using ~/Android/CM10.1

mkdir ~/Android/CM10.1

cd ~/Android/CM10.1

thats the folder created and you have cd'd into it now to grab the source

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

this is telling repo where the source is and what BRANCH to pull so we are pulling cm-10.1

once all that is done do the next command

repo sync -j# (the # = number of cores + 1) so on my i5 it only has 4cores so it's -j5 (but you can do a little bigger on a repo sync i tend to do a -j16 on my i5 for repo)

now go grab a coffee :) this can take a little while.

once all that is done and dusted you'll be wanting to start building, hold your horses you still need the device specific stuff, so make sure you are in the root of the CM.10.1 Directory, then type the following command:

for the AT&T X+ it's

AT&T will be updated in the near future. Please don't ask for it right now.

for the International X+ it's

git clone https://github.com/HoxPlusCMOfficial/android_device_htc_enrc2b -b cm-10.1 device/htc/enrc2b

git clone https://github.com/HoxPlusCMOfficial/android_vendor_htc_enrc2b -b master vendor/htc/enrc2b

git clone https://github.com/HoxPlusCMOfficial/android_kernel_htc_enrc2b -b master kernel/htc/enrc2b

git clone https://github.com/HoxPlusCMOfficial/android_device_htc_tegra3-common.git -b cm-10.1 device/htc/tegra3-common

that will grab down my CM10.1 device specific source

once that's downloaded

Get the CM prebuilts by doing the following:

cd vendor/cm/

./get-prebuilts

then cd back to the root dir

then the following commands to get the build going

. build/envsetup.sh

brunch evitareul or enrc2b depending on which device your building for.

and the build will get started, this can take anywhere from 4hrs > 30minutes

once it's all finished it will tell you where your zip file has poped out.

enjoy and don't forget if you used this tutorial link back to it in your rom op.

recommended reading:

http://source.android.com/source/initializing.html

and

http://wiki.cyanogenmod.org/w/Development

-Lloir