(AOSP)repo checkout指定版本
aosp 怎么切换分支?
To properly switch Android version, all you need to change is branch for your manifest repository. First determine the available branches with manifests for the different Android versions:
cd $ANDROID_ROOT
cd .repo/manifests
git branch -av # see all available branches on origin
Select a version and
cd $ANDROID_ROOT
repo init -b <my_selected_android_version>
Such selective repo init with -b (without -u) will only update manifest branch and will not otherwise touch your tree.
Now, simply sync it:
repo sync -j8
and some time later, your Android tree will switch to another version.
Speed of this operation is mostly determined by how much default.xml manifest file differs between old and new Android versions - because if some git repository was added in new manifest, it will spend time cloning it. And if some repository was removed, if will actually blow it away.
But, by and large, this method is still much faster than initializing brand new Android tree from scratch.
https://stackoverflow.com/questions/14008113/how-to-switch-android-version-in-local-repo
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/manifests$ python repo init -b android-8.0.0_r9
遇到错误:
File "/usr/lib/aosp_dir/aosp/.repo/repo/project.py", line 2858, in runner
(self._project.name, name, p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.
执行以下命令:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
fatal: unable to auto-detect email address (got ‘caoxinyu@caoxinyu-ThinkPad-T470p.(none)’)
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/repo$ git config --global user.email "caoxinyu"
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/repo$ git config --global user.email "coaxinyu@gmail.com"
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/repo$ git config --global user.name "caoxinyu"
每次都会提示下面这些,不用管。
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/repo$ python repo init -b android-8.0.0_r9
warning: redirecting to https://aosp.tuna.tsinghua.edu.cn/platform/manifest/
Your identity is: caoxinyu <coaxinyu@gmail.com>
If you want to change this, please re-run 'repo init' with --config-name
repo has been initialized in /usr/lib/aosp_dir/aosp
If this is not the directory in which you want to initialize repo, please run:
rm -r /usr/lib/aosp_dir/aosp/.repo
and try again.
caoxinyu@caoxinyu-ThinkPad-T470p:/usr/lib/aosp_dir/aosp/.repo/repo$ python repo sync -j8
python repo sync -f
Syncing work tree: 52% (296/568)error: in `sync -f`: revision refs/tags/android-8.0.0_r9 in platform/external/valgrind not found
syncing work tree: 86% (489/568)error: in `sync -f -j10`: revision refs/tags/android-8.0.0_r36 in platform/prebuilts/clang/host/darwin-x86 not found
system/bt/embdrv/Android.bp": not found
总结:
不建议这样弄。我尝试了几次,都以失败告终。还是研究最新的android 代码好了。或者刚开始下载的时候,就下载你想要的版本。
(AOSP)repo checkout指定版本的更多相关文章
- [Git]checkout 指定版本
Task:知道commit号,如何checkout 指定版本 1. 切换到master: git checkout master 2. 下载最新代码: git pull 3. 下载head: git ...
- 在Linux Centos 7.2 上安装指定版本Docker。
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum remov ...
- 在Linux Centos 7.2 上安装指定版本Docker 17.03
相关资料链接: https://docs.docker.com/install/linux/docker-ce/centos/#install-docker-ce 先清空下“历史” yum insta ...
- 使用清华大学开源软件镜像AOSP的“每月更新初始化包”更新指定版本的Android源码
参照官方教程:Tsinghua Open Source Mirror 1. 下载了repo工具 mkdir ~/bin PATH = ~/bin:$PATH curl https://storag ...
- [git] 更新到某个指定版本
[git] 更新到某个指定版本 - Vanquisher - 博客频道 - CSDN.NET [git] 更新到某个指定版本 2015-09-06 09:30 527人阅读 评论(0) ...
- 在 Git 中 Checkout 历史版本
昨天写代码的时候,误删了一个文件.今天发现的时候,commit 已经 push 到版本库了.本想用 git reset 回退版本,找回文件后重新提交.但是想起 Git 是一个版本控制系统哎,直接从版本 ...
- Linux下yum安装MySQL yum安装MySQL指定版本
yum安装MySQL 1. 查看有没有安装过 yum list installed MySQL* (有存在要卸载yum remove MySQL*) rpm -qa | grep my ...
- brew 安装指定版本命令行工具 tmux 多版本实现
Homebrew 是 macOS 命令安装工具,其核心库里的命令行在 github homebrew-core 仓库上维护. 核心库命令大概有 5000 条左右,大部分的命令行工具只保留了最新版本的 ...
- 安装指定版本的docker服务
参考博客:Docker CE 镜像源站 参考博客:docker启动异常driver not supported 1. 说明 之前部署docker服务的时候都是安装最新的docker版本,并使用dock ...
随机推荐
- CF Gym101933K King's Colors
题目分析 题目要求在树上涂上恰好\(K\)种颜色的方案数. 设\(f(k)\)表示恰好涂上\(k\)种颜色的方案数(答案即为\(f(K)\)). 设\(g(k)\)表示至多涂上\(k\)种颜色的方案数 ...
- 快速理解Event事件
浏览器事件是所有web程序的核心.javascript与HTML之间的交互是通过事件实现的.通过这些事件我们定义将要发生的行为.事件是一种异步编程的实现方式,本质上是程序各个组成部分之间的通信. 1. ...
- ECMAScript6 Generator & async
Generator Generator函数是一个状态机,执行后返回一个遍历器对象.调用遍历器对象的.next()函数获取下一个状态. Generator是一个普通的函数,函数内部使用yield关键字定 ...
- 谈谈Ajax(二)
昨天还没有谈完,今天做一个了解. 首先还是以错误,来讲述. 一.AJax常见错误 Ajax常见的错误,除了昨天列举的之外.还有就是如下状态码: 405,请求类型错误,比如请求是POST,你却用GET, ...
- Spring Boot Web Error Page处理
spring Boot默认是whitelabel error page. 其实我们可以自己处理,由于时间有限,所以就简单说明一下方法. 首先配置 @Configuration public class ...
- mongodb副本集优先级设置
在设置mongodb副本集时,Primary节点.second节点,仲裁节点,有可能资源配置(CPU或者内存)不均衡,所以要求某些节点不能成为Primary我们知道mongodb的设置: 除了仲裁节 ...
- java和spring 线程池总结
1. spring 的线程池 ThreadPoolTaskExecutor @Configuration public class ThreadPoolConfig { @Bean("thr ...
- 前端面试题(copy)
前端开发面试知识点大纲: HTML&CSS: 对Web标准的理解.浏览器内核差异.兼容性.hack.CSS基本功:布局.盒子模型.选择器优先级及使用.HTML5.CSS3.移动端适应. Jav ...
- Reading Notes : 180213 计算机的硬件构成与处理流程
读书<计算机组成原理>,<鸟哥的Linux私房菜基础篇> 基本上接触过计算机的人,都多少知道计算机的具体构成,但是真正能讲明白的却说了很多,本节将讲解一下计算机的基本硬件构成和 ...
- oracle导出sequences
将某个用户的全部sequence查询出来,并拼成创建语句: select 'create sequence '||sequence_name|| ' minvalue '||min_value|| ' ...