Android SDK Emulator: Compile CyanogenMod (Linux)
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]
|
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
- Create a folder calledandroid-9-cyanogen onYour/Android-SDK/platforms/
- Copy the contents ofYour/Android-SDK/platforms/android-9intoYour/Android-SDK/platforms/android-9-cyanogen
- Copy theramdisk.imgsystem.imganduserdata.imgfile from~/android/system/out/target/product/generictoYour/Android-SDK/platforms/android-9-cyanogen/images/
- Run theAndroidAVD Manager and select the secondAndroid2.3 target.
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer