This is a guide to build AICP on OS X Mountain Lion(10.8.X).
/usr/local/
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
java
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.
brew doctor
If you do (and you probably will once a day) type:
brew update
Now we need to get our dev packages
brew install git coreutils findutils gnu-sed gnupg pngcrush repo
Once that is done, run
brew outdated
if it shows anything, run
brew upgrade
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
Initializing Repository
repo init -u https://github.com/AICP/platform_manifest.git -b n7.1
repo sync
After the sync is finished, please read the instructions from the Android site on how to build.
. build/envsetup.sh
brunch
. build/envsetup.sh
time brunch m7
Remember to make clobber
every now and then!