Upload
ajinkya
View
238
Download
0
Embed Size (px)
DESCRIPTION
How to Build Your Own CyanogenMod 11
Citation preview
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 1/7
5,367,050 MEMBERS
[GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4
6th November 2013, 08:02 PM (Last edited by Raum1807; 8th November 2013 at 07:14 PM.) #1
Page 1 of 25 1 2 3 11 > >>+ POST REPLY VIEW FIRST UNREAD
> Google Nexus 4 > Nexus 4 General > [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4
Tip us?
Raum1807
Senior Member - OP
Thanks Meter 572
Posts: 233
Join Date: Jul 2012
[GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from
sources for the Nexus 4
Make your 'own' KitKat-ROM today!
V1.1 - 20131108 Update 1: Java part added. Error remarks.Local_manifest: branch update.V1.0 - 20131106 Initial release
Thank you note: Thank you to the whole CM-Team for bringing up-to-date-Android to so many devices.
User Name
Remember Me? Forgot your password?
NEWS FORUM WIKI XDA TV
Type To Find Your Device... Search All Forums
Like Tweet +1
Search this thread
MOST THANKED IN THIS THREAD
ALL-TIME
6(quote) (quote) Looks like there
Raum1807 OP
5Clear Cache I saw and subscribed this
x1123
3(quote) You are very welcome!
Raum1807 OP
3Update Hey guys! to
Raum1807 OP
2(quote) Fixed :D /c/54570/
sorcio46
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 2/7
Overview
I. PreparationII. Installation of the required packagesIII. Installing JavaIV. The sourcesV. Building the ROMVI. Rebuilding with newest sources
I. Preparation
Things you need for building:
A computerAn internet connectionAn open mindTime
Patience
First of all, you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 13.10 64-bit.
Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for theterminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't beany problem.
IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!
II. Installation of the required packages (Ubuntu 13.10 64-bit)
Install packages:
Code:
$ sudo apt-get install bison build-essential curl flex \g++-multilib gcc-multilib git-core gnupg gperf \lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \libesd0-dev libncurses5-dev libsdl1.2-dev \libwxgtk2.8-dev libxml2 libxml2-utils lzop \openjdk-6-jdk openjdk-6-jre pngcrush schedtool \squashfs-tools xsltproc zip zlib1g-dev
III. Installing Java
You need a version 6 Java Development Kit for building CM11.0. Usually, the SUN JDK 6 is recommended. But there isanother way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need toconfigure your Java installation.
Check your Java version:
Code:
$ java -version
Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:
Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
If they are pointing to the wrong versions you have to change that to OpenJDK6.
Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac $ sudo update-alternatives --config java $ sudo update-alternatives --config javaws $ sudo update-alternatives --config javadoc $ sudo update-alternatives --config javah $ sudo update-alternatives --config javap $ sudo update-alternatives --config jar
That's it.
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 3/7
IV. The sources
Install repo:
Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin$ PATH=~/bin:$PATH$ cd ~/bin$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo$ chmod a+x ~/bin/repo
Create the working directory:
Code:
$ mkdir ~/cm11$ cd ~/cm11
Initialize Repo:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
and enter your credentials.
Download the sources:
Code:
$ repo sync
Wait until it's finished - takes some time to download the hefty 12 GB of source code!
Have a break, have a KitKat!
If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threadsautomatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:
First get two missing repositories for the Nexus 4 by running
Code:
$ breakfast mako
Then create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to pressCtrl-H in your file manager.
Use this code
Code:
$ gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Update: Branch revision is now cm-11.0
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 4/7
REPLY
Ads by Google
Update: Branch revision is now cm-11.0Paste the following lines to the editor
Code:
Save the file.
Run
Code:
$ repo sync
again to get the files needed.
Download the necessary prebuilts from cyanogenmod by running
Code:
$ cd ~/cm11/vendor/cm$ . get-prebuilts$ croot
And you're done!
V. Building the ROM
Now build it:
Code:
$ brunch mako
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more onolder and slower machines.
Update 20131108: The errors from 20131106 are gone now. If you made the changes revert them, sync the repo andthen brunch again. There is no need to edit the source at the moment.
CLICK TO SHOW CONTENT
When everything worked as it should you will find your new ROM-image in ~/cm11/out/target/product/mako
It is called cm-11-DATE-UNOFFICIAL-mako-zip. You can flash it via CWM/TWRP as usual.
VI. Rebuilding with newest sources
Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm11$ repo sync$ . build/envsetup.sh$ brunch mako
Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing oldparts that haven't changed.
Happy building!
The Following 76 Users Say Thank You to Raum1807 For This Useful Post: [ Click to Expand ]
advertisement
xda-developers Download Mobile SoftwareFree Mobile Manager Software. Easy File Transfer. Download Now ! mobogenie.com/mobile-software
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 5/7
6th November 2013, 08:03 PM #2
REPLY
6th November 2013, 08:32 PM (Last edited by hansichen123; 6th November 2013 at 09:37 PM.) #3
REPLY
6th November 2013, 08:43 PM (Last edited by micku7zu; 6th November 2013 at 08:44 PM.) Reason: I misspelled "but"
#4
REPLY
6th November 2013, 08:56 PM #5
Raum1807
Senior Member - OP
Thanks Meter 572
Posts: 233
Join Date: Jul 2012
Reserved
Reserved
The Following 7 Users Say Thank You to Raum1807 For This Useful Post: [ Click to Expand ]
hansichen123
Senior Member
Thanks Meter 24
Posts: 139
Join Date: Mar 2013
Nice Tutorial, thank you for the work
Now i have to organize a linux-computer... :/
edited to linux, my brain is out of order today...
micku7zu
>
Member
Thanks Meter 75
Posts: 66
Join Date: Oct 2010
Location: Marghita
MORE INFO
DONATE TO ME
Thank you for your post. I knew how to compile but I was lazy to compile for myself any rom until now. I planned to wait untilsomeone will post it, but your post just got me excited and I will compile.
Thank you for your instructions and all. Good luck!
B4tnam
>
Member
Thanks Meter 4
Posts: 33
Join Date: Apr 2012
Location: Adrian, Michigan
MORE INFO
This is what I keep getting...
bruce@BatComputer-Main:~/cm11$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0bash: /home/bruce/bin/repo: Permission denied
TRENDING IN THEMER...
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 6/7
REPLY
6th November 2013, 09:04 PM #6
REPLY
6th November 2013, 09:05 PM #7
REPLY
6th November 2013, 09:07 PM #8
REPLY
6th November 2013, 09:10 PM #9
Device: 16GB Nexus 4 (Mako)ROM: Carbon Nightlies
Kernel: Ultimate Hells-CoresRecovery: TWRP 2.6.3.0
My Website: JDiesel
Imperticus
>
Recognized Contributor
Thanks Meter 1039
Posts: 1,093
Join Date: Jan 2011
MORE INFO
DONATE TO ME
Quote:
Originally Posted by B4tnam
bruce@BatComputer-Main:~/cm11$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0bash: /home/bruce/bin/repo: Permission denied
try chmod a+x /home/bruce/bin/repo
Nexus 4LG Optimus 2XHTC HeroMy Github
The Following User Says Thank You to Imperticus For This Useful Post: [ Click to Expand ]
Raum1807
Senior Member - OP
Thanks Meter 572
Posts: 233
Join Date: Jul 2012
Quote:
Originally Posted by hansichen123
Nice Tutorial, thank you for the work
Now i have to organize a linux-computer... :/
Gesendet von meinem Transformer Pad mit Tapatalk 4
edited to linux, my brain is out of order today...
If you have a quite new PC running Windows, you could use a virtual machine to install Linux ontop of your Windowsinstallation. Have a look at VirtualBox for example. It's free. https://www.virtualbox.org/
The Following User Says Thank You to Raum1807 For This Useful Post: [ Click to Expand ]
Imperticus
>
Recognized Contributor
Thanks Meter 1039
Posts: 1,093
Join Date: Jan 2011
MORE INFO
DONATE TO ME
@Raum1807 How's cm11? What features have been implemented so far?
Nexus 4LG Optimus 2XHTC HeroMy Github
micku7zu
Member
Thanks Meter 75
Posts: 66
Join Date: Oct 2010
Location: Marghita
Quote:
Originally Posted by B4tnam
bruce@BatComputer-Main:~/cm11$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0bash: /home/bruce/bin/repo: Permission denied
Of course, because you didn't hit the thanks button. (joking, but of course, just press it now)
Your problem is with folder permissions. I don't know how you created the folders but somehow you just don't have enoughpermisions now.
12/8/2013 [GUIDE CM11] How to build your own CyanogenMod 11.0 ROM from sources for the Nexus 4 - xda-developers
http://forum.xda-developers.com/showthread.php?t=2515305 7/7
REPLY
6th November 2013, 09:29 PM #10
REPLY
Ads by Google
Search this thread
Previous Thread | Next Thread
More Info: Contact | Rules | Change Log | Suggest Content | Privacy Policy | XDA App
Copyright xda-developers. Powered by Searchlight 2013 Axivo Inc. Hosted by Leaseweb.
>
Location: Marghita
MORE INFO
DONATE TO ME
permisions now.
Try to:chmod a+x /home/bruce/bin/repo
The Following 2 Users Say Thank You to micku7zu For This Useful Post: [ Click to Expand ]
sjoerd0301
>
Senior Member
Thanks Meter 82
Posts: 185
Join Date: Oct 2011
Location: hengelo
MORE INFO
Bah my linux box broke.. @op Can you release the cm11 build you made?
Sent from my AOSP on Mako using Tapatalk
advertisement
xda-developers Mobile App MonetizationGet More Than 90% Fill Rate and $5 eCPM. Sign up with Vserv Today! www.vserv.mobi/Developer
The Following User Says Thank You to sjoerd0301 For This Useful Post: [ Click to Expand ]
1 2 3 11 > >> Page 1 of 25
> Google Nexus 4 > Nexus 4 General > [GUIDE CM11] How to build your own
CyanogenMod 11.0 ROM from sources for the Nexus 4
XDA Developers was founded by developers, for developers. It is
now a valuable resource for people who want to make the most of
their mobile devices, from customizing the look and feel to adding
new functionality. Are you a developer?
-- XDA 2013 Beta
+ POST REPLY VIEW FIRST UNREADSUBSCRIBE