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 andcd $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-namerepo 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指定版本相关推荐

  1. centos+7.2+linux版本,在Linux Centos 7.2 上安装指定版本Docker。

    相关资料链接: 先清空下"历史" yum remove docker \ docker-common \ docker-selinux \ docker-engine 安装必要的包 ...

  2. CentOS 6.9/7通过yum安装指定版本的JDK/Maven

    说明:通过yum好处其实很多,环境变量不用配置,配置文件放在大家都熟悉的地方,通过rpm -ql xxx可以知道全部文件的地方等等. 一.安装JDK(Oracle JDK 1.8) # wget -- ...

  3. 使用git修复线上指定版本的问题

    作为一个码农,bug就像家常便饭一样.有了bug就需要修复,在Git中,由于分支是如此的强大,所以,每个bug都可以通过一个新的临时分支来修复,修复后,合并分支,然后将临时分支删除. 今天我们就来聊聊 ...

  4. centos 安装指定版本gc_番外篇 (1) Docker 安装

    # step 1: 安装必要的一些系统工具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 # Step 2: 添加软 ...

  5. Git 将代码回到指定版本

    将代码回到hash为1fbcb7ea3b43df60c639875d2bb68e20b451059e的版本 git checkout 1fbcb7ea3b43df60c639875d2bb68e20b ...

  6. centos7.x 升级svn版本到指定版本(1.10)

    centos7.x 升级svn版本到指定版本 为什么要升级? 在测试过程中为了进行代码diff,需要使用svn的一些命令来进行自动化操作,发现本地和服务器的版本不一致,且服务器svn client的版 ...

  7. cordova指定版本_Cordova 基本命令 以及如何添加,删除插件

    1.在使用cordova前,要先按照 node.js ,node.js 的安装不在此说明,可以百度. 在命令提示符里面输入 node -v,会显示是否安装成功 2.全局安装cordova npm in ...

  8. linux安装指定mysql版本安装,linux yum安装指定版本mysql

    1.下载mysql rpm包 cd /usr/local/src wget https://dev.mysql.com/get/mysql80-community-release-el7-.noarc ...

  9. MacOSX系统下HomeBrew安装指定版本的软件 IntelliJ IDEA 设置多个Go语言版本开发

    HomeBrew安装指定版本的软件 快速多版本切换 通过 brew install [formula]@[tag] 安装多个版本,然后把其他版本移动到[formula]默认目录中,然后通过brew s ...

最新文章

  1. 4种方法可以缓解网络瓶颈
  2. 2、ACE-实用生活口语-介绍 Introductions
  3. sql 替换字符串函数_你有一份Excel文本函数大全,请注意查收(下)
  4. 麦子学院6.1 神经网络算法(Nerual Networks)(上) 学习笔记
  5. Go专栏“改善Go语言编程质量的50个有效实践”上线了
  6. 如何html设置下载的字体呢?
  7. 如何压缩ppt幻灯片
  8. 美国的人民币汇率谋略
  9. 【Spring Boot】——集成JSON工具
  10. 使用node爬取小说内容并保存到本地
  11. 股票数据接口-陈科肇
  12. 私房小菜菜谱和煲汤大全汇总
  13. 北京也有这么蓝的天---美不胜收
  14. OpenGL入门之纹理的使用
  15. 疫情下健身房经营策略怎么做?做好三大要点,实现逆风翻盘
  16. 纺织行业管理系统软件_毛织ERP_指点纺织ERP
  17. (附源码)小程序智能养老系统平台 毕业设计170900
  18. 基于卷积神经网络VGG实现水果分类识别
  19. 深入理解Java注解类型(@Annotation)
  20. wordpress异步ajax上传文件

热门文章

  1. 中国航信官笔试计算机基础,中国航信笔试题目
  2. yolov3模型识别不出训练图片_YOLOv3训练自己的模型
  3. php 复杂密码生成,php随机密码生成器
  4. C++string类知识点总结
  5. error: ‘::main‘ must return ‘int‘
  6. MFC两个复选框互斥设置
  7. MIna框架I/O Service层设计
  8. 关东升的《从零开始学Swift》3月9日已经上架
  9. UITableView数据更新问题
  10. Emacs之爬坑日记(一)