Jump to content

  1. 0
  2. 0
  3. 0/5

Rate this Topic

- - - - -

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

  • Please log in to reply

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 06 January 2013 - 01:44 AM #1

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:
  • Go here and download OS X Build Set Up 1.2 (OSX_Setup-1.2.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 -
    # 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




  • IT IS IMPORTANT THAT YOU 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 -
    ./runme




  • 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!


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.


Edited by frostincredible, 08 January 2013 - 01:48 PM.

  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 06 January 2013 - 10:47 AM #2

Version 1.0 - Initial Release

Version 1.1 - Bug Fixes

Version 1.2 - repo and cd bug fixes

Edited by frostincredible, 08 January 2013 - 01:47 PM.

  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

inffy

inffy

G33kY

Posted 06 January 2013 - 01:19 PM #3

Nice!

But maybe change the script to use homebrew instead macports?
  • 0 Likes

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 06 January 2013 - 01:27 PM #4

Nice!

But maybe change the script to use homebrew instead macports?


I might make an option to use whichever the user wants. I used MacPorts in mine, so I just know it works.
  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

woolbeo

woolbeo

Average Android

  • 7 posts

Posted 08 January 2013 - 11:35 AM #5

I found a couple of bugs. I am running OSX 10.8.2, so it might be limited to 10.8.

In initialize_cm, "cd CM" should be "cd /Volumes/Android/CM" or it reports directory not found.

In build_cm, "PATH=/Volumes/Android/bin/" should be "PATH=/Volumes/Android/bin:$PATH" like it is in your initialize scripts, or it breaks repo and I am sure many other things.

I haven't executed initialize_aokp and build_aokp, but from looking at them they have the same problems.
  • 0 Likes

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 08 January 2013 - 01:45 PM #6

I found a couple of bugs. I am running OSX 10.8.2, so it might be limited to 10.8.

In initialize_cm, "cd CM" should be "cd /Volumes/Android/CM" or it reports directory not found.

In build_cm, "PATH=/Volumes/Android/bin/" should be "PATH=/Volumes/Android/bin:$PATH" like it is in your initialize scripts, or it breaks repo and I am sure many other things.

I haven't executed initialize_aokp and build_aokp, but from looking at them they have the same problems.


I actually just found those last night and pushed fixes to github. I am uploading a new ZIP now with the fixes. Thank you though!
  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP

shadowDroid

shadowDroid

Android Apprentice

Posted 09 January 2013 - 01:29 PM #7

I actually just found those last night and pushed fixes to github. I am uploading a new ZIP now with the fixes. Thank you though!


Is that a public repo on github?
  • 0 Likes

OP frostincredible

frostincredible

Teenage Hacker >:)

Posted 09 January 2013 - 05:07 PM #8

Is that a public repo on github?


Yes! https://github.com/kylefrost/OSX_Setup
  • 0 Likes
Device: iPhone 5 32GB, Nexus 7
Current ROM: Custom AOSP