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

  • 相关阅读:
    由jQuery Validation Remote验证引起的错误(MVC3 jQuery.validate.unobtrusive)
    Windows8下设置VS默认启动方式为管理员启动
    Asp.Net MVC 必备插件MVC Route Visualizer(Visual Studio 2012 版)
    2012 LinkCoder Jeffrey Richter:Win 8应用开发与.NET4.5
    WCF应用:宿主与调用纯代码示例(Host &Client code only sample)
    Nexus 7 入手风波记
    [转]使用HyperV BPA(Best Practices Analyzer最佳化分析工具)
    [转]SCVMM2012部署之一:先决条件条件准备
    [转]VMware管理员必掌握的八个HyperV功能
    [转]Installing and Configuring target iSCSI server on Windows Server 2012
  • 原文地址:https://www.cnblogs.com/caoxinyu/p/10568468.html
Copyright © 2011-2022 走看看