Android cupcake get Source and Builder for Ubuntu 9.04

编译环境

Ubuntu 9.04 Desktop

下载和编译流程

根据http://source.android.com/download的说明,成功的下载了所有源代码,整个目录文件接近2G

前期准备:

安装 git工具内核, 命令 sudo apt-get install git-core

1. 下载repo工具

curl http://android.git.kernel.org/repo > $HOME/bin/repo
cd $HOME/bin
chmod +x repo
2.导出android项目
mkdir android
cd android
repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake (如果不出错的话,5分钟内应提示成功,跟网络速度有关)
3.开始下载android platform的源代码
repo sync (这个操作会持续一段时间,与你自己的网速有关)

4.编译前,建议装的软件包如下(使用apt-get安装)
flex bison gperf libsdl-dev libesd0-dev curl libncurses5-dev zlib1g-dev libx11-dev

5.编译
make (非常漫长的等待,与你的CPU速度有一定关系,建议是睡觉前编译)
编译时,以下源代码需要加入相应的头文件(include)
/android/cupcake/frameworks/base/tools/aidl/aidl.cpp string.h,stdlib.h
/android/cupcake/frameworks/base/tools/aidl/options.cpp string.h
/android/cupcake/frameworks/base/tools/aidl/search_path.h string,string.h
/android/cupcake/frameworks/base/tools/aidl/generate_java string.h
/android/cupcake/external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h string.h
/android/cupcake/external/srec/tools/thirdparty/OpenFst/fst/lib/symbol-table.cpp string.h
/android/cupcake/build/tools/atree/files.cpp string.h,stdlib.h
/android/cupcake/build/tools/atree/fs.cpp string.h
/android/cupcake/frameworks/base/tools/localize/file_utils.cpp string.h,stdlib.h
/android/cupcake/frameworks/base/tools/localize/localize.cpp string.h,stdlib.h
/android/cupcake/frameworks/base/tools/localize/Perforce.cpp string.h,stdlib.h
/android/cupcake/frameworks/base/tools/localize/XLIFFFile.cpp iostream,algorithm
/android/cupcake/frameworks/base/tools/localize/XMLHandler.cpp iostream,algorithm
/android/cupcake/development/emulator/qtools/dmtrace.cpp unistd.h

编译完毕以后,会发现在代码目录下多了一个out目录
6.设置运行环境 (修改$HOME/.profile文件),加入以下内容
# Android
PATH=”$PATH:$HOME/android/out/host/linux-x86/bin”
ANDROID_PRODUCT_OUT=$HOME/android/out/target/product/generic
export ANDROID_PRODUCT_OUT
设置完毕后,退出并重新登录
7.使用虚拟机运行
cd $HOME/android/out/target/product/generic
emulator -image system.img -data userdata.img -ramdisk ramdisk.img
应该看到以下的画面(第一次开启的时候,应该还有一个向google反馈的一个对话框,按下确定即可)

更多相关文章

  1. 使用NetBeans搭建Android开发环境
  2. android studio Could not find com.android.support.constraint
  3. android ndk编译x264开源(用于android的ffmpeg中进行软编码)
  4. [android]编译时出现/usr/bin/ld: skipping incompatible /usr/l
  5. 编译android的linux内核
  6. Android(安卓)命令行编译、打包生成apk文件
  7. android源码下载方式
  8. Android热更新框架Tinker无法更新?
  9. 【Android】Android(安卓)相关下载

随机推荐

  1. 最新MySQL安装配置教程
  2. mysql获取当前时间、秒数
  3. mysql更新触发器先插入另一张表然后删除
  4. 像Farmville这样的在线游戏使用什么数据
  5. 求 Log Explorer for SQL Server 4.2 注
  6. 求一条sql语句:计算两列的差值,以及各个差
  7. mysql不能用limit的问题
  8. mysql 修改密码后,切记要FLUSH PRIVILEGES
  9. 怎么判断连接SqlServer数据库成功
  10. 在SQL连接中需要帮助