Jump to content

[GUIDE] Compiling CyanogenMod7 from source


Recommended Posts

Guest karthiknr
Posted (edited)

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've already opened it in XDA but some people from MoDaCo may not visit XDA at all. So bear with me ;)

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.

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. This guide may not be perfect as i do not have extensive knowledge on Ubuntu. So please do point out at my mistakes if any and i will rectify them. Credit to Cyanogenmod team for the best ROM out there for Blade and to Wbaw for the TPT and all the dev's out there.

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.We'll be needing a few programs first before starting. Open terminal and type the code under the given programs. 1.Python,rar,curl,git.
 sudo apt-get install python rar curl git
You can also install them separately,
sudo apt-get install packagename
2.Java Setting up java is very important. You can download java from Ubuntu Software centre or through the terminal. You can also download java from here- http://www.oracle.co...oads/index.html On Ubuntu's 10.10 and 11.10 variants,enabling the repository is important.
 sudo add-apt-repository "deb [url="http://archive.canonical.com/"]http://archive.canonical.com/[/url] 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 [url="http://archive.canonical.com/"]http://archive.canonical.com/[/url] 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.and.../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 [url="https://raw.github.com/android/tools_repo/master/repo"]https://raw.github.c...epo/master/repo[/url] > ~/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 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 flash with the above zip.

Please do comment on any mistakes anywhere. It will be highly appreciated.:)

Edited by karthiknr

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.