Updated info for non-debian based systems thanks to Vicodan:
If you want to use this on fedora or non-debian based systems you will need to replace every command that says apt-get to yum. Thanks to Vicodan for pointing this out as I do not use fedora myself.
- A minimum dual core pc, the more ram the better
- A working wifi connection
- Linux Operating System. Either 32-bit or 64-bit will work
NOTE: 64-bit will run faster
Optional Recommended Software:
Many of these can be found in the software center using the search box
If you find multiple versions it's ok to install them all, unless it says
Alternatively open the terminal application and type
$ sudo app-get install python
- awk and gawk
$ sudo apt-get install rar
Setting up java is one of the most important step to getting your pc prepared for a build environment. First check the java version that is installed on your pc
NOTE: On Ubuntu 11.10, and variants, you need to enable the
parter repository to install sun-java6-jdk:
$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
$ java -version
java -version java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
1a - First install the correct version:
$ sudo apt-get install sun-java6-jdk sun-java6-jre
$ sudo nautilus
system" tab on the left and navigate to the /usr/lib/jvm
Once there you should see two types of java. If you see java open jdk
you need to delete it, along with it's associated bin folder. Close the
root file explorer window
1c - Edit .bashrc
Next navigate to your home folder and open up the .bashrc file. This is
a hidden file so you will have to press Ctrl + H to see it. Add the
following lines to the top section, and change accordingly to your path
#JavaDev PATH export JAVA_HOME=/usr/lib/jvm/java-6-sun-188.8.131.52 export PATH=$PATH:$JAVA_HOME/bin
Verify java version again
$ java -version
$ sudo apt-get install git
NOTE: You only need to do these steps the first time you build.
If you previously prepared your build environment, skip to Copy
3a - Install the ADB
Install the Android SDK. http://wiki.cyanogenmod.com/index.ph...he_Android_SDK
3b - Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit 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
$ sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib
You will need to set up some directories in your build environment.
To create them:
$ mkdir -p ~/bin $ mkdir -p ~/android/system
Enter the following to download make executable the "repo" binary:
$ curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo $ chmod a+x ~/bin/repo
Now enter the following to initialize the repository:
$ 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
NOTE: This only needs done the first time you build. If you have
already done these steps, you may skip to Download RomManager.
You will need to have a speedy with a working copy of CyanogenMod
install and ADB working on the computer. This script will copy the
proprietary files from the device.
Connect the device to the computer and ensure that ADB is working
$ cd ~/android/system/device/htc/speedy/ ./extract-files.sh
NOTE: This only needs to be done when an update to
RomManager is released. If you are-up-to date, you may skip to Building
CyanogenMod. Download RomManager which is needed by the build:
Check for updates
First, check for updates in the source:
$ cd ~/android/system/ $ repo sync $ cp build/core/root.mk -f Makefile
This is optional but helpful for kernel compiling
There are a lot of things that need to be added to the .bashrc to let your
pc know about which type of compiler you want to use. The best way is
to use the one provided in the CM7 work tree.
#Android export ARCH=arm export CCOMPILE=$CROSS_COMPILE export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
Now, the environment must be configured to build and the ROM
compiled, from code, for the Speedy.
$ . build/envsetup.sh && brunch speedy
Copy your .zip file from
signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the
root of the SD card.
Flash both of these .zip files from recovery.