同步LineageOS源码,无需科学上网
本帖最后由 Cirno 于 2018-5-13 12:07 编辑#如果你的机型有lineageos官方适配,并不推荐编译
#需要linux环境
#2018.5.13
一、安装Repo
1.新建目录:
mkdir ~/bin
2.下载repo
清华源:
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
科大源:
curl https://storage-googleapis.proxy.ustclug.org/git-repo-downloads/repo > ~/bin/repo
3.设置权限:
chmod a+x ~/bin/repo
4.添加到path变量:
PATH=~/bin:$PATH
二、同步源码
1.cd到要同步的目录
2.初始化2.查看LineageOS远程分支
git --git-dir=.repo/manifests/.git/ branch -a
repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b 要同步的分支(注意)分支为origin/之后的字符
3.修改到国内镜像站(可选)
3.1使用文本编辑器打开.repo/manifest.xml
vim .repo/manifest.xml
3.2修改以下内容
将
<remote name="github" fetch=".."
改成
<remote name="github" fetch="https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/"
将
<remote name="aosp" fetch="https://android.googlesource.com"
改成
<remote name="aosp" fetch="https://aosp.tuna.tsinghua.edu.cn"
4.同步源码
repo sync -f -c -j8
挺好的文章,就是粘贴过来的时候,先在记事本里粘贴一遍,把格式去掉,然后自己重新设置一遍格式。
否则样式就乱了。:lol admin 发表于 2018-4-21 14:21
挺好的文章,就是粘贴过来的时候,先在记事本里粘贴一遍,把格式去掉,然后自己重新设置一遍格式。
否则样 ...
大部分靠自己脑子编的耶 感谢分享! 我感觉到好难
多谢楼主分享!! 谢谢分享 感谢分享~~~~ 感谢分享!谢谢:) 谢谢分享
页:
[1]