Update AOSP repo url

一,复制.repo

1
2
$ mkdir aic11
$ cp -ar redroid11/.repo aic11/

如果迁移到其它服务器可以先压缩或者使用rsync复制

1
2
3
$ tar -zcvf redroid11.tar.gz .repo
# 或者
$ rsync -alv ${USER}@ip:~/code/.repo .

二,替换url

  • 如果直接使用repo init会报错
    1
    2
    3
    4
    5
    6
    7
    $ cd aic11
    $ repo init --depth 1 -u https://mirrors.bfsu.edu.cn/git/AOSP/platform/manifest -b android-11.0.0_r48
    repo: reusing existing repo client checkout in /mnt/data/code/aic11
    error: Your local changes to the following files would be overwritten by checkout:
    default.xml
    Please commit your changes or stash them before you switch branches.
    Aborting
  • 可以先删除.repo/manifest*,再进行repo init
    1
    2
    $ rm -rf .repo/manifest*
    $ repo init --depth 1 -u https://mirrors.bfsu.edu.cn/git/AOSP/platform/manifest -b android-11.0.0_r48
  • 然后用 –force-sync 参数进行同步,这样已经下载的仓库就不会重复下载了。
    1
    $ repo sync --force-sync 

Update AOSP repo url
https://hqw700.github.io/2024/03/25/2024-03-25-update-aosp-repo-url/
发布于
2024年3月25日
许可协议