Jump to content


Photo

[Guide] Compiling AOKP & Cyanogenmod for the Motorold Droid Razr / Razr Maxx [XT912]

AOKP CM9 CM10

  • Please log in to reply
7 replies to this topic

#1 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 23 November 2012 - 08:02 PM

[Guide] Compiling AOKP & Cyanogenmod for the Motorold Droid Razr / Razr Maxx [XT912]

This guide is for anybody that wants to compile their own android roms for the Motorola Droid Razr / Razr Maxx from source.
Everything here is pretty self explanatory and its all copy/paste to make it easier. I recommend that you have a dedicated
machine running Ubuntu and don't use a Virtual Machine like VirtualBox which will probably work but will take forever to compile.
A good internet connection helps too since you'll be syncing over a gigabyte of data from the repositories. Other than that all
you need is some time and a little patience and you're good to go!

Requirements -
O/S
Ubuntu 10.04 LTS or better
Ubuntu 12.04.1 LTS (Precise Pangolin) is still experimental but it works fine for me
[

Please Login or Register to see this Hidden Content

]

System -
Dual Core CPU (2Ghz is recommended)
2Gb RAM (minimum, 4Gb is recommended)
25GB of hard drive space is required to compile (80Gb is recommended)
If you plan on compiling different flavors or android and storing the
repositories on your system for future builds then definetely have plenty
of hard drive space. I use a 250Gb hard drive for my dedicated Ubuntu machine.

Installing the necessary tools to compile Android
Copy/Paste in Terminal

32bit/64bit systems

Please Login or Register to see this Hidden Content


64bit systems only

Please Login or Register to see this Hidden Content


X11 tools

Please Login or Register to see this Hidden Content


Creating the dynamic link for libx11.so

Please Login or Register to see this Hidden Content


Installing the Java Development Kit [JDK 1.6.37]
Download the Java SE 6 Update 37 JDK

Please Login or Register to see this Hidden Content


Move jdk-6u37-linux-x64.bin to your /home directory
Run each of the following lines one at a time

Please Login or Register to see this Hidden Content


Open a new terminal window and type the following to edit .bashrc
gedit ~/.bashrc
This will open the text editor
Add the following lines to the top

Please Login or Register to see this Hidden Content

Save and close the text editor

Download the Android SDK
[

Please Login or Register to see this Hidden Content

]
Extract the SDK to your /home folder so the structure is like this ~/android/sdk making sure that everything is in the sdk directory

In terminal type gedit ~/.bashrc
Add the following lines below the lines we previously added for the Java paths

Please Login or Register to see this Hidden Content

Save and close the text editor

Adding the device paths
Open a new terminal window and paste the following

Please Login or Register to see this Hidden Content

The text editor will open
Add the following lines

Please Login or Register to see this Hidden Content

Save and close

In terminal paste the following

Please Login or Register to see this Hidden Content

Now open the Android SDK by typing the following
(make sure you're in the android directory, if not then type cd ~/android)

Please Login or Register to see this Hidden Content


When the SDK Manager opens we need to install some repos
Check the boxes for the following
-SDK Tools
-Android SDK platform-tools
Click install and wait for it to finish

How to a acquire repositories needed to build android
Open a terminal window and input each line individually

Please Login or Register to see this Hidden Content

This will install the git/repo tools to /home/bin/
Close terminal and reboot your system for everything to work properly

Open a new terminal window and type the following

Please Login or Register to see this Hidden Content


Enter the following line below the previously added Android paths

Please Login or Register to see this Hidden Content

Save and close the text editor

How to compile AOKP [JB]
Initialize the repo

Please Login or Register to see this Hidden Content


Local manifiest for AOKP

Please Login or Register to see this Hidden Content


Sync the repo

Please Login or Register to see this Hidden Content

[You can add the -jX argument, X being the number of cores your CPU has for faster syncing,
example: repo sync -j4]

Syncing the repo can take a couple of hours to complete depending on your download speed.

Once the repo has completed syncing you are ready to build your rom
You should still be in /android/system/ (system can be whatever you named it previously)
To begin the long task of building your rom type the following into the terminal window

Please Login or Register to see this Hidden Content


Building the rom can take from 4-6 hours depending on your system so be patient and just let it build.

How to compile Cyanogenmod 9 [ICS]
Initialize the repo

Please Login or Register to see this Hidden Content


Local manifiest for CM9 [ICS]

Please Login or Register to see this Hidden Content


Sync the repo

Please Login or Register to see this Hidden Content

[You can add the -jX argument, X being the number of cores your CPU has for faster syncing,
example: repo sync -j4]

Getting the prebuilts that are required to build Cyanogenmod

Please Login or Register to see this Hidden Content


Compile your rom

Please Login or Register to see this Hidden Content


How to compile Cyanogenmod 10 [JB]
Initialize the repo

Please Login or Register to see this Hidden Content


Local Manifiest for CM10 [JB]

Please Login or Register to see this Hidden Content


Sync the repo

Please Login or Register to see this Hidden Content

[You can add the -jX argument, X being the number of cores your CPU has for faster syncing,
example: repo sync -j4]

Getting the required prebuilts (make sure you're still in /home/android/system)

Please Login or Register to see this Hidden Content


Compile your rom

Please Login or Register to see this Hidden Content


How to find your newly compiled rom after the build process completes
You can find your newly compiled rom as a prepackaged flashable zip in the following location

Please Login or Register to see this Hidden Content

Your newly compiled rom comes complete with Superuser or SuperSU and busybox pre-installed so it's ready to flash with Safestrap! In the same folder where
you found your rom there is also a MD5 hash code that is used to check data integrity, I usually copy that too. If you want to try other roms there are more repos
at the STS-Dev-Team github site in the android_local_STS directory located

Please Login or Register to see this Hidden Content

. You will find more options for AOKP, CM9, CM10 and CNA (codenameandroid)
in both stock and kexec. The repos get updated by the team every so often so check the dates on the local manifests and read the change logs for more information.

To start the build process again you will need to clean out your previous build by doing the following
In terminal type

Please Login or Register to see this Hidden Content

This will remove the previous build so make sure that you have aquired your newly compiled rom
before executing this step.

Assuming you are going to build the same rom again then do this again

Please Login or Register to see this Hidden Content


Now that you have compiled your rom it's time to customize it any way you like and flash away!

A huge thanks goes out to

Please Login or Register to see this Hidden Content

and

Please Login or Register to see this Hidden Content

of the

Please Login or Register to see this Hidden Content

who are the two guys who have made it possible for Motorola Droid Razr / Razr Maxx
owners to be able to have custom roms. They have put forth a lot of time and effort to make all of this possible and without them we would have nothing to flash!
  • lownslow200sx, andlaw and BytecodeMe like this

#2 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 23 November 2012 - 08:03 PM

** For future use **

#3 istick

istick

    Member

  • Developer
  • 103 posts

Posted 30 November 2012 - 05:56 AM

Odd question.. but after building and playing with AOKP, I was thinking of playing with a stock ROM of my own creation. If I build AOSP from source, will it default to 4.1.2 or 4.2.1 which I think I'm seeing as the latest jb on there?

#4 Punk

Punk

    Member

  • Members
  • PipPip
  • 140 posts
  • LocationOrlando

Posted 02 December 2012 - 01:20 PM

I am pretty sure it's 4.1.2. Until dhacker or hashcode update it to 4.2.

#5 leibs11

leibs11

    n00b

  • Members
  • Pip
  • 11 posts

Posted 07 December 2012 - 02:43 PM

thanks for this guide, quick question. How does one change the info in the about phone section?

#6 snarfamthewizard2113

snarfamthewizard2113

    n00b

  • Members
  • Pip
  • 4 posts

Posted 07 December 2012 - 09:20 PM

so im highly interested in learning how to develop roms and such, can someone put me in a good direction to learn? how can i customize my rom after i have compiled it?

#7 AscensionX

AscensionX

    Code Breaker

  • Developer
  • 363 posts
  • Current Device(s):Motorola Droid Razr Maxx, Droid Razr Maxx HD, Nexus 7, Samsung Galaxy SIII

Posted 07 December 2012 - 09:55 PM

so im highly interested in learning how to develop roms and such, can someone put me in a good direction to learn? how can i customize my rom after i have compiled it?

Google is your best friend, just search for what you want to learn and you will find quite a bit of info on the subject. Hope that helps :)

#8 wonton9224

wonton9224

    Member

  • Members
  • PipPip
  • 59 posts
  • Google+:rstrawbridge9224@gmail.com
  • LocationPennsylvania
  • Current Device(s):Droid Razr Maxx

Posted 28 December 2012 - 08:07 AM

I've been running Aokp roms for a long time, I really can't seem to find a reason to stray away from it. It's got all the great features i'd like to have in my concept for a Rom. But i'd really like to see the regular tablet tweak from cm7 roms like Liquidsmooth 3.0 from back in my DX days. I've been searching for ways to edit certain xml files to move the status bar to the bottom, but I just don't know where to start.

In the end, if i could receive any help from someone, I'd like to be able to take Aokp, move the status bar just above, or maybe below the navbar. I'd also like to incorporate Paranoid settings to change the workspace to tablet mode so i can keep the normal navbar and normal statusbar, just right ontop or below the other.

If anyone could help with any info on recompiling Aokp with these modifications, it would be greatly appreciated and I'm sure others would enjoy it as well. I'd love to start developing Roms with any spare time I have, but I just need a little push in the right direction with some thorough instructions.

Thanks!






Also tagged with one or more of these keywords: AOKP, CM9, CM10

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users