编译方法参照http://source.android.com/download,目前源码仅提供MacOS,和Linux上的编译。这里主要以ubuntu为例,首先准备系统环境Git/JDK,软件包列表flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential, zip, curl

sudo apt-get install git-core gnupg
sudo apt-get install sun-java6-jdk
sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl li b ncurses5-dev zlib1g-dev
sudo apt-get install valgrind

其中的版本要求Python2.4/ JDK5.0,update12或更高/ Git1.5.4

安装Repo

  1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
    $ cd ~
    $ mkdir bin
    $ echo $PATH
  2. Download the repo script and make sure it is executable:
    $ curl http://android.git.kernel.org/repo >~/bin/repo
    $ chmod a+x ~/bin/repo
  3. Create an empty directory to hold your working files:
    $ mkdir mydroid
    $ cd mydroid
  4. Runrepo init tobring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
    $ repo init -u git://android.git.kernel.org/platform/manifest.git
  5. When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account.

获取源码

repo sync

修改环境变量

vi /etc/profile

export ANDROID_JAVA_HOME=$JAVA_HOME

开始编译

$ cd ~/mydroid
$ make

更多相关文章

  1. Android(安卓)SharedPreferences 详解 源码解析
  2. 源码项目Android(安卓)使用Zxing2.1 来读取二维码
  3. Windows SublimeText内使用NDK编译Android(安卓)so(不用cygwin)
  4. Android(安卓)Cursor源码笔记(2)
  5. EventBus for Android(安卓)源码分析
  6. 《Android系统安全和反编译实战》目录
  7. Android(安卓)Recovery的汉化 显示中文
  8. import project后,出现Unable to get system library for the pro
  9. Android(安卓)NoHttp源码阅读指导

随机推荐

  1. SQL Server 2005作业设置定时任务
  2. SQLServer地址搜索性能优化
  3. sqlServer实现去除字符串空格
  4. SQL Server 远程连接服务器详细配置(sp_a
  5. SQLServer2005创建定时作业任务
  6. SQL Server:触发器实例详解
  7. Oracle 删除用户和表空间详细介绍
  8. SQLServer数据库从高版本降级到低版本实
  9. Ubuntu 下安装SQL Server教程
  10. SQL判断语句用法和多表查询