CyanogenMod

Last-modified: 2011-05-22 (日) 01:32:16

勉強中。下に行くほど古い話題。

Contributing to CyanogenMod project

  • CyanogenModのリポジトリはgithubにあるが、githubでforkして変更してcommitしてpull requestを出しても放置になるので、別にgithubは使わなくてもいい。(2011年1月現在)
  • CyanogenModに変更を取り込んでもらうには、Gerritというsource code review systemに自分が変更したソースコードのパッチを登録して承認を待つ。承認されるとマージされる。内容によっては却下されることもあるだろう。

Building CyanogenMod 7 (Gingerbread) for Vision on Ubuntu 10.10

  • Download and install Ubuntu 10.10 (Desktop, 64-bit)
  • Install Java 6
    $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    $ sudo apt-get update
    $ sudo apt-get install sun-java6-jdk
    $ sudo update-java-alternatives -s java-6-sun
  • Download Android SDK
  • Install Android SDK
    $ tar zxvf android-sdk-linux_x86.tar.gz
    $ android-sdk-linux_x86/tools/android update sdk
  • Install host tools
    $ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev \
      gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev \
      libx11-dev lib32readline5-dev lib32z-dev
  • Install pngcrush (which CyanogenMod build is using)
    $ sudo apt-get install pngcrush
  • Install repo
    $ curl http://android.git.kernel.org/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
  • Add host tools paths to PATH
    export PATH=/path/to/android-sdk-linux_x86/platform-tools:~/bin:$PATH
  • To connect the device with USB, create /etc/udev/rules.d/99-android.rules, then modify it as below
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", SYMLINK+="android_adb", MODE=”0666″ GROUP="plugdev"
  • Restart udev and adb server
    $ sudo service udev restart
    $ adb kill-server
    $ sudo /path/to/android-sdk-linux_x86/platform-tools/adb start-server
  • Connect the device to the host, then confirm the connection
    $ adb devices
  • Build it
    ROOT=`pwd`
# 0. get source
mkdir -p $ROOT/system
cd $ROOT/system
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
# 1. sync with repository
cd $ROOT/system
repo sync
# 2. extract proprietary files from the device
cd $ROOT/system/device/htc/vision/
./extract-files.sh
# 3. get rom manager
cd $ROOT/system/vendor/cyanogen/
./get-rommanager
# 4. get google files
cd $ROOT/system/vendor/cyanogen/
./get-google-files -v HDPI
# 5. prepare build
cd $ROOT/system
cp ./vendor/cyanogen/products/cyanogen_vision.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_vision-eng
# 6. build it
cd $ROOT/system
make -j2 CYANOGEN_WITH_GOOGLE=true bacon

Building CyanogenMod 6.1 (Froyo) for Vision on Mac OS X 10.6

  • このwikiの手順でほぼ問題ない
  • frameworks/base/media/mediaserver/Android.mk のLOCAL_SHARED_LIBRARIESに libaudioalsa の追加が必要?
  • system/device/htc/vision/extract-files.sh は実機からproprietaryなファイルを吸い上げるスクリプトだが、T-Mobile G2からの吸い上げを想定した物になっているので、素のDesire Zで実行するとエラーが出る。(その後、ファイルコピーの場所でmakeがエラー終了。)これをそのまま使う場合は、一度CM 6.1を焼いてから実行する必要がある。(ただし、ところどころT-Mobile風味になる。MS-HTCVISION-KNT20-02.apk がT-MobileのWi-Fi Callingアプリなので、これイラネ。)

References