[Blade General] karthiknr:
I'm opening this thread as i myself came across certain problems during the compiling of Cyanogenmod7 for the ZTE Blade from Source. I'm not a developer of any sort and want to make this clear. I'm opening this thread in the General section as all can comment.

This thread may help people who want to make their own CM7 builds. This thread is based on Cyanogenmod's guide on compiling from source. I've added some extra commands for people who do not understand CM's guide very well as i didn't find it to be very transparent.

Firstly,this guide is written for the people who want to compile CM7 on a linux platform,especially Ubuntu as i'm writing this based on Ubuntu 11.10.

Secondly,this guide may not be perfect as i do not have extensive knowledge on Ubuntu. So,any recommendations will be highly appreciated.

Thirdly,thanks go to the entire CyanogenMod team without whom the blade wouldn't be what it is now. Also to Wbaw,for making the TPT procedure. And to all the Blade developers out there who're spending their precious time to help us.

Here we go..

Hardware Requirements:

- A minimum dual core pc, the more ram the better

- A working wifi connection or network connection

- Linux Operating System. Either 32-bit or 64-bit will work

Any time during the process if you need to type as Root,give the command,

sudo -i

A.Installing a few programs first.

The terminal is where we will be doing most work.

Open terminal and type the code under the given programs.

1.Python,rar,curl,git.

sudo apt-get install python rar curl git

2.Java

Setting up java is very important. You can download java from Ubuntu Software centre or through the terminal.

On Ubuntu's 10.10 and 11.10 variants,enabling the repository is important.

sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

After that,type the following.

sudo apt-get update

You may want to repeat previous commands again. To do so you can simply type "!!".

After that,type,

sudo apt-get install sun-java6-jdk

Certain people may face the problem in the form of an error saying:Package is not available or has another installation candidate. If you get an error like this, add this and try again,

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

sudo apt-get update

sudo apt-get install sun-java6-jdk

For us to compile Gingerbread,we need a Java version of "1.6.x"

To check the version,type,

java -version

We're done setting up Java.

3.Android SDK.

Download the Android SDK from here- http://developer.android.com/sdk/index.html

Extract it to your home folder.

Navigate to android-sdk-linux/tools and open "android" and run it in terminal.

Install the platform files. The most important ones that we need are the Android SDK Tools and The Android 2.3.3 Files.

B.Setting up UDEV.

Type,

sudo gedit /etc/udev/rules.d/11-android.rules

and paste the following after editing your user name in the code,

SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1353", MODE="0660", OWNER="<your user name>" #Normal
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1351", MODE="0660", OWNER="<your user name>" #Debug
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1354", MODE="0660", OWNER="<your user name>" #Recovery

Type the following to change permissions to read.

chmod 0644 /etc/udev/rules.d/11-android.rules

Any extra info regarding UDEV can be found here- http://wiki.cyanogenmod.com/wiki/Udev

We have setup UDEV.

C.Installing the build packages.

For 32bit and 64bit systems,

sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

For 64bit systems only,

sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib

D.Setting up some directories in the environment.

Type the following to create them,

mkdir -p ~/bin

mkdir -p ~/android/system

E.Installing the repositories.

Type the following to make executable the repo function.

curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo

chmod a+x ~/bin/repo

You may need to reboot for the changes to take place.(Recommended)

To initialize the repositories,type the following (Note this will take very long and you will be asked for your name and email ID),

cd ~/android/system/

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git

repo sync

F.Copying of the proprietary files from a working Blade having Cyanogenmod7 installed on it.

Connect the device and ensure ADB is working.You can go here (http://wiki.cyanogenmod.com/wiki/ADB) if you have issues. Type the following for copying,

cd ~/android/system/device/zte/blade/

./extract-files.sh

G.Downloading of ROM Manager

~/android/system/vendor/cyanogen/get-rommanager

H.Building Cyanogenmod

Check for updates first,

cd ~/android/system/

repo sync

Configure your build and compile using,

. build/envsetup.sh && brunch blade

Copy your .zip file from ~/android/system/out/target/product/blade/update.cm-XXXXX-signed.zip to the root of the SD card.

Thats it,you're done.

You can flash the zip file from CWM or any other recovery or use an emulator.

You can also download Gapps and use that.

EDIT:I'm busy with my exams this whole month and maybe the next. So will try to update it and rectify any mistake ASAP. I haven't added the integration of the Eclipse ADT and will do so when i'm free again.