衆所周知的原因,android源碼被牆了,還好國内有不少鏡像,這裡使用清華提供的鏡像.
以下内容轉自:
https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/androidAndroid 鏡像使用幫助
參考 Google 教程
https://source.android.com/source/downloading.html, 将
https://android.googlesource.com/
全部使用
git://aosp.tuna.tsinghua.edu.cn/android/
代替即可。
本站資源有限,每個 IP 限制并發數為 4, 請勿使用
repo sync -j8
這樣的方式同步。
替換已有的AOSP源代碼的remote
如果你之前已經通過某種途徑獲得了AOSP的源碼(或者你隻是 init 這一步完成後),但是你希望以後通過TUNA同步,隻需要将.repo/manifests.xml中的 aosp 這個 remote 的 fetch 從
https://android.googlesource.com改為 git://aosp.tuna.tsinghua.edu.cn/android/
<manifest>
<remote name="aosp"
- fetch="https://android.googlesource.com"
+ fetch="git://aosp.tuna.tsinghua.edu.cn/android/"
review="android-review.googlesource.com" />
<remote name="github"
這個方法也可以用來在同步Cyanogenmod代碼的時候從TUNA同步部分代碼
FAQ
1. 鏡像的是什麼?
- - 是按照 google 指南建立的鏡像 git 倉庫
2. 為何不能通過浏覽器通路?
- - 暫時沒有 gitweb, 而且反正是 git bare 倉庫,沒有可以直接看到的内容
3. 出現curl: (22) The requested URL returned error: 404 Not Found Server does not provide clone.bundle; ignoring.怎麼辦?
- - 無視即可