Skip to content

Initializing and Building

IngCr3at1on edited this page May 17, 2012 · 36 revisions

So last I checked Google had relatively decent instructions for building in Ubuntu 10.04-11.10 @source.android.com but it seems they're instructions for 12.04 are a bit to be desired (I haven't build anything in 10.04-11.10 since the release of 12.04 so if something is lacking in the Google instructions feel free to shoot a fix over).

The following should be a bit more precise (if you parden the pun).

Install the required build dependencies.

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

Please note I have only tested this on a 64 bit machine (while none of the listed dependencies should require 64 bit), I cannot guarantee this will work on a 32 bit machine.

Create a working directory and download the repo binaries.

mkdir ~/bin
mkdir <path_to_dir>
cd <path_to_dir>
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

(replace "path_to_dir" with the path to the directory you would like to use for your build {and remove the < >, bloody markdown parsing}. I keep all my source in Android/src/ Hashcode's CM9 for example would than go in hashCM9 {this is a non-standard directory structure and only an example}).

Set your path for repo to work.

PATH=~/bin:$PATH

That's if for initializing a build environment head on over to the index to find the manifest that's right for you.

If you have any issues please see our FAQ

Clone this wiki locally