Table of Contents
preparing build env
- debian 32 squeeze
- sun jdk 6 from deb repo.
- required packages
apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev libncurses5-dev \ x11proto-core-dev libx11-dev libreadline5-dev libz-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils
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
- configuring USB Access create/edit the following file <code> /etc/udev/rules.d/51-android.rules </code> to contain this line: <code> SUBSYSTEM=='usb', SYSFS{idVendor}==“18d1”, MODE=“0666” </code>
- install android sdk/ndk as instructed in [2]
get and build android src
- follow instruction [3] http://source.android.com/source/downloading.html
- modified source from peter alfonso [4] https://github.com/peteralfonso/platform_manifest
- build source [7] http://source.android.com/source/building.html
./build/envsetup.sh lunch full_crespo-eng make -j4
- build fastboot and adb (not tried yet). alternative download fastboot binary from htc dev [6] http://www.htcdev.com/bootloader/unlock-instructions/page-2
references
– preparing dev env:
building CM7 from source
prepare dev env
– see previous post.
download cm7 source
– create build workspace
mkdir -p ~/bin mkdir -p ~/android/system
– install repo tools
curl http://android.git.kernel.org/repo > ~/bin/repo chmod a+x ~/bin/repo
– download source
cd ~/android/system/ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread repo sync -j16
– copy proprietary files
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 shadow 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 properly.
cd ~/android/system/device/motorola/shadow/ ./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
– download RomManager and google files
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:
~/android/system/vendor/cyanogen/get-rommanager
building cmMod
– update source
cd ~/android/system/ repo sync
– configure env. (for the Shadow) == source build/envsetup.sh. this script will create 'brunch'.
cd ~/android/system/ source build/envsetup.sh ./brunch crespo
– install
1. Copy your .zip file from ~/android/system/out/target/product/shadow/update.cm-XXXXX-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.
2. Flash both of these .zip files from recovery.