ubuntu12.0.4下 android x86 原始碼 下載

來源:互聯網
上載者:User

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

 

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.