repo下载中国科技技术大学镜像android源码

本文介绍如何使用Ubuntu系统从中国科技技术大学镜像站点下载指定版本的Android源码。主要步骤包括安装必要的工具如git和repo,配置工作目录,初始化并同步指定版本的Android源码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

中国科技技术大学镜像下载一个指定版本的android源码:
首先操作系统是Ubuntu,主要是Linux的。
在进行操作前你需要安装git,和repo 

1.安装git与repo
  安装git:  sudo apt-get install git-core  安装curl: sudo apt-get install git-core curl  通过curl下载repo:                 mkdir ~/bin
               PATH=~/bin:$PATH               curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo              //cd  ~/bin
              // curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo  
               chmod +x repo
    如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo文件,把 REPO_URL 一行替换成下面的:
    REPO_URL = 'https://gerrit-googlesource.lug.ustc.edu.cn/git-repo'

2.准备下载
     (1). 创建工作目录(这个名称随意)
           mkdir WORKING_DIRECTORY
           cd WORKING_DIRECTORY
     (2). 初始化仓库
           repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
           
初次安装git,会提示配置git config信息
          git config --global user.email "you@example.com"
          git config --global user.name "Your Name" git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
     (3). 下载指定android版本
          repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-8.0.0_r1
     (4).开始同步源码树
          repo sync
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值