LineageOS 源码仓库

注意:本镜像是 lineageOS 源代码的镜像,如果是希望下载 lineage 的 rom,请访问 Lineage ROM 使用帮助 。

过程摘录
下载 repo 工具:

mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
或者使用git-repo 镜像

建立工作目录:

mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
初始化仓库:

repo init -u https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/LineageOS/android.git -b lineage-21.0 --git-lfs
(如果已经有从 GitHub 同步的 lineageOS 源代码,可以从这里直接开始)

打开.repo/manifests/default.xml,将

<remote name="github"

       fetch=".."
       review="review.lineageos.org" />

改成

<remote name="github"

       fetch="https://github.com/" />

<remote name="lineage"

       fetch="https://mirrors.tuna.tsinghua.edu.cn/git/lineageOS/"
       review="review.lineageos.org" />

替换 AOSP 请参考 AOSP 帮助 中「LineageOS 中对于 AOSP 的替换」一节

<default revision="..."

       remote="github"

改成

<default revision="..."

       remote="lineage"

同步源码树(以后只需执行这条命令来同步):

repo sync
异常处理
部分仓库例如 Lineage_framework_base 同步的时候会出现 bundle 错误,这时候可以使用命令 repo sync --no-clone-bundle 进行同步。

评论

等风等雨等你来