• (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 代码好了。或者刚开始下载的时候,就下载你想要的版本。

  • 相关阅读:
    kettle excel input 利用通配符一次读入多份文件
    PowerDesigner Name、Code 映射设置
    PowerDesigner 建立约束
    PowerDesigner 创建概念模型、转换显示风格、概念模型转逻辑模型
    SQL 语言分类
    PowerDesigner 使用域、逻辑模型转物理模型、查看DDL语句
    DB、ETL、DW、OLAP、DM、BI关系结构图
    读懂BI商业智能与大数据应用的区别
    java 生成excel
    IntelliJ IDEA 2016 2.5 安装 并使用其新建一个maven web项目部署发布
  • 原文地址:https://www.cnblogs.com/caoxinyu/p/10568468.html
Copyright © 2020-2023  润新知