Android整機源碼如何輕鬆下載?清華大學Android源碼鏡像,android源碼
今天發現,清華大學提供AOSP鏡像,以前都是從Google的網站下載同步更新的,但是現在有了國內的鏡像網站就好多了
協助:https://wiki.tuna.tsinghua.edu.cn/MirrorUsage/android
倉庫地址:
git://aosp.tuna.tsinghua.edu.cn/android/
使用瀏覽器訪問:
http://aosp.tuna.tsinghua.edu.cn/android/
一、下載android 源碼
1.下載 repo
git://aosp.tuna.tsinghua.edu.cn/android/git-repo.git/
2. 修改repo
google的地址
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
改為清華大學的地址
REPO_URL = 'git://aosp.tuna.tsinghua.edu.cn/android/git-repo'
3.下載 manifest
google 的地址
$ repo init -u https://android.googlesource.com/platform/manifest
改為清華大學的地址
$ repo init -u git://aosp.tuna.tsinghua.edu.cn/android/platform/manifest
4.同步源碼
還是和以前一樣
$ repo sync
5.替換已有的AOSP原始碼的remote
如果你之前已經通過某種途徑獲得了AOSP的源碼,但是你希望以後通過TUNA同步,只需要將.repo/manifest.xml中的
<remote name="aosp"
fetch=".."
review="https://android-review.googlesource.com/" />
改為下面的code即可:
<remote name="aosp"
fetch="git://aosp.tuna.tsinghua.edu.cn/android/"
review="https://android-review.googlesource.com/" />
這個方法也可以用來在同步Cyanogenmod代碼的時候從TUNA同步部分代碼