Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP frostincredible

6th January 2013, 10:41 AM   |  #1  
frostincredible's Avatar
OP Retired Recognized Developer
Flag Florida
Thanks Meter: 161
 
604 posts
Join Date:Joined: Nov 2010
Donate to Me
More
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.
Last edited by frostincredible; 13th January 2013 at 03:55 AM.
The Following 28 Users Say Thank You to frostincredible For This Useful Post: [ View ]
6th January 2013, 10:41 AM   |  #2  
frostincredible's Avatar
OP Retired Recognized Developer
Flag Florida
Thanks Meter: 161
 
604 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Version 1.0 - Initial Release

Version 1.1 - Bug Fixes

Version 1.2 - Bug Fixes
Last edited by frostincredible; 11th January 2013 at 10:40 PM.
The Following 2 Users Say Thank You to frostincredible For This Useful Post: [ View ]
6th January 2013, 10:42 AM   |  #3  
frostincredible's Avatar
OP Retired Recognized Developer
Flag Florida
Thanks Meter: 161
 
604 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Reserved for future tips and tricks.
The Following User Says Thank You to frostincredible For This Useful Post: [ View ]
11th January 2013, 05:36 AM   |  #4  
Senior Member
Flag Doha
Thanks Meter: 29
 
126 posts
Join Date:Joined: Feb 2010
More
Thanks mate..

Sent from my A99 using Tapatalk 2
11th January 2013, 04:50 PM   |  #5  
Senior Member
Thanks Meter: 44
 
151 posts
Join Date:Joined: Dec 2010
More
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.
11th January 2013, 05:47 PM   |  #6  
sonymsam's Avatar
Senior Member
Flag Houston
Thanks Meter: 50
 
206 posts
Join Date:Joined: Sep 2008
More
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!
11th January 2013, 08:50 PM   |  #7  
wildestpixel's Avatar
Senior Member
Flag London
Thanks Meter: 566
 
1,003 posts
Join Date:Joined: Aug 2011
More
Make sure you mount the sparse image before trying to install the folders
11th January 2013, 09:29 PM   |  #8  
emd2009's Avatar
Senior Member
Thanks Meter: 63
 
639 posts
Join Date:Joined: Jun 2007
Donate to Me
More
I unfortunately do not own a fast enough computer can someone build aokp for xoom?
11th January 2013, 09:33 PM   |  #9  
Senior Member
Flag Kloten
Thanks Meter: 44
 
109 posts
Join Date:Joined: Oct 2011
More
Which Version of xCode is requirement? (4.4, 4.0 or a older Version)
11th January 2013, 09:33 PM   |  #10  
wildestpixel's Avatar
Senior Member
Flag London
Thanks Meter: 566
 
1,003 posts
Join Date:Joined: Aug 2011
More
Quote:
Originally Posted by emd2009

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

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.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes