android源碼下載方式:
方式一:
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
這是官方提供的下載方式,但最近使用這種方式出現(xiàn)網(wǎng)絡(luò)連接超時(shí),據(jù)說(shuō)是被hack掉了
同時(shí),注意到kernel源碼網(wǎng)站卻依然能夠訪問(wèn):http://android.git.kernel.org/kernel/
于是,使用git方式下載: git clone http://android.git.kernel.org/kernel/common.git
最后,成功了
詳見(jiàn)博客:android.git.kernel.org[0: 199.6.1.173]: errno=Connection refused
方式二:
把方式一的下載命令中的git修改為http(配置文件需一并修改),則可以順利下載源碼
具體修改步驟如下:
步驟1. 編輯/home/username/bin/repo文件
- REPO_URL='git://android.git.kernel.org/tools/repo.git'
+ REPO_URL='http://android.git.kernel.org/tools/repo.git'
步驟2. 運(yùn)行新的命令
$ repo init -u http://android.git.kernel.org/platform/manifest.git
步驟3. 修改文件.repo/manifests/default.xml
將 fetch="git://android.git.kernel.org/"
改成fetch="http://android.git.kernel.org/"
步驟4. 運(yùn)行命令
repo sync
成功?。。?/span>
git使用推薦:
linux git命令參數(shù)及用法詳解--版本控制工具
聯(lián)系客服