听闻少年二字,当与平庸相斥。这篇文章主要讲述简记Ubuntu下载 Android源码相关的知识,希望能为你提供帮助。
1.下载Ubuntu系统,推荐16.04以上版本;
2. git : 使用repo工具的时候会用到git,要预先安装git,使用命令:sudo apt-get install git
3. 安装git后,对git进行配置,设置git电子邮件和用户名
(1) git config --global user.email "你的电子邮件"
(2) git config --global user.name "你的名字"
4. 安装curl (开源文件传输工具) , 使用命令: sudo apt-get install curl -y
【简记Ubuntu下载 Android源码】5. 重要环节 : 下载repo
下载repo之后,将repo的路径设为环境变量,并且将权限改成可执行
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo >
~/bin/repo
chmod a+x ~/bin/repo
6.
接下来新建一个目录,用于放置android源码,并进入该目录如下:
(1) mkdir android
(2) cd android
7. 使用repo初始化
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
如果提示无法连接到 gerrit.googlesource.com,可以编辑 ~/bin/repo,把 REPO_URL 一行替换成:
REPO_URL = ‘https://mirrors.tuna.tsinghua.edu.cn/git/git-repo‘
如果你只想下载特定的android版本,可以使用如下命令:
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b
Android版本 (比如:android-7.1.1_r13)
8. 下载代码,命令如下 (注:这个过程很耗时间)
repo sync
推荐阅读
- Codeforces 348B(Apple Tree(DFS+LCM+思维))
- 华为 Mate8 Emui 5.0 安卓 7.0 root 记录
- 常用 Android 图片处理框架的比较
- 灰色的博弈(那些靠“方便”赚钱的APP们)
- Appium 002--环境安装(安装Android模拟器)
- Appium 001--环境安装(安装Appium)
- android平台sdk接入的一些坑
- Ceres Solver for android
- Android上HotPatch热修复的安全问题