[HOWTO] Build CM10.1 for N7000, Nexus 4 and 7, Note II and Note II LTE

Search This thread

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
First of all, why would you want to do it when there are Nightlies to be dowloaded and flashed?

Let me quote Rec Dev fattire here:


Off the top of my head...

  • You never, ever have to wait for a nightly
  • You can add or remove as-yet uncommitted features with ease.
  • You learn how Android works under the hood
  • You learn how to use Linux
  • You'll learn how to use git
  • You may, even accidentally, pick up a little C, Java, C++, and learn about the build system.
  • You can personalize Android-- make your own tweaks, modules, graphics, add or remove projects etc. In other words, you have control over every aspect of your device's functionality. Your build is custom to you.
  • You can audit the code for potential security issues such as back doors or trojans (as opposed to just trusting a random person who posts a build). Since CM10 source is open, you can examine every commit, and there are many eyes looking at the code. (does not apply to proprietary blobs, but these are pulled from your device, so you have and are using them already)
  • You can contribute features/fixes back upstream
  • You can start ports to other as-yet-unsupported devices (start by copying folders from similar devices to devices/manufacturer/model)
  • You come to really understand that Android phones and tablets are full-fledged general-purpose computers just like laptops and desktops.
  • AAAAND....you get huge bragging rights

The extent to which you delve into the above is entirely up to you. The walkthrough is just an introduction to that world. Some people will build once and never do it again... but others will start to tinker and make changes to their own build and want to share them with others, and soon some will start making contributions back to official CM10 upstream... or port to new devices... and by fixing bugs and all this... everyone benefits.

Plus...

  • It's fun.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Hardware Requirements

You'll need a computer configuration that is not too shabby to pull this off; also you'll need a decent Interweb connection to download all that is needed.

Here are some hardware examples:

Utacka

Ahalford

Anti

Me

In other words, you need to have a box capable of doing some crunching. The better the PC, the faster the compile and vice-versa.


As for the Internet connection, you have to pull about 13 Gb of tiny files in the first CM10.1 sync, and additional 2-3 Gbs in your second sync.

Trying to do it on a 512Kb/s connection is an exercise in futility.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Setting up the Build Environment

First things first: you need to download and install 64-bit version of Ubuntu 12.04. A 32-bit one won't cut it.
Installed it? Good, let's move on.

Now do a system update; click that little switch icon in the top right hand corner and you'll get a menu. Launch Update Manager and install everything it finds.

Now that your Ubuntu is up to speed you need to download and install some more stuff. Launch the terminal (Ctrl + Alt + T).

Copy the below code and paste it (right-click and paste or Shift + Insert, Ctrl + V doesn't work) in the terminal, hit enter.

Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libxml2-utils

If 'lib32ncurses5-dev' fails, delete it from the list, install everything else.

Now you need to add the following repos, again copy/paste each line into the terminal, hit enter. Repeat for each line of the code below.

Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
Code:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
Code:
sudo apt-get update

Now you are going to install Synaptic.

Code:
sudo apt-get install synaptic

Done? Good.

Click the 'Dash Home' button (top left hand corner of your desktop), find and launch Synaptic Package Manager. Search for 'Sun Java6 JDK' and install it will all the dependencies except sun-java6-demo and sun-java6-doc.

Now go to http://developer.android.com/sdk/index.html and download the linux version of the Android SDK. It provides the API libraries and developer tools necessary to build. When your download is done, open it with Archive Manager, extract it somewhere, and move the extracted folder to your Home folder. Rename it to 'SDK' for simplicity.

Now you need to download and install Android SDK Platform Tools. Use file manager to navigate to your SDK sub-folder Tools. Find 'android' and double-click to run it. You'll be asked what you want to download. Choose the 'Platform Tools' and the Android 4.1.2 SDK Level 16 and the Android 4.2 SDK level 17 Dev tools and hit install. Let it download; it might take some time, depending on your download speed.

Now the time is ripe for you to setup your Android repos. Copy/paste the following commands into the terminal, hit enter after each one.

Code:
mkdir -p ~/bin
Code:
mkdir -p ~/cm10.1
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
export PATH=~/bin:$PATH

You have to reboot after this for changes to take effect.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Initial Repo, local_manifest

Once reboobed, open the terminal once again and do this:

Code:
cd cm10.1

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

repo sync

Your initial sync will take some time. After it is is done, go to your cm10.1/.repo folder (/.repo is hidden, so press Ctrl + H in your file manager for it to show up). Create a
subfolder called local_manifests in /.repo. Then create a blank document called roomservice.xml in /.repo/local_manifests. Copypasta™ the below code into roomservice.xml,
save it, close the document.


<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="cm-10.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
</manifest>


NOTE: All in the above posts needs to be done only once, prior to compiling your first build.

For all your subsequent builds you'll have to do just the steps listed in the next posts
.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Start the Build

It's time for you to do another repo sync to pull Samsung device-specific stuff.

Code:
repo sync

This sync is going to be considerably shorter than the first one. After it is done, it's time for you to start the build.


Code:
~/cm10.1/vendor/cm/get-prebuilts

. build/envsetup.sh

export USE_CCACHE=1

prebuilts/misc/linux-x86/ccache/ccache -M 50G

brunch n7000


If everything goes right, you should see this at the end of the compile:



87872307.png




Your cm10.1 rom zip will be in cm10.1/out/target/product/n7000 folder.



This is how it looks when the build gets going:


 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Subsequent Builds

You'll want to do another build tomorrow once your first one has gone through fine.

There are two ways you can go about it.

#1: do a

Code:
cd cm10.1

repo sync

export USE_CCACHE=1

~/cm10.1/vendor/cm/get-prebuilts

. build/envsetup.sh

brunch n7000

The build system should notice which source files have changed and need rebuilding, and should only build the new stuff. This is what you might want to do when there were no major changes in the merged commits here: http://review.cyanogenmod.org/#/q/status:merged,n,z

However, what I always do and would always recommend

#2:

Code:
cd cm10.1

make clean

repo sync

~/cm10.1/vendor/cm/get-prebuilts

. build/envsetup.sh

brunch n7000

'make clean' command will delete your whole /out folder, and your new build will start from scratch. Instead of 'make clean' you can also use 'make clobber'; the difference between the commands is explained here.


There is a way to completely automate your compiling process à la CyanogenMod's Jenkins. You can learn how from AndroidSlave here: http://xdaforums.com/showthread.php?p=46110939
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Cherry Picking

***Cherry picking from CM Gerrit***

This is one of the perks of compiling CM10.1 yourself. Official nightlies have a lot of features, but there's also a lot of stuff waiting for a review on Gerrit.

You can follow the commits waiting to be reviewed and merged into the main repo here: http://review.cyanogenmod.org/#/q/status:reviewed,n,z

You can cherry-pick anything from the upcoming features and incorporate it into your Rom before the official CM10.1 does the same.

Let's say that you want to have this commit before it becomes merged: http://review.cyanogenmod.org/30878

The commit says:
Code:
Project	CyanogenMod/android_packages_apps_LockClock

It's quite simple to do that. Fire up the Terminal (Ctrl + Alt + T) and navigate to your LockClock folder.

Code:
cd cm10.1/packages/apps/LockClock

In other words you must be in the same folder as stated in 'Project' for cherry-picking to work.

Now minimize the terminal (don't close it) and switch to the Gerrit page in your browser.

http://review.cyanogenmod.org/#/c/30878/

Click on cherry-pick button here.

55646801.png


Then click several times on the little clipboard icon at the end of the cherry-pick URL.

75332855.png


This automagically copies the cherry-pick URL into your clipboard. Now, go back to your terminal, paste the cherry-pick URL in it and hit enter.

That is all: the commit will get pulled and incorporated into your local repo. You are ready to compile a build which will contain the feature you have just cherry-picked.


***Cherry-picking from Github***

http://xdaforums.com/showpost.php?p=42486858&postcount=449
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
How to compile CM10.1 for Nexus 4

If you have never built CM10.1 then you need to do everything from post #3 here, and this part


Code:
cd cm10.1

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

repo sync

from post #4.


After the initial repo sync is done, now comes the Nexus 4 specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.

If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.


<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="TheMuppets/proprietary_vendor_lge.git" path="vendor/lge" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_lge_mako" path="device/lge/mako" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/lge-kernel-mako" path="kernel/lge/mako" remote="github" revision="jellybean" />

</manifest>

Now do the second repo sync to pull Nexus 4 specific stuff.

Code:
repo sync

Do the following after the second sync has gone through.

Code:
~/cm10.1/vendor/cm/get-prebuilts


Now it's time to start the build.


Code:
. build/envsetup.sh

export USE_CCACHE=1

brunch mako

That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/mako folder.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
How to compile CM10.1 for Note II LTE (t0lte)

If you have never built CM10.1 then you need to do everything from post #3 here, and this part


Code:
cd cm10.1

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

repo sync

from post #4.


After the initial repo sync is done, now comes the Note II LTE specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.

If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.


<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_t0lte" path="device/samsung/t0lte" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />

</manifest>

Note: you might already have some of the lines in your local_manifest.xml if you have compiled a build for n7000. If that's the case, skip adding the lines you already have.

Now do the second repo sync to pull Note II specific stuff.

Code:
repo sync

Do the following after the second sync has gone through.

Code:
~/cm10.1/vendor/cm/get-prebuilts


Now it's time to start the build.


Code:
. build/envsetup.sh

export USE_CCACHE=1

brunch t0lte

That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/t0lte folder.
 
Last edited:

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
Discarding Failed or Unwanted Cherry Picks

If you want to get rid of something you have cherry-picked this is what needs to be done.

We'll stick to the cherry-picking example described in the previous post.

Start the Terminal and navigate to the folder containing your unwanted cherry-pick, in this case LockClock.

Code:
cd cm10.1/packages/apps/LockClock

From here you need to persuade Git to discard the cherry-picked thing. Do this:

Code:
git reset --hard

And that is that.

However, sometimes git has its quirks and doesn't want to do what it's been told. If that is the case, you'll get warnings when doing your next repo sync.
If that happens, repeat the two steps from above and delete the top folder where your cherry-pick was located. In this case, it is /packages.

Do the repo sync again and the folder will be redownloaded and stored on your machine in pristine state.
 
Last edited by a moderator:
  • Like
Reactions: tafat

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
How to compile CM10.1 for Nexus 7

If you have never built CM10.1 then you need to do everything from post #3 here, and this part


Code:
cd cm10.1

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

repo sync

from post #4.


After the initial repo sync is done, now comes the Nexus 7 specific bit. Do this:


Code:
~/cm10.1/vendor/cm/get-prebuilts

. build/envsetup.sh

breakfast grouper

This will download the device specific configuration and kernel source for your device.

Now it's time to extract proprietary blobs from your tablet.

Go to your grouper CM10.1 folder.

Code:
cd cm10.1/device/asus/grouper

Connect your Nexus 7 to the computer using USB cable. Make sure that adb debugging is on in Developer's Options. Now paste this into the terminal:

Code:
./extract-files.sh

If you get adb errors, that means that adb is not in the path of execution. Close the terminal, start your file manager and when in your /home folder press Ctrl + H for hidden stuff to appear. Open .bashrc file with Gedit and add the following line at the end of the code:

Code:
export PATH=${PATH}:/<your path to sdk>/platform-tools

(My <path to sdk> looks like this: export PATH=${PATH}:/home/chasmodo/android-sdk/sdk/platform-tools)

Save the file, open a new terminal window, go to cd cm10.1/device/asus/grouper and repeat

Code:
./extract-files.sh

The adb command should now be available and your blobs pulled. After this has been done go back to cm10.1 folder and start the build.

Code:
cd ~/cm10.1 (or croot, same thing)

export USE_CCACHE=1

brunch grouper

After the compile goes through, your CM10.1_UNOFFICIAL_grouper.zip will be waiting for you in cm10.1/out/target/product/grouper folder.
 
Last edited:
  • Like
Reactions: tafat

chasmodo

Senior Member
Dec 28, 2011
12,403
41,133
Novi Sad
How to compile CM10.1 for Note II (n7100)

If you have never built CM10.1 then you need to do everything from post #3 here, and this part


Code:
cd cm10.1

repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

repo sync

from post #4.


After the initial repo sync is done, now comes the Note II specific bit. As stated before, go to your cm10.1/.repo folder and create a blank document called local_manifest.xml. Paste the below code into local_manifest.xml, save it, close the document.

If you already have local_manifest.xml with n7000 stuff in it, then just add all the lines beginning with <project name= from below to it, save and exit Gedit.


<?xml version="1.0" encoding="UTF-8"?>

<manifest>

<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_device_samsung_n7100" path="device/samsung/n7100" remote="github" revision="cm-10.1" />

<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />

</manifest>

Note: you might already have some of the lines in your local_manifest.xml if you have compiled a build for n7000. If that's the case, skip adding the lines you already have.

Now do the second repo sync to pull Note II specific stuff.

Code:
repo sync

Do the following after the second sync has gone through.

Code:
~/cm10.1/vendor/cm/get-prebuilts


Now it's time to start the build.


Code:
. build/envsetup.sh

export USE_CCACHE=1

brunch n7100

That's it. Wait for the build to get compiled and flash your CM10.1_UNOFFICIAL_mako.zip from cm10.1/out/target/product/n7100 folder.
 
Last edited:

antiochasylum

Inactive Recognized Contributor
Re: [HOWTO] Build CM10.1 for N7000

I build on the first gen i7 @ 2.0ghz, 8gigs of ram, 120gig SSD, clean compile is about 30-35 min.

My next machine will be a i7 @ 3.4, 16gigs of ram and 250gig SSD

I suggest a minimum of an i3 with 8gigs of ram, otherwise you'll be compiling for hours.

Then reason I suggest that as a minimum is because if for instance you cherry pick something, that breaks the build, you'll need to revert that pick and re build. It could be a very time consuming process.
 

happiboi

Senior Member
Aug 27, 2010
762
246
OnePlus 8 Pro
This is great~!

i'm going to have to try this out haha... ubuntu in a VM environment on an i7 + 256gb ssd

hope you're up for questions guys haha :silly:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 83
    First of all, why would you want to do it when there are Nightlies to be dowloaded and flashed?

    Let me quote Rec Dev fattire here:


    Off the top of my head...

    • You never, ever have to wait for a nightly
    • You can add or remove as-yet uncommitted features with ease.
    • You learn how Android works under the hood
    • You learn how to use Linux
    • You'll learn how to use git
    • You may, even accidentally, pick up a little C, Java, C++, and learn about the build system.
    • You can personalize Android-- make your own tweaks, modules, graphics, add or remove projects etc. In other words, you have control over every aspect of your device's functionality. Your build is custom to you.
    • You can audit the code for potential security issues such as back doors or trojans (as opposed to just trusting a random person who posts a build). Since CM10 source is open, you can examine every commit, and there are many eyes looking at the code. (does not apply to proprietary blobs, but these are pulled from your device, so you have and are using them already)
    • You can contribute features/fixes back upstream
    • You can start ports to other as-yet-unsupported devices (start by copying folders from similar devices to devices/manufacturer/model)
    • You come to really understand that Android phones and tablets are full-fledged general-purpose computers just like laptops and desktops.
    • AAAAND....you get huge bragging rights

    The extent to which you delve into the above is entirely up to you. The walkthrough is just an introduction to that world. Some people will build once and never do it again... but others will start to tinker and make changes to their own build and want to share them with others, and soon some will start making contributions back to official CM10 upstream... or port to new devices... and by fixing bugs and all this... everyone benefits.

    Plus...

    • It's fun.
    28
    Setting up the Build Environment

    First things first: you need to download and install 64-bit version of Ubuntu 12.04. A 32-bit one won't cut it.
    Installed it? Good, let's move on.

    Now do a system update; click that little switch icon in the top right hand corner and you'll get a menu. Launch Update Manager and install everything it finds.

    Now that your Ubuntu is up to speed you need to download and install some more stuff. Launch the terminal (Ctrl + Alt + T).

    Copy the below code and paste it (right-click and paste or Shift + Insert, Ctrl + V doesn't work) in the terminal, hit enter.

    Code:
    sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev libxml2-utils

    If 'lib32ncurses5-dev' fails, delete it from the list, install everything else.

    Now you need to add the following repos, again copy/paste each line into the terminal, hit enter. Repeat for each line of the code below.

    Code:
    sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
    Code:
    sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
    Code:
    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    Code:
    sudo apt-get update

    Now you are going to install Synaptic.

    Code:
    sudo apt-get install synaptic

    Done? Good.

    Click the 'Dash Home' button (top left hand corner of your desktop), find and launch Synaptic Package Manager. Search for 'Sun Java6 JDK' and install it will all the dependencies except sun-java6-demo and sun-java6-doc.

    Now go to http://developer.android.com/sdk/index.html and download the linux version of the Android SDK. It provides the API libraries and developer tools necessary to build. When your download is done, open it with Archive Manager, extract it somewhere, and move the extracted folder to your Home folder. Rename it to 'SDK' for simplicity.

    Now you need to download and install Android SDK Platform Tools. Use file manager to navigate to your SDK sub-folder Tools. Find 'android' and double-click to run it. You'll be asked what you want to download. Choose the 'Platform Tools' and the Android 4.1.2 SDK Level 16 and the Android 4.2 SDK level 17 Dev tools and hit install. Let it download; it might take some time, depending on your download speed.

    Now the time is ripe for you to setup your Android repos. Copy/paste the following commands into the terminal, hit enter after each one.

    Code:
    mkdir -p ~/bin
    Code:
    mkdir -p ~/cm10.1
    Code:
    curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    Code:
    chmod a+x ~/bin/repo
    Code:
    export PATH=~/bin:$PATH

    You have to reboot after this for changes to take effect.
    28
    Cherry Picking

    ***Cherry picking from CM Gerrit***

    This is one of the perks of compiling CM10.1 yourself. Official nightlies have a lot of features, but there's also a lot of stuff waiting for a review on Gerrit.

    You can follow the commits waiting to be reviewed and merged into the main repo here: http://review.cyanogenmod.org/#/q/status:reviewed,n,z

    You can cherry-pick anything from the upcoming features and incorporate it into your Rom before the official CM10.1 does the same.

    Let's say that you want to have this commit before it becomes merged: http://review.cyanogenmod.org/30878

    The commit says:
    Code:
    Project	CyanogenMod/android_packages_apps_LockClock

    It's quite simple to do that. Fire up the Terminal (Ctrl + Alt + T) and navigate to your LockClock folder.

    Code:
    cd cm10.1/packages/apps/LockClock

    In other words you must be in the same folder as stated in 'Project' for cherry-picking to work.

    Now minimize the terminal (don't close it) and switch to the Gerrit page in your browser.

    http://review.cyanogenmod.org/#/c/30878/

    Click on cherry-pick button here.

    55646801.png


    Then click several times on the little clipboard icon at the end of the cherry-pick URL.

    75332855.png


    This automagically copies the cherry-pick URL into your clipboard. Now, go back to your terminal, paste the cherry-pick URL in it and hit enter.

    That is all: the commit will get pulled and incorporated into your local repo. You are ready to compile a build which will contain the feature you have just cherry-picked.


    ***Cherry-picking from Github***

    http://xdaforums.com/showpost.php?p=42486858&postcount=449
    27
    Hardware Requirements

    You'll need a computer configuration that is not too shabby to pull this off; also you'll need a decent Interweb connection to download all that is needed.

    Here are some hardware examples:

    Utacka

    Ahalford

    Anti

    Me

    In other words, you need to have a box capable of doing some crunching. The better the PC, the faster the compile and vice-versa.


    As for the Internet connection, you have to pull about 13 Gb of tiny files in the first CM10.1 sync, and additional 2-3 Gbs in your second sync.

    Trying to do it on a 512Kb/s connection is an exercise in futility.
    23
    Initial Repo, local_manifest

    Once reboobed, open the terminal once again and do this:

    Code:
    cd cm10.1
    
    repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
    
    repo sync

    Your initial sync will take some time. After it is is done, go to your cm10.1/.repo folder (/.repo is hidden, so press Ctrl + H in your file manager for it to show up). Create a
    subfolder called local_manifests in /.repo. Then create a blank document called roomservice.xml in /.repo/local_manifests. Copypasta™ the below code into roomservice.xml,
    save it, close the document.


    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
    <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.1" />
    <project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-10.1" />
    <project name="CyanogenMod/android_device_samsung_n7000" path="device/samsung/n7000" remote="github" revision="cm-10.1" />
    <project name="CyanogenMod/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="cm-10.1" />
    <project name="CyanogenMod/android_kernel_samsung_smdk4210" path="kernel/samsung/smdk4210" remote="github" revision="cm-10.1" />
    <project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-10.1" />
    </manifest>


    NOTE: All in the above posts needs to be done only once, prior to compiling your first build.

    For all your subsequent builds you'll have to do just the steps listed in the next posts
    .