Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,101 Members 42,792 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to build crDroid 4.4 KitKat Rom

Tip us?
 
elia222
Old
#1  
elia222's Avatar
Recognized Contributor - OP
Thanks Meter 2,562
Posts: 1,057
Join Date: Feb 2012

 
DONATE TO ME
Default [GUIDE] How to build crDroid 4.4 KitKat Rom

Since I sold my Galaxy Nexus and I won't continue to build crDroid rom for it, I made this step by step guide to build 4.4 KitKat crDroid rom running on this device from Cristiano Matos and cm's github.

This guide is meant for Ubuntu 13.10 64 bit. 32 Bit won't work.
If you want to use another ubuntu version, some things might be a little different. Just search on xda and you will find all the instructions that you need to complete the setup.

DISCLAMER
Although the procedures in this guide were tested on my pc/phone and produced a working build for my Galaxy Nexus, I take no responsibility for any consequences derived from their use.


1) SET UP THE BUILD ENVIRONMENT

Remove openJDK and install Java 6 jdk. Open a terminal and type:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This will uninstall openJDK.

Code:
sudo add-apt-repository ppa:webupd8team/java
Adds a PPA to your system, needed to download java.

Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Download and installs java!

To make sure the correct version of Java is activated, run the following at the Terminal prompt:
Code:
java -version
You should see something like that:

java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

Now type:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python lzop
This will install the needed packages.

When done, do this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Now, install the repo binary:
Code:
mkdir ~/bin && curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo && chmod a+x ~/bin/repo
Edit .bashrc:
Code:
sudo nano ~/.bashrc
At the bottom of the file, add the following line:
Code:
export PATH=~/bin:$PATH
Save it (In nano type Ctrl-O and then Enter, then Ctrl-X to exit back to a prompt).
Restart bash:
Code:
source ~/.bashrc
2) DOWNLOAD THE SOURCES:

Code:
mkdir ~/cyanogenmod
cd ~/cyanogenmod
This creates a folder named "cyanogenmod" and opens it.

Initialize the repo:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Open cyanogenmod folder, press ctrl+H to show hidden files, open .repo, open local_manifests and edit roomservice.xml (If it isn't present create it) to be like this one:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote fetch="http://github.com/" name="gh" revision="master" />
  <remote fetch="https://github.com/TheMuppets/" name="TheMuppets" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="gh" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_imgtec" path="vendor/imgtec" remote="gh" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_broadcom" path="vendor/broadcom" remote="gh" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_invensense" path="vendor/invensense" remote="gh" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_widevine" path="vendor/widevine" remote="gh" revision="cm-11.0" />
  <project name="TheMuppets/proprietary_vendor_nxp" path="vendor/nxp" remote="gh" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_samsung_maguro" path="device/samsung/maguro" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_samsung_toroplus" path="device/samsung/toroplus" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_samsung_toro" path="device/samsung/toro" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_kernel_samsung_tuna" path="kernel/samsung/tuna" remote="github" revision="cm-11.0" />
  <project name="CyanogenMod/android_device_samsung_tuna" path="device/samsung/tuna" remote="github" revision="cm-11.0" />
  <remove-project name="CyanogenMod/android_packages_apps_Dialer" />
  <project name="cristianomatos/android_packages_apps_Dialer" path="packages/apps/Dialer" remote="github" revision="cm-11" />
  <remove-project name="CyanogenMod/android_packages_apps_InCallUI" />
  <project name="cristianomatos/android_packages_apps_InCallUI" path="packages/apps/InCallUI" remote="github" revision="cm-11" />
  <remove-project name="CyanogenMod/android_packages_services_Telephony" />
  <project name="cristianomatos/android_packages_services_Telephony" path="packages/services/Telephony" remote="github" revision="cm-11" />
  <remove-project name="CyanogenMod/android_frameworks_base" />
  <project name="cristianomatos/android_frameworks_base" path="frameworks/base" remote="github" revision="cm-11" />
  <remove-project name="CyanogenMod/android_packages_apps_Settings" />
  <project name="cristianomatos/android_packages_apps_Settings" path="packages/apps/Settings" remote="github" revision="cm-11" />
</manifest>
Download time!
Code:
repo sync
It will download about 10gb of data, so be patient!

Download the prebuilts:
Code:
~/cyanogenmod/vendor/cm/get-prebuilts

3) BUILD THE ROM:

Code:
. build/envsetup.sh && brunch name_of_device
Where "name_of_device" is maguro, toro or toroplus, depending for which ersion you want to build.
It will take some time (on my pc with 3GHz dual core and 4gb of ram about 2h30min)

If everything goes right the flashable zip of the rom will be in cyanogenmod/out/target/product/name_of_device/cm-11-XXXXXXXXX-UNOFFICIAL-name_of_device.zip

4) Install the rom on your phone!
-------------------------------------------------------------------------------------------------------------

Some other tips:

When you want to download latest crdroid/cm changes open a new terminal and type:
Code:
cd cyanogenmod
repo sync
When you want to delete the build products (because something has gone wrong or you want to make a new build):
Code:
make clean
Then:
Code:
. build/envsetup.sh && brunch name_of_device
To start building again.
The Following 8 Users Say Thank You to elia222 For This Useful Post: [ Click to Expand ]
 
elia222
Old
#2  
elia222's Avatar
Recognized Contributor - OP
Thanks Meter 2,562
Posts: 1,057
Join Date: Feb 2012

 
DONATE TO ME
Reserved
The Following 2 Users Say Thank You to elia222 For This Useful Post: [ Click to Expand ]
 
dadenet
Old
#3  
dadenet's Avatar
Senior Member
Thanks Meter 48
Posts: 159
Join Date: Apr 2013
Location: Milano
Simply perfect bro!

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
 
kezn715
Old
#4  
kezn715's Avatar
Senior Member
Thanks Meter 172
Posts: 365
Join Date: Apr 2012
Location: Malaysia , Penang
Thanks for this useful tutorial, awesome #bow

Sent from my Galaxy Nexus using Tapatalk
 
mnajem
Old
(Last edited by mnajem; 5th April 2014 at 11:04 AM.)
#5  
Senior Member
Thanks Meter 709
Posts: 667
Join Date: May 2011
Location: Bagan Datoh, Perak

 
DONATE TO ME
--deleted--
Git : https://github.com/raden

Device : Google Nexus 5 (hammerhead)
 
triplek
Old
#6  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Apr 2014
Thanks for this useful tutorial
 
voidz777
Old
#7  
Junior Member
Thanks Meter 0
Posts: 4
Join Date: Sep 2013
Thanks for this useful tutorial.
I can make other unofficial builds in your favor.
 
linezero
Old
(Last edited by linezero; 26th August 2014 at 05:14 AM.)
#8  
linezero's Avatar
Senior Member
Thanks Meter 78
Posts: 497
Join Date: Sep 2010
Location: Male'
@elia222 any idea why I get this when I do a repo sync:

Code:
Fetching project platform/external/scrypt
Fetching project CyanogenMod/android_external_elfutils
Fetching project CyanogenMod/android_external_svox
Fetching projects:  66% (307/465)  Fetching project CyanogenMod/android_external_grub
Fetching project platform/external/sfntly
error: Cannot fetch cristianomatos/android_frameworks_base
Fetching project platform/prebuilts/runtime
error: Cannot fetch cristianomatos/android_packages_apps_Settings

error: Exited sync due to fetch errors

Past Devices | HTC Wildfire -> HTC Incredible S -> HTC One X -> Samsung Galaxy S3 -> Nexus 4 -> Nexus 5 / Neuxs 7 (2013) |
HIT 'THANKS' IF I'VE HELPED YOU
 
elia222
Old
#9  
elia222's Avatar
Recognized Contributor - OP
Thanks Meter 2,562
Posts: 1,057
Join Date: Feb 2012

 
DONATE TO ME
Quote:
Originally Posted by linezero View Post
@elia222 any idea why I get this when I do a repo sync:

Code:
Fetching project platform/external/scrypt
Fetching project CyanogenMod/android_external_elfutils
Fetching project CyanogenMod/android_external_svox
Fetching projects:  66% (307/465)  Fetching project CyanogenMod/android_external_grub
Fetching project platform/external/sfntly
error: Cannot fetch cristianomatos/android_frameworks_base
Fetching project platform/prebuilts/runtime
error: Cannot fetch cristianomatos/android_packages_apps_Settings

error: Exited sync due to fetch errors
Probably Cristiano Matos has changed/removed something on his github repositories. I didn't followed the project recently, so your best bet would be to contact him to solve the issue.
 
CristiS2012
Old
#10  
Junior Member
Thanks Meter 1
Posts: 19
Join Date: Jan 2013
Location: Bucharest
So if we re-initialize repo, would that solve the fetch errors?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes