(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 ...
随机推荐
- ADF系列-1.EO的各个属性初探
ADF中的EO可以看做关系型数据库中表的java展现形式. 1.Type 此处的Type是java的类型,而需要映射的是数据库的类型,两者之间存在一些差异,各个映射关系如下: 数据库列类型 BC 属性 ...
- C++禁止使用拷贝构造函数和赋值运算符方法
1.将拷贝构造函数和赋值运算符声明为私有,并不予实现 class Uncopyable { private: Uncopyable(const Uncopyable &); // 阻止copy ...
- 【转】Android之drawable state各个属性详解
我们在定义一个drawable的时候可以通过xml定义的drawable对象.它使得一个图片能在不同的状态下显示不同的图案,比如一个Button,它有pressed,focused,或者其它状态,通过 ...
- Linux入门基础介绍
概述: 1. linux是一个开源.免费的操作系统,其稳定性.安全性.处理多并发已经得到业界的认可,目前很多企业级的项目 都会部署到Linux/unix系统上. 2. 常见的操作系统(w ...
- HTTP缓存机制--客户端缓存(转)
客户端缓存 客户端侧缓存一般指的是浏览器缓存,目的就是加速各种静态资源的访问,想想现在的大型网站,随便一个页面都是一两百个请求,每天 pv 都是亿级别,如果没有缓存,用户体验会急剧下降.同时服务器压力 ...
- mongo复制集、分片集(亲测)
1.1 架构思路: 192.168.50.131 192.168.50.131 192.168.50.132 mongos mongos mongos ...
- linux内核自己添加模块(内核版本:3.0.101)
做内核驱动第一步都是学习如何添加模块,这是基础,有了这个基础,剩下就是写代码了. 由于2.4到2.6内核版本的更新,无论是系统调用还是模块添加机制都有了巨大的变化,本人也因此饱经挫折,最后在3.0.1 ...
- HDU 1017A Mathematical Curiosity (暴力统计特殊要求个数)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1017 A Mathematical Curiosity Time Limit: 2000/1000 M ...
- oracle查询相关注意点
单表查询: .or 和 and 混合使用 需求:查询业主名称包含'刘'或门牌号包含'5'的,并且地址编号为3的记录 and 的权限优先于 or 所以需要在or的两边添加() 2. 范围查询 除了传统的 ...
- dva框架使用详解及Demo教程
dva框架的使用详解及Demo教程 在前段时间,我们也学习讲解过Redux框架的基本使用,但是有很多同学在交流群里给我的反馈信息说,redux框架理解上有难度,看了之后还是一脸懵逼不知道如何下手,很多 ...