\subsection{envsetup.sh}

\begin{frame}
  \frametitle{Purpose}
  \begin{itemize}
  \item Obviously modifies the current environment, that's why we have
    to \code{source} it
  \item It adds many useful shell macros
  \item These macros will serve several purposes:
    \begin{itemize}
    \item Configure and set up the build system
    \item Ease the navigation in the source code
    \item Ease the development process
    \end{itemize}
  \item Some macros will modify the environment variables, to be used
    by the build system later on
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Environments variables exported 1/2}
  \begin{itemize}
  \item \code{ANDROID_EABI_TOOLCHAIN}
    \begin{itemize}
    \item Path to the Android prebuilt toolchain
      (\code{.../prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin})
    \end{itemize}
  \item \code{ANDROID_TOOLCHAIN}
    \begin{itemize}
    \item Equals to \code{ANDROID_EABI_TOOLCHAIN}
    \end{itemize}
  \item \code{ANDROID_QTOOLS}
    \begin{itemize}
    \item Tracing tools for qemu
      (\code{.../development/emulator/qtools}). This is weird however,
      since this path doesn't exist at all
    \end{itemize}
  \item \code{ANDROID_BUILD_PATHS}
    \begin{itemize}
    \item Path containing all the folders containing tools for the
      build
      (\code{.../out/host/linux-x86/bin:$ANDROID_TOOLCHAIN:$ANDROID_QTOOLS:$ANDROID_TOOLCHAIN:$ANDROID_EABI_TOOLCHAIN})
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Environments variables exported 2/2}
  \begin{itemize}
  \item \code{JAVA_HOME}
    \begin{itemize}
    \item Path to the Java environment
      (\code{/usr/lib/jvm/java-6-sun})
    \end{itemize}
  \item \code{ANDROID_JAVA_TOOLCHAIN}
    \begin{itemize}
    \item Path to the Java toolchain (\code{$JAVA_HOME/bin})
    \end{itemize}
  \item \code{ANDROID_PRE_BUILD_PATHS}
    \begin{itemize}
    \item Alias to \code{ANDROID_JAVA_TOOLCHAIN}
    \end{itemize}
  \item \code{ANDROID_PRODUCT_OUT}
    \begin{itemize}
    \item Path to where the generated files will be for this product
      (\code{.../out/target/product/<product_name>})
    \end{itemize}
  \item \code{OUT}
    \begin{itemize}
      \item Alias to \code{ANDROID_PRODUCT_OUT}
    \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Defined Commands 1/2}
  \begin{description}
  \item[lunch] Used to configure the build system
  \item[croot] Changes the directory to go back to the root of the
    Android source tree
  \item[cproj] Changes the directory to go back to the root of the
    current package
  \item[tapas] Configure the build system to build a given application
  \item[m] Makes the whole build from any directory in the source tree
  \item[mm] Builds the modules defined in the current directory
  \item[mmm] Builds the modules defined in the given directory
  \end{description}
\end{frame}

\begin{frame}
  \frametitle{Defined Commands 2/2}
  \begin{description}
  \item[cgrep] Greps the given pattern on all the C/C++/header files
  \item[jgrep] Greps the given pattern on all the Java files
  \item[resgrep] Greps the given pattern on all the resources files
  \item[mgrep] Greps the given pattern on all the Makefiles
  \item[sgrep] Greps the given pattern on all Android source file
  \item[godir] Go to the directory containing the given file
  \item[pid] Use ADB to get the PID of the given process
  \item[gdbclient] Use ADB to set up a remote debugging session
  \item[key\_back] Sends a input event corresponding to the Back
    key to the device
  \end{description}
\end{frame}
