How to compile CyanogenMod for theAndroidEmulator.

This how-to was written forUbuntu 10.04&Ubuntu 10.10,AndroidEmulator r08,CyanogenMod 7.x (Gingerbread), on 2 February 2011.

Contents

[hide]
  • 1Prepare the Build Environment
    • 1.1Install theADB
    • 1.2Install the Build Packages
    • 1.3Create the Directories
    • 1.4Install the Repository
  • 2Download RomManager
  • 3Building CyanogenMod
    • 3.1Check for updates
    • 3.2Configure Build
    • 3.3Compile
  • 4Install

Prepare the Build Environment

NOTE:You only need to do these steps the first time you build. If you previously prepared your build environment, skip to Download RomManager.

Install theADB

Install the Android SDK.

Install the Build Packages

Install using the package manager of your choice:

For 32-bit & 64-bit systems:

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 64-bit only systems:

g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

Note: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

add-apt-repository "deb http://archive.canonical.com/ maverick partner"

Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin
mkdir -p ~/android/system

Install the Repository

Enter the following to downloadmakeexecutable the "repo" binary:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE:You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/
repo init -ugit://github.com/CyanogenMod/android.git-b gingerbread
repo sync -j16

Download RomManager

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.

DownloadROMManager which is needed by the build:

cd ~/android/system/vendor/cyanogen/
./get-rommanager

Building CyanogenMod

Check for updates

First, check for updates in the source:

cd ~/android/system/
repo sync

Configure Build

Now, your environment must be configured to build specifically for theAndroidEmulator. To set up your build environment:

. build/envsetup.sh
lunch cyanogen_generic-eng

Compile

Next, we will build the actualROM.

mka

Install

  1. Create a folder calledandroid-9-cyanogen onYour/Android-SDK/platforms/
  2. Copy the contents ofYour/Android-SDK/platforms/android-9intoYour/Android-SDK/platforms/android-9-cyanogen
  3. Copy theramdisk.imgsystem.imganduserdata.imgfile from~/android/system/out/target/product/generictoYour/Android-SDK/platforms/android-9-cyanogen/images/
  4. Run theAndroidAVD Manager and select the secondAndroid2.3 target.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android内存泄漏查找(1)
  2. Android(安卓)HAL实现3——基于Manager的
  3. 也谈layout_gravity和gravity
  4. Activity UI显示的学习总结
  5. Android(安卓)SQLite使用SQLiteOpenHelpe
  6. Android NDK开发之旅36--FFmpeg音视频同
  7. 关于android设备管理器的一些分析
  8. Android通过AIDL实现接听电话、挂断电话
  9. Android: 用jni 获取MAC地址
  10. Garmin-ASUS将在2010年一季度发布Android