[Samsung Captivate Glide] dman3285:
Ok, I've had alot of questions about how to compile CM10 from source and see alot of people doing it all different ways.

This tutorial will allow you to sync, compile, and build CM10 from source for the Captivate Glide i927.

This method is easy and User friendly and tested on Ubuntu 10.04, 12.04, and Linux Mint 13. Now I use a 100% Linux system(no windows), but unless you want to reformat your PC to ext4 and reformat it to run Linux, I advise using VirtualBox.

You can download VirtualBox here: https://www.virtualbox.org/wiki/Downloads

You can download Ubuntu here: http://www.ubuntu.com/download/desktop

(Download 12.04 not 12.10)

Getting started

After you setup your virtual machine open up a terminal and run as root.

To do this type in terminal:

sudo bash

Now it will ask you for your password(the one you used to set up ubuntu) You wont see it doing anything as you type it, but its taking it. Then after you enter your password hit enter. Now your a root user.

Now we need to open our home folder as root also. Why? Because in linux you cannot make changes, move files, delete or edit files in your home folder unless you are root. Trust me, I've been a linux user for years.

To Open your home folder as root type in terminal:

nautilus

Ok, now open a second terminal to do our real work in...

Install Java

Ok, this will permanently install java into your machine. After you open a second terminal, run it as root also as stated above.

Then type:

wget https://github.com/flexiondotorg/oab-java6/raw/0.2.6/oab-java.sh -O oab-java.sh

Hit enter and watch the magic.

Next:

chmod +x oab-java.sh
sudo ./oab-java.sh
sudo apt-get install sun-java6-jdk

This may take a while. When finished we are now ready to install our required packages to build android.

Type in terminal:

sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils pngcrush schedtool xsltproc zlib1g-dev:i386

This will work for 10.04 alone, no other packages needed.

But, If your running 12.04(which you should) add this after the above packages install

sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

This will also take a while, so just be patient!

Installing The repository

Now we need to install the repo command script that will initialize the repo.

Type in terminal:

mkdir -p ~/bin
mkdir CM10
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

Add repo to your path

vi ~/.bashrc

This will open the bashrc file. Scroll all the way to the bottom and enter this:

export PATH=$PATH:~/bin

Initialize the repo and sync repo

cd CM10
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync

This will take a long time depending on your internet speed.

When finifshed we now need to clone the device trees.

go into your CM10 directory and cd into device. then in terminal type:

git clone git://github.com/The-Covenant/android_device_samsung_i927.git samsung/i927

Ok, you see this at the end of our clone command? (samsung/i927)

This will automatically make the proper folders exactly where they need to go. No need for moving or renaming.

Next clone the kernel source. Cd back into your CM10 directory and type in terminal:

git clone git://github.com/The-Covenant/android_kernel_samsung_i927.git kernel/samsung/i927

This clone may take a while, the kernel source is pretty large.

Now we need to clone the proprietary files for the device.Type in terminal:

git clone git://github.com/The-Covenant/proprietary_vendor_samsung.git vendor/samsung

Now lets Build!

Cd back into your CM10 source, if your not already, and type:

vendor/cm/get-prebuilts

this will download the prebuilt Term.apk and library

then the build command:

. build/envsetup.sh && brunch i927

This should build from start to finish and make a flashable zip in out/target/product/i927

This tutorial is for CM10, not CM10.1.

CM10.1 is a different beast and I havent pushed the CM10.1 device tree up yet, but as soon as I do, I will update this tutorial for building 4.2.1.

Enjoy!

Andoid SDK

The android SDK is not necessary to build android, but having adb is.

You can download it here and follow intstall instructions.

[URL]http://developer.android.com/sdk/index.html[/URL]