android源码下载-Windwos下使用清华镜像

本人只需要部分源码做分析就研究,所以只下载了一部分,全部的没有下载过

不多废话直接上步骤:

1. 安装git

https://www.runoob.com/git/git-tutorial.html

2. 安装python

https://www.runoob.com/python/python-tutorial.html

3. 下载repo

  • 找个合适的路径,如E:\program\repo\tsinghua

  • 目录下,右击Git bash;话说在前面,这样可能不靠谱,请用管理员运行,然后手动切换到目录下,是最保险的!

  • git clone https://mirrors.tuna.tsinghua.edu.cn/git/git-repo

4. 修改REPO_URL

  • E:\program\repo\tsinghua下使用编辑工具如Notepad++打开repo文件

  • 找到:REPO_URL = 'https://gerrit.googlesource.com/git-repo'

  • 改成:REPO_URL = 'git://aosp.tuna.tsinghua.edu.cn/android/git-repo'

5. 初始化

  • repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-10.0.0_r17

6. 切大版本

  • 有可能你要的大版本,不是我给的初始化版本

  • 没关系

  • // 进manifests目录
    cd .repo/manifests
    // 查看所有版本,列出一部分,可以翻页和中途退出
    git branch -a
    // 查看所有版本,一下子列出所有的版本
    git branch -a | cut -d / -f 3 
  • 找到自己的喜欢的版本

  • // 回到原来的地方
    cd ../..  
    // 再此初始化
    repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-10.0.0_r17

7. 选择自己喜欢的内容

  • 打开E:\program\repo\tsinghua\.repo\manifest.xml

  • 保险起见,保存一份backup,然后修改内容如下

  • 我这里只要Camera2,你可以加自己喜欢的

  • <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
    
      <remote  name="aosp"
               fetch=".."
               review="https://android-review.googlesource.com/" />
      <default revision="refs/tags/android-10.0.0_r17"
               remote="aosp"
               sync-j="4" />
    
      <project path="packages/apps/Camera2" name="platform/packages/apps/Camera2" groups="pdk-fs" />
    </manifest>

8. 同步代码

  • repo sync

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值