1.安装Vmware
2.安装Ubuntu10.04
3.安装git和其他工具
sudo apt-get install git-core curl (默认装1.7.0,要求不低于1.7.2,需要升级)
【ubuntu下升级git命令:
1:sudo add-apt-repository ppa:git-core/ppa
2:sudo apt-get update
3:sudo apt-get install git-core curl】
4.To install Repo
Make sure you have a bin/ directory in your home directory and that it is included in your path:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
修改repo的url,去掉s,修改manifest.xml(与default.xml是联动的)
Download the Repo tool and ensure that it is executable:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
5.下载
先创建下载文件夹
$ mkdir android-x86
$ cd android-x86
$ repo init -u git://android-x86.git.sf.net/gitroot/android-x86/x86/platform/manifest.git -b $branch(这里是froyo-x86)
$ repo sync
附录:Repo 文件的前几行:
#!/usr/bin/env python
## repo default configuration
##
from __future__ import print_function
REPO_URL = 'http://gerrit.googlesource.com/git-repo'
REPO_REV = 'stable'
我把https改成了http,没改之前根本下不了
___________________________________
manifest.xml如下:
<manifest>
<remote name="korg"
fetch="http://android.git.kernel.org/"
review="review.source.android.com"/>
<remote name="x86"
fetch="http://git.android-x86.org/" />
<default revision="refs/tags/android-x86-2.2"
remote="korg" />
注意:原来Network Adapter 是NAT,下载18%就怎么也下载不了了,把网络模式改为:Bridged(Automatic)模式,下载就可以继续了,速度很快。(Vmware 右下角settings可以更改联网方式)
6.安装一些编译工具
7.安装java5(2.2及以下版本必须java5)
8.执行编译