您的位置:首页 > 移动开发 > Android开发

android source code repo sync

2018-03-08 09:38 253 查看
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
// 如果上述 URL 不可访问,可以用下面的:
//curl https://storage-googleapis.lug.ustc.edu.cn/git //测试有效
 //-repo-downloads/repo > ~/bin/repo
mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY

repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
//其中repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest是清华提供的镜像源 //repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest是中国科技技术大学的镜像源
// 如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo文件,把 REPO_URL 一行替换成下面的:
//REPO_URL = 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo'
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.4_r2.1
vim autosync
#!/bin/bash
echo "======start repo sync======"
repo sync
while [ $? == 1 ]; do
echo "======sync failed, re-sync again======"
sleep 3
repo sync
done
chomd a+x autosync
./autosync
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: