Completed on 2012-12-29
Prepare the Build EnvironmentNOTE: These steps only need to be performed once. If the build environment is already prepared, skip to Copy proprietary files.
sudo apt-get install android-tools-adb
Or install the Android SDK.
Install the Build PackagesInstall using preferred package manager:
For 64-bit systems:
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 xsltproc \ zlib1g-dev:i386 pngcrush schedtool lzop
NOTE: The above was tested on Ubuntu 12.10, the package names may vary by chosen Linux distro.
Create the DirectoriesCreate working directories for the build environment:
mkdir -p ~/bin mkdir -p ~/android/system
Sync the RepositoryEnter the following to download make executable the repo binary:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo chmod a+x ~/bin/repo
NOTE: A reboot of the computer may be necessary for the above changes to be recognized.
Now, enter the following to initialize and sync the repository:
cd ~/android/system/ repo init -u git://github.com/CyanogenMod/android.git -b ics repo sync -j4
Sync Relevant RepositoriesNOTE: This only needs to be done the first time after syncing the repository. If this step has been completed, skip to Copy Proprietary Files.
By default, CyanogenMod 9 only syncs the core android repositories and none of the device or kernel trees to save both bandwidth and time. Run the following command to sync the necessary components for the device:
. build/envsetup.sh && breakfast kumquat
The system will automatically begin pulling the device repository and all required dependencies.
Copy Proprietary FilesNOTE: This only needs to be run once. If these steps have already been performed, skip to Download Prebuilts.
This step requires possession of the Kumquat with a working copy of CyanogenMod 9 installed and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and run the following commands:
cd ~/android/system/device/sony/kumquat/ ./extract-files.sh
NOTE: If some hardware isn't functioning properly, this script may need to be run again in case there are updated proprietary files.
Download PrebuiltsDownload Prebuilts needed by the build:
This actually failed for me. The script tries to get Term.apk but fails as the result 404's. I grabbed the required file from my existing phone, and extracted the required file by hand. Seems to have worked OK.~/android/system/vendor/cm/get-prebuilts
Check for updatesFirst, check for updates in the source:
cd ~/android/system/ repo sync
Configure Build & CompileNow, the environment must be configured for the build process and then begin compilation for the Kumquat.
. build/envsetup.sh && brunch kumquat
InstallCopy the .zip file from
~/android/system/out/target/product/kumquat/cm-9-XXXXX-UNOFFICIAL-kumquat.zipto the root of the SD card.
Optional: Download Google Apps for CyanogenMod 9 and place it on the root of the SD card.
Flash both of these .zip files from recovery.