Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more
Post Reply

[GUIDE] How to build crDroid 4.4 KitKat Rom

11th January 2014, 10:40 AM   |  #1  
elia222's Avatar
OP Recognized Contributor
Thanks Meter: 2,573
 
1,073 posts
Join Date:Joined: Feb 2012
Donate to Me
More
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: [ View ]
11th January 2014, 10:41 AM   |  #2  
elia222's Avatar
OP Recognized Contributor
Thanks Meter: 2,573
 
1,073 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Reserved
The Following 2 Users Say Thank You to elia222 For This Useful Post: [ View ]
11th January 2014, 12:33 PM   |  #3  
dadenet's Avatar
Senior Member
Flag Milano
Thanks Meter: 48
 
159 posts
Join Date:Joined: Apr 2013
Simply perfect bro!

Inviato dal mio Galaxy Nexus utilizzando Tapatalk
11th January 2014, 08:14 PM   |  #4  
kezn715's Avatar
Senior Member
Flag Malaysia , Penang
Thanks Meter: 183
 
381 posts
Join Date:Joined: Apr 2012
More
Thanks for this useful tutorial, awesome #bow

Sent from my Galaxy Nexus using Tapatalk
5th April 2014, 08:26 AM   |  #5  
Senior Member
Flag Bagan Datoh, Perak
Thanks Meter: 726
 
678 posts
Join Date:Joined: May 2011
Donate to Me
More
--deleted--
Last edited by mnajem; 5th April 2014 at 11:04 AM.
6th April 2014, 09:05 AM   |  #6  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Apr 2014
Thanks for this useful tutorial
19th April 2014, 03:28 AM   |  #7  
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Sep 2013
More
Thanks for this useful tutorial.
I can make other unofficial builds in your favor.
26th August 2014, 04:55 AM   |  #8  
linezero's Avatar
Senior Member
Flag Male'
Thanks Meter: 84
 
517 posts
Join Date:Joined: Sep 2010
More
@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
Last edited by linezero; 26th August 2014 at 05:14 AM.
26th August 2014, 07:29 PM   |  #9  
elia222's Avatar
OP Recognized Contributor
Thanks Meter: 2,573
 
1,073 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by linezero

@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.
27th August 2014, 02:15 PM   |  #10  
Junior Member
Flag Bucharest
Thanks Meter: 1
 
23 posts
Join Date:Joined: Jan 2013
More
So if we re-initialize repo, would that solve the fetch errors?

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes


Top Threads in Galaxy Nexus General by ThreadRank