\subsection{Results}

\begin{frame}
  \frametitle{Output}
  \begin{itemize}
  \item All the output is generated in the
    \code{out/} directory, outside of the source code directory
  \item This directory contains mostly two subdirectories:
    \code{host/} and \code{target/}
  \item These directories contain all the objects files compiled
    during the build process: \code{.o} files for C/C++ code,
    \code{.jar} files for Java libraries, etc
  \item It is an interesting feature, since it keeps all the generated
    stuff separate from the source code, and we can easily clean without
    side effects
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Images}
  \begin{itemize}
  \item It also generates the system images in the
    \code{out/target/product/<device_name>/} directory
  \item These images are:
    \begin{description}
    \item[boot.img] A basic Android image, containing only the needed
      components to boot: a kernel image and a minimal system
    \item[system.img] The remaining parts of Android. Much bigger, it
      contains most of the framework, applications and daemons
    \item[userdata.img] A partition that will hold the user generated
      content. Mostly empty at compilation.
    \item[recovery.img] A recovery image that allows to be able to
      debug or restore the system when something nasty happened.
    \end{description}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Android Boot Images}
  \begin{itemize}
  \item The boot images are actually an Android-specific format, that
    holds most of what the bootloader expects
  \item They contains useful information, like the kernel command
    line, where to load the kernel, but also the image of the kernel,
    and an optional initramfs image
  \item A custom \code{mkbootimg} tool is used by Android to generate
    these images at compilation time from the kernel and the system
    it's generating
  \item We can tweak the behaviour of that tool from the build system
    configuration, that allows a great flexibility
  \end{itemize}
\end{frame}

\begin{frame}{Android boot and recovery images}
  \begin{center}
  \includegraphics[width=1.0\textwidth]{slides/android-build-system-basics-results/boot-image-format.pdf}
  \end{center}
\end{frame}

\begin{frame}{Boot sequence}
  \begin{center}
  \includegraphics[width=0.8\textwidth]{slides/android-build-system-basics-results/boot-sequence.pdf}
  \end{center}
\end{frame}

\begin{frame}
  \frametitle{Cleaning}
  \begin{itemize}
  \item Cleaning is almost as easy as \code{rm -rf out/}
  \item \code{make clean} or \code{make clobber} deletes all generated
    files.
  \item \code{make installclean} removes the installed files for the
    current combo. It is useful when you work with several products to
    avoid doing a full rebuild each time you change from one to the
    other
  \end{itemize}
\end{frame}
