通过清华TUNA镜像源下载Android源码

建议参考官方教程:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/

以下为自己测试时执行的步骤:
1、下载repo
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo

2、修改权限并拷贝到 PATH 中
$ chmod a+x repo
$ sudo mv repo /usr/bin/

3、使用tuna镜像源更新(需重启模拟终端)
$ vi ~/.bashrc
export REPO_URL=‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/‘

4、初始化仓库
$ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
a.过程中如遇到Git错误,设置git config即可
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
b.如果需要指定Android版本
$ repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android版本

5、同步源码(代码比较大,耗时比较久)
$ repo sync

原文地址:https://www.cnblogs.com/BrianChen/p/10241825.html

时间: 2024-08-05 23:29:52

通过清华TUNA镜像源下载Android源码的相关文章

Mac 下 下载Android源码步骤

android源码下载及安装: 1.初始化安装环境:A.建立大小写敏感硬盘镜像:步骤如下:Disk Utility –> New Image,随便取个名字,这里用AndroidDisk,30GB足够了,然后注意选成Mac OS Extended (Case-sensitive, Journaled), –> Create记住保存路劲为 ~/AndroidDisk.dmg B.挂载镜像:使用命令:hdiutil attach ~/AndroidDisk.dmg -mountpoint /Volu

在Mac OS X中下载Android源码的一些经验

首先说明,随着近期(2014年6月开始)GFW的升级,这个网站:http://www.android.com/ 已经不能正常访问了,下面的这些操作均是在我连接VPN的时候进行的. 首先,需要做一些准备工作:据这里(http://source.android.com/source/initializing.html)介绍,Mac OS中文件系统的特点是:case-preserving but case-insensitive,也就是保留大小写,但对大小写不敏感,这样会给后续运行一些命令带来很多麻烦

下载android源码

http://source.android.com Step 1.按照http://source.android.com/source/initializing.html配置好android编译环境 http://source.android.com/source/downloading.html配置好repo,大概步骤如下 $ mkdir ~/bin $ PATH=~/bin:$PATH $ curl https://dl-ssl.google.com/dl/googlesource/git-

如何下载Android源码(window和Linux)

文章参照来源:http://source.android.com/source/downloading.html 一.window平台 关于在window平台下载Android源码,网上一般使用的是直接用git来下载. 比如: http://wenku.baidu.com/view/a4f5f922482fb4daa58d4bb5.html http://hendyyou.iteye.com/blog/1147738 这种方式最严重的问题是,对源码只能分块(git块)进行下载,而且块数很多.关键

Ubuntu12.04 64bit版本下载Android源码完整教程

首先去官网http://source.android.com/source/initializing.html可以看到完整的安装教程.不过一般情况下,按照这个教程是无法一步到位的,因为中途肯定会遇到很多问题.这里我把我遇到的问题以及相应的解决方案总结一下: 1.sudo apt-get install git gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core

Windows平台下载Android源码(整理)

Google官方下载源码使用的系统Ubuntu系统,不过现在我们需要在Windows系统中下载Android源码文件. 网站的地址是:https://android.googlesource.com/ 里面包括Android系统各个部分的源码,我们只需要下载platform就行 点击进入即可看到下载地址 地址是:https://android.googlesource.com/platform/manifest 1.准备工作 Android的源代码管理使用的是Git,所以安装Git必不可少,Wi

unbuntu 下载android源码

在Windows下安装Cygwin,通过Cygwin也可在Windows里通过本文的下载步骤下载Android源码. 以下为在Ubuntu下下载Google Android4.4源码的步骤: 1. 安装curl 与 git sudo apt-get install curl sudo apt-get install git-core 2 安装 Repo a) 建立Repo的安装目录.配置环境变量 $ mkdir ~/bin $ PATH=~/bin:$PATH  b) 获取Repo工具 $ cu

安装repo,下载Android源码遇到问题

首先是repo的安装,参考网上的帖子都过时了,原因是下载服务器地址变动了.最好参考谷歌官方地址:http://source.android.com/source/downloading.html.下载好repo要配置环境变量. 我下载源码还是失败,原因你懂得...天朝GFW.... 顺便提醒一下Ubuntu配置环境变量的两个方法. 一.临时性添加 ~$ echo $PATH       # 显示当前环境变量 /usr/local/sbin:/usr/local/bin     # 显示举例,多个

下载Android源码(Ubuntu)

 下载Android源码(Unbuntu环境下) 1.sudo apt-get install git-core curl   #安装这两个工具 2.mkdir -p /develop/download-froyo    #根目录下建立响应工作目录 3.cd ~/develop/download-froyo 4.curl http://Android.git.kernel.org/repo > ./repo   #下载repo脚本 #现在一般会出现curl: (6) Couldn't res