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硬碟空間。