[UTILITY][09/01/2014] Build CM, PA, OMNI or AOKP on OS X - OS X Build Version 2 !
Based on frostincredible Script
OS X Build Version 2 - By Ptichalouf
I Will add so Many Team !
So you want to build AOKP, PA, OMNI or CM on OS X?
Well worry no longer my friends,
it is about to get a whole lot easier. Why is that?
Because this script I've written will do pretty
much everything for you, from creating the case sensitive DMG to installing the required files,
to setting up all the folders.
The best part? It also will initialize the AOKP or CM repo (depending
on your choice) and you can also build them straight from the script!
How fantastic is that?!
Simply read on to see how! Make sure to follow all the instructions (there aren't many)!
Follow these steps:
Install required files (MUST install MacPorts first) MacPorts available free at www.macports.org and Xcode : here Run 1 time Xcode !
Go here and download OS X Build (OSX_Setup.zip) - DOWNLOAD
Place the ZIP file on your Desktop.
Extract the ZIP to your Desktop.
Here comes the only tricky part. Open the file located at OSX_Setup/scripts/advanced_scripts/build_cm or build_aokp, whichever you're going to build.
Find this line -
Just below that, edit this line with the instructions in the one I just posted -
# BELOW IS THE ONLY LINE YOU SHOULD BE EDITING. REPLACE *YOUR DEVICE* WHITH YOUR DEVICE'S CODE NAME. EX - NEXUS 7 = "grouper"
IT IS IMPORTANT THAT YOU DON'T EDIT ANYTHING ELSE.
cp /Volumes/Android/OUT/target/product/*YOUR DEVICE*/aokp_*YOUR DEVICE*-ota-eng.$ME.zip /Volumes/Android/Builds/AOKP_$ME.$NOW.zip
Open your favorite Terminal application (the default on is Terminal located at /Applications/Utilities/Terminal).
cd to the OSX_Setup folder on your Desktop.
cd /Users/YOUR NAME/OSX_Setup
$ git config --global user.email "Your@Mail.com"
Run the following -
$ git config --global user.name "YourName"
After running this, you will be presented with the following menu -
OS X Build Set Up 1 - based on Kyle Frost
1 - Create DMG
2 - Install required files (MUST install MacPorts first)
MacPorts available free at www.macports.org
3 - Set up folders
WARNING: DO NOT RUN ADVANCED MENU UNTIL
YOU HAVE RUN ALL 3 ABOVE, OR HAVE DONE
THEM ALL MANUALLY. THANK YOU.
0 - Advanced Menu
x - Exit
As you can see, you need to go here and install MacPorts before proceeding - MacPorts
After installing MacPorts you can go ahead and run everything.
Create DMG will give you the options of creating a 25GB, 30GB, 40GB, 50GB, 60GB or 120GB DMG. 25GB is the lowest recommended by the Android Team.
Install required files will simply do just that, it will install the files needed as specified in the AOSP documents. This can take a while, so go take a nap while it runs.
Set up folders will give you the option of setting up the folders for AOKP or CM10.1. Simply choose which you want and the folders will be created.
Choosing Advanced Menu will give you this -
OS X Build Set Up 1 - based on Kyle Frost
MUST INSTALL XCODE BEFORE BUILDING!
XCODE IS FREE IN THE MAC APP STORE!
1 - Initialize AOKP Repo
2 - Initialize CM11 Repo
3 - Initialize Paranoid Repo
When building, it will give you a list
of devices. Enter the number for your device
configuration and the build will continue.
It will take a while the first time, as the
source must first completely download.
4 - Build AOKP
5 - Build CM11
6 - Build Paranoid
Note: When the build is complete, you can
find the finished ZIP in the Builds
folder on your Android disk image.
0 - Go to Main Menu
There you can see you need to install Xcode, if you haven't already. It is free in the Mac App Store (this script is for OS X, you know).
All the options are pretty self explanatory. Make sure you have run the folder set up for the ROM which you wish to build first. Run the initialize option for your desired ROM before running the build option.
That is it! After the build has done (takes a while the first time you set all this up, much faster the next few times) you will be able to build your own nightly's, or whatever you so desire! Have fun!
NOTE: If you have an error regarding "Xcode" and the "10.6 SDK" when trying to build, download the MacOSX10.6.sdk.zip, decompress it, and place it in "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/".
Disclaimer: This will only work with devices that are officially supported by AOKP PA or CM Team If your device is not supported by their official repos, either wait to see if it is, try to edit my script to get the repo your device's tree is on, or wait until I get around to writing a tutorial on how to add custom repos.