下載 android 源碼 @ubuntu 12.04 2013年06月19日 星期三 16時23分21秒 參考資料:1. google : http://source.android.com/source/downloading.html#initializing-a-repo-client2. Github下載Android源碼 : http://www.cnblogs.com/akira90/archive/2013/03/08/2950631.html android4.2源碼下載過程 : http://blog.csdn.net/lengxibo/article/details/8299888#reply主要依照官方的說明 操作過程如下:
$ mkdir ~/bin$ PATH=~/bin:$PATH$ sudo apt-get install curl$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo$ chmod a+x ~/bin/repo$ mkdir WORKING_DIRECTORY$ cd WORKING_DIRECTORY
$ repo init -u https://android.googlesource.com/platform/manifest
# 擷取最新的 sourcecode
XXXXXXXXXXX $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1.2
確認資訊 : 說要更改的話,使用 repo --config- ?? ( 忘了)
**************************************************************
Your Name [jh]: jh
Your Email [jh@jh-ubt.(none)]: XXXXXXXXX@gmail.com
Your identity is: jh <XXXXXXXX@gmail.com>
is this correct [y/N]? y
**************************************************************
下載:
$ repo sync
###############################################################
剛開始執行輸出:
Get https://gerrit.googlesource.com/git-repo
就不動了。
搜到有說要 更改hosts , 於是:
ping gerrit.googlesource.com
得到 ip 是: 173.194.72.82
###############################################################
$ sudo cp /etc/hosts /etc/hosts.bak$ sudo gedit /etc/hosts
增加:
# **************************************************************
173.194.72.82 gerrit.googlesource.com
173.194.72.82 www.googlesource.com
173.194.72.82 android.googlesource.com
203.208.46.172 cache.pack.google.com
# 59.24.3.173 cache.pack.google.com
# *************************************************************
再次執行
$ repo sync
一路順暢!
2013年06月19日 星期三 16時22分44秒 開始下載