本人比较懒,不爱废话,直接代码伺候,(*^__^*) 嘻嘻……
1.安装git
sudo apt-get install git-core
2.安装curl
sudo apt-get install git-core curl
3.安装repo, 通过curl下载repo
curl http://git-repo.googlecode.com/files/repo-1.12 > ~/bin/repo
4.给repo可执行权限
chmod a+x ~/bin/repo
5.修改~/bin/repo文件将第五行
REPO_URL='https://code.google.com/p/git-repo/'
改为
REPO_URL='http://code.google.com/p/git-repo/'
否则会出现error:Failed connect to code.google.com:443; Operation now in progress while accessing https://code.google.com/p/git-repo//info/refs
6.然后向PATH中添加bin路径:
export PATH=$PATH:~/bin
7.新建一个目录,然后进入该目录。
mkdir myandroid
cd myandroid
8.执行repo init -u git://android.git.linaro.org/platform/manifest.git -b android-4.3_r2_
这一步大概有一分多钟就完成了。
9.找到myandroid目录中的.repo下面的manifest.xml文件,该文件只是一个链接,实际上是manifest目录下面的default.xml文件,将
fetch="git://android.git.kernel.org/"
改为
fetch="git://android.git.linaro.org/"
10.执行repo sync