Necessity they say is the mother of invention. As humans, we are very creative and inquisitive. We have several ppl out there who will stop at nothing to tweak their android phones. In this post, I shall be taking you through the automated process of how to build CM10.1 or AOKP Android ROM on Mac OS X.
The credit of this work goes to XDA Senior Member frostincredible .
This geek Frostincredible has written a handy script that automates the entire process of setting up a build environment for either CM10.1 or AOKP depending on your preference.
Also, there are still a few things you’ll need to do outside of running the script, but the overall process is greatly simplified.
Currently, this will only work for officially supported devices. Unsupported devices will require you to edit the script to sync the appropriate repo.
Disclaimer & Warning!
It is strongly advised that you use this tutorial only for HTC Hero S. Trying using this tutorial in any other Android device May result in unpleasant outcomes of which am not liable. So before you proceed, Check your device’s model number in Settings » About phone. Try this at your own risk. Although, it is very unlikely that your device will be damaged if you follow all the instructions here to the last letter in this tutorial
Steps to Build CM10.1 or AOKP Android Rom on Mac on Mac OS X:
- First off, visit Go here and download OS X Build Set Up 1.2 (OSX_Setup-1.2.zip)
- Secondly, 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 –
# BELOW IS THE ONLY LINE YOU SHOULD BE EDITING. REPLACE *YOUR DEVICE* WHITH YOUR DEVICE'S CODE NAME. EX - NEXUS 7 = "grouper"
- Just below that, edit this line with the instructions in the one I just posted –
cp /Volumes/Android/OUT/target/product/*YOUR DEVICE*/aokp_*YOUR DEVICE*-ota-eng.$ME.zip /Volumes/Android/Builds/AOKP_$ME.$NOW.zip
- Please don’t edit anything else.
- 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
- Run the following –
- After running this, you will be presented with the following menu –
============================================================ OS X Build Set Up 1.2 - by Kyle Frost ============================================================ ---Main Menu--- 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 Enter option:
- 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, or 60GB 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.2 - by Kyle Frost ============================================================ ---Advanced Menu--- MUST INSTALL XCODE BEFORE BUILDING! XCODE IS FREE IN THE MAC APP STORE! 1 - Initialize AOKP Repo 2 - Initialize CM10.1 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. 3 - Build AOKP 4 - Build CM10.1 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 Enter option:
- 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!
This will only work with devices that are officially supported by AOKP or CM10.1. 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.