1. repo介绍
官方介绍:Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.
中文介绍:repo是google写的一个管理android源码的python脚本工具,根据配置文件(manifest)下载指定的代码。
2. manifest文件介绍
以下是一个简单的manifest文件,其中标红部分为我加的注释,在实际manifest文件中不存在。
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="aosp" fetch=".." review="https://android-review.googlesource.com/" />
//定义一个名为aosp的remote,remote名字不一定都是aosp。
<default revision="master" remote="aosp" sync-j="4" />
//设置默认的参数,上面是设置默认的revision(分支名)、默认的remote。若具体的仓库配置中没有指定revision或remote,就会使用默认的参数。
<project name="android/bsp/device/bosch/common" path="device/renesas/common" revision="cngen4-omr1-dylcr_ext_19.02_sop1_CarLife_Only"/>
//下载名为android/bsp/device/bosch/common的仓库到本地目录device/renesas/common,下载cngen4-omr1-dylcr_