清華TUNAミラーソースからAndroidソースをダウンロード

1058 ワード

推奨事項は、公式チュートリアルを参照してください.https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
以下は、自己テスト時に実行する手順です.
1、repoをダウンロードする
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo

  
2、権限を修正してPATHにコピーする
$ chmod a+x repo

$ sudo mv repo /usr/bin/

  
3、tunaミラーソースを使って更新する(アナログ端末を再起動する必要がある)
$ vi ~/.bashrc 
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

  
4、倉庫の初期化
$ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest

  
a.プロセス中にGitエラーが発生した場合、git configを設定すればよい
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
b.Androidバージョンを指定する必要がある場合
$ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android  

  
5、ソースコードを同期する(コードが比較的に大きくて、時間が比較的に長い)
$ repo sync

  
転載先:https://www.cnblogs.com/BrianChen/p/10241825.html