\subsection{How to get the source code}
\begin{frame}
  \frametitle{Source Code Location}
  \begin{itemize}
  \item The AOSP project is available at
    \url{http://source.android.com}
  \item On this site, along with the code, you will find some resources
    such as technical details, how to setup a machine to build
    Android, etc.
  \item The source code is split into several Git repositories for
    version control. But as there is a lot of source code, a single
    Git repository would have been really slow
  \item Google split the source code into a one Git repository per
    component
  \item You can easily browse these git repositories using
    \url{https://code.google.com/p/android-source-browsing/source/browse/}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Source code licenses}
  \begin{itemize}
  \item Mostly two kind of licenses:
    \begin{itemize}
    \item GPL/LGPL Code: Linux
    \item Apache/BSD: All the rest
    \item In the \code{external} folder, it depends on the component
    \end{itemize}
  \item While you might expect Google's apps for Android, like the
    Android Market (now called Google Play Store), to be in the AOSP
    as well, these are actually proprietary and you need to be
    approved by Google to get them.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Repo}
  \begin{itemize}
  \item This makes hundreds of Git repositories\!
  \item To avoid making it too painful, Google also created a tool:
    \code{repo}
  \item Repo aggregates these Git repositories into a single folder
    from a manifest file describing how to find these and how to put
    them together
  \item Also aggregates some common Git commands such as \code{diff}
    or \code{status} that are run across all the Git repositories
  \item You can also execute a shell command in each repository
    managed by Repo using the \code{repo forall} command
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Repo's manifest}
  \begin{itemize}
  \item \code{repo} relies on a git repository that will contain XML
    files called manifests
  \item These manifests gives the information about where to download
    some source code and where to store it. It can also provide some
    additional and optional information such as a revision to use, an
    alternative server to download from, etc.
  \item The main manifests are stored in this git repo, and are shared
    between all the users, but you can add some local manifests.
  \item \code{repo} will also use any XML file that is under
    \code{.repo/local_manifests}
  \end{itemize}
\end{frame}

\begin{frame}[fragile]
  \frametitle{Manifests syntax}
\begin{minted}[fontsize=\scriptsize]{xml}
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="github"
          fetch="https://github.com/" />

  <default remote="github" />

  <project name="foo/bar" path="device/foo/bar" revision="v14.42" />

  <remove-project name="foo/bar" />
</manifest>
\end{minted}
\end{frame}
