ubuntu12.0.4下 android x86 源代码 下载

来源:互联网 发布:mysql 自定义排序 编辑:程序博客网 时间:2024/03/29 20:15

1.在20g硬盘中安装ubuntu12.0.4

2.加载100g硬盘,格式化。创建androidx86目录。挂载100g硬盘到androidx86目录下。

sudo passwd root

su root

3.cd androidx86

4. mkdir bin

5. 下载repo

   ***** 很多网站介绍使用curl http://android.git.kernel.org/repo >~/bin/repo下载repo,这是早期的路径,已经不可用了。

   ***** 如果出现下面提示,就是使用了这个早期的repo。

{

./bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误./bin/repo: 行 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'

}

 

   正确的是使用 (这个是android网站提供的下载方式)

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo

 

6.提示没有curl命令。使用apt-get install curl安装curl。chmoda+x bin/repo改变模式。

7.执行bin/repo init -u http://git.android-x86.org/manifest

提示fatal: 'git' is not available

8.安装git。apt-get install git

再次执行7。开始同步源代码。

出现下面错误。是因为在国内ping不同git.android-x86.org. (神奇的国度。。。。惊恐

{

curl: (6) Couldn't resolve host 'git.android-x86.org'
error: Couldn't resolve host 'git.android-x86.org' while accessing
http://git.android-x86.org/manifest/info/refs
fatal: HTTP request failed

}

编辑文件/etc/hosts 添加           210.240.39.201  git.android-x86.org  (这个ip是通过日本的服务器ping git.android-x86.org 获得的一个ip)

[74.125.31.121   www.android-x86.org]

 

9.再次执行7

出现下面错误

{

error: manifest required for this command -- please run init

}

提示需要加-b 参数

10.访问http://source.android.com/source/build-numbers.html页面

【Source code tags and builds】下表中tag为-b 参数

执行bin/repo init -u http://git.android-x86.org/manifest -b android-4.2.2_r1

提示

...........

 * [new branch]      jb-x86     -> origin/jb-x86
error: revision android-4.2.2_r1 in manifests not found
再次执行  bin/repo init -u http://git.android-x86.org/manifest -b jb-x86

提示用户名和email

11.  bin/repo sync

 开始同步源代码。

时间会很长啊。。。。。。。

 

受不了了,增加-j参数支持多线程 bin/repo sync -j 10

 啊。。速度完全不同了。(终于可以体现10M网络的功能了 )

 

等不了了,睡觉去了。。。

 

ps:一觉醒来,下载完了。用了12G硬盘空间。

 

 

 

原创粉丝点击