Android manifest 获取源代码

/*********************************************************************************
 *                      Android manifest 获取源代码
 * 说明:
 *     获取Android源代码,以及使用manifest进行代码管理,这里没有涉及到如何push到
 * gitlab仓库。
 *
 *                                              2017-11-22 深圳 南山平山村 曾剑锋
 ********************************************************************************/


一、参考文档:
    1. Android 镜像使用帮助
        https://mirror.tuna.tsinghua.edu.cn/help/AOSP/
    2. https://github.com/ZoroZeng/manifest
        
二、操作方法:
    1. 参考文档2里面有说明怎么使用repo;
    2. Android镜像站可以帮助我们获取到Google的Android Source Code;
    3. 这个在我们搭建自己的Android manifest的时候,避免获取不到Android Source Code。

三、示例:

    <?xml version="1.0" encoding="UTF-8"?>
    <manifest>
    
      <!--
      <remote  name="aosp"
               fetch="https://android.googlesource.com/" />
      -->
      <remote  name="aosp"
               fetch="https://aosp.tuna.tsinghua.edu.cn/" />
      
    
      <default revision="refs/tags/android-6.0.1_r22"
               remote="aosp"
               sync-j="4" />
    
      <remote name="gitlab"
            fetch="http://23.106.155.16/gitlab/zengjf" />   <!-- 假设的 -->
    
      <project path="build" name="platform_build" remote="gitlab" revision="m6.0.1_2.1.0" >
      <copyfile src="core/root.mk" dest="Makefile" />
      </project>
      <project path="bootable/bootloader/uboot-imx" name="uboot-imx" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="kernel_imx" name="kernel_imx" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="bionic" name="platform_bionic" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="bootable/recovery" name="platform_bootable_recovery" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="device/fsl-proprietary" name="platform_device_fsl-proprietary" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="device/fsl-codec" name="platform_device_fsl-codec" remote="gitlab" revision="m6.0.1_2.1.0" />
      <project path="device/fsl" name="platform_device_fsl" remote="gitlab" revision="m6.0.1_2.1.0" />
      ...
    
      <!--For AOSP -->
      <project path="abi/cpp" name="platform/abi/cpp" groups="pdk" />
      <project path="art" name="platform/art" groups="pdk" />
      <project path="cts" name="platform/cts" groups="cts,pdk-cw-fs,pdk-fs" />
      <project path="developers/build" name="platform/developers/build" />
      <project path="developers/demos" name="platform/developers/demos" />
      <project path="developers/docs" name="platform/developers/docs" />
      ...
    
    </manifest>

 

posted on 2017-11-23 17:39  zengjf  阅读(833)  评论(0编辑  收藏  举报

导航