This is a guide to build AICP on OS X Mountain Lion(10.8.X).
First we need to set up our OS X to be able to build Android. This needs some extra things compared to, for example, building in Linux. But the main stuff is pretty much the same. So let’s get started then, shall we?
Open up Terminal and type
If you don’t have Java installed you will get a prompt to install it.
Next we will install homebrew (you can also use macports if you like)
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
Now make sure android-sdk and homebrew are in $PATH
touch ~/.bash_profile && echo "PATH=/usr/local/bin:/usr/local/sbin:$PATH:/usr/local/android-sdk/tools:/usr/local/android-sdk/platform-tools" >> ~/.bash_profile
Now run this and see if you need to update anything.
If you do (and you probably will once a day) type:
Now we need to get our dev packages
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
Once that is done, run
if it shows anything, run
Now run this to correct a few symlinks [Not sure if these are needed anymore] :
ln -s /usr/local/bin/gfind /usr/local/bin/find && ln -s /usr/local/bin/gsed /usr/local/bin/sed
Now to create our case sensitive image for our AICP project [NOTE: the 60g can be changed to anything. It only takes up what it needs but I used 60GB]:
hdiutil create -type SPARSE -fs "Case-sensitive Journaled HFS+" -size 60g -volname "android" -attach ~/Desktop/Android
Now to create our working directory
cd /Volumes/Android && mkdir aicp && cd aicp
repo init -u https://github.com/AICP/platform_manifest.git -b n7.1
After the sync is finished, please read the instructions from the Android site on how to build.
time brunch m7
make clobber every now and then!