Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,801 Members 39,881 Now Online
XDA Developers Android and Mobile Development Forum

[UTILITY][1/8] Build CM10.1 or AOKP on OS X - OS X Build Set Up 1.2

Tip us?
 
frostincredible
Old
(Last edited by frostincredible; 13th January 2013 at 02:55 AM.)
#1  
frostincredible's Avatar
Retired Recognized Developer - OP
Thanks Meter 161
Posts: 604
Join Date: Nov 2010
Location: Florida

 
DONATE TO ME
Prompt [UTILITY][1/8] Build CM10.1 or AOKP on OS X - OS X Build Set Up 1.2

OS X Build Set Up 1.2 - By Kyle Frost (frostincredible)

So you want to build AOKP or CM10.1 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:
  1. Go here and download OS X Build Set Up 1.2 (OSX_Setup-1.2.zip) - DOWNLOAD
  2. Place the ZIP file on your Desktop.
  3. Extract the ZIP to your Desktop.
  4. 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.
  5. Find this line -
    Code:
    # BELOW IS THE ONLY LINE YOU SHOULD BE EDITING. REPLACE *YOUR DEVICE* WHITH YOUR DEVICE'S CODE NAME. EX - NEXUS 7 = "grouper"
  6. Just below that, edit this line with the instructions in the one I just posted -
    Code:
    cp /Volumes/Android/OUT/target/product/*YOUR DEVICE*/aokp_*YOUR DEVICE*-ota-eng.$ME.zip /Volumes/Android/Builds/AOKP_$ME.$NOW.zip
  7. IT IS IMPORTANT THAT YOU DON'T EDIT ANYTHING ELSE.
  8. Open your favorite Terminal application (the default on is Terminal located at /Applications/Utilities/Terminal).
  9. cd to the OSX_Setup folder on your Desktop.
    Code:
    cd /Users/YOUR NAME/OSX_Setup
  10. Run the following -
    Code:
    ./runme
  11. After running this, you will be presented with the following menu -
    Code:
    ============================================================
            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:
  12. As you can see, you need to go here and install MacPorts before proceeding - MacPorts
  13. After installing MacPorts you can go ahead and run everything.
  14. 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.
  15. 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.
  16. 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.
  17. Choosing Advanced Menu will give you this -
    Code:
    ============================================================
            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:
  18. 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).
  19. 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.
  20. 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 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.



Please do not redistribute this without my permission,
and feel free to hit that thanks button if you liked this.
Devices:
iPhone 5s 32GB
Droid BIONIC
Nexus 7



Eat. Sleep. Code.
The Following 28 Users Say Thank You to frostincredible For This Useful Post: [ Click to Expand ]
 
frostincredible
Old
(Last edited by frostincredible; 11th January 2013 at 09:40 PM.)
#2  
frostincredible's Avatar
Retired Recognized Developer - OP
Thanks Meter 161
Posts: 604
Join Date: Nov 2010
Location: Florida

 
DONATE TO ME
Version 1.0 - Initial Release

Version 1.1 - Bug Fixes

Version 1.2 - Bug Fixes
Devices:
iPhone 5s 32GB
Droid BIONIC
Nexus 7



Eat. Sleep. Code.
The Following 2 Users Say Thank You to frostincredible For This Useful Post: [ Click to Expand ]
 
frostincredible
Old
#3  
frostincredible's Avatar
Retired Recognized Developer - OP
Thanks Meter 161
Posts: 604
Join Date: Nov 2010
Location: Florida

 
DONATE TO ME
Reserved for future tips and tricks.
Devices:
iPhone 5s 32GB
Droid BIONIC
Nexus 7



Eat. Sleep. Code.
The Following User Says Thank You to frostincredible For This Useful Post: [ Click to Expand ]
 
leoaeries
Old
#4  
Senior Member
Thanks Meter 29
Posts: 126
Join Date: Feb 2010
Location: Doha
Thanks mate..

Sent from my A99 using Tapatalk 2
 
grad061980
Old
#5  
Senior Member
Thanks Meter 42
Posts: 150
Join Date: Dec 2010
Default What Mac OS version is this for?

This is sweet and appreciated. I can't wait to try this tonight.Thanks for the script and tutorial.

What Mac OS X is this for? I assume Mountain Lion. I'm run 10.8.2 at work and thinking about updating my home computer to the same. I have a build environment setup for OS X 10.6.8 at home, but Mac Ports was giving me issues and this will help me in getting my build environment back up and going. Thanks again.
 
sonymsam
Old
#6  
sonymsam's Avatar
Senior Member
Thanks Meter 50
Posts: 206
Join Date: Sep 2008
Location: Houston
I have mountain Lion, will it work on it? I am surely gonna give it a try when i get home! I was thinking on installing ubuntu. but nahh!
 
wildestpixel
Old
#7  
wildestpixel's Avatar
Senior Member
Thanks Meter 554
Posts: 961
Join Date: Aug 2011
Location: London
Make sure you mount the sparse image before trying to install the folders
 
emd2009
Old
#8  
emd2009's Avatar
Senior Member
Thanks Meter 60
Posts: 622
Join Date: Jun 2007

 
DONATE TO ME
I unfortunately do not own a fast enough computer can someone build aokp for xoom?
 
heubergen
Old
#9  
Senior Member
Thanks Meter 41
Posts: 108
Join Date: Oct 2011
Location: Kloten
Which Version of xCode is requirement? (4.4, 4.0 or a older Version)
 
wildestpixel
Old
#10  
wildestpixel's Avatar
Senior Member
Thanks Meter 554
Posts: 961
Join Date: Aug 2011
Location: London
Quote:
Originally Posted by emd2009 View Post
I unfortunately do not own a fast enough computer can someone build aokp for xoom?
Wingray stingray, everest ?

---------- Post added at 08:33 PM ---------- Previous post was at 08:33 PM ----------

Quote:
Originally Posted by heubergen View Post
Which Version of xCode is requirement? (4.4, 4.0 or a older Version)
just follow the instructions at macports to get the latest updated.

Tags
android, aokp, build, cm10, os x
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes