\subsection{Contents}
\begin{frame}
  \frametitle{Filesystem organization on GNU/Linux}
  \begin{itemize}
  \item On most Linux based distributions, the filesystem layout is
    defined by the Filesystem Hierarchy Standard
  \item The FHS defines the main directories and their contents
    \begin{description}
    \item[/bin] Essential command binaries
    \item[/boot] Bootloader files, i.e. kernel images and related stuff
    \item[/etc] Host-specific system-wide configuration files.
    \end{description}
  \item Android follows an orthogonal path, storing its files in
    folders not present in the FHS, or following it when it uses a
    defined folder
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Filesystem organization on Android}
  \begin{itemize}
  \item Instead, the two main directories used by Android are
    \begin{description}
    \item[/system] Immutable directory coming from the original
      build. It contains native binaries and libraries, framework jar
      files, configuration files, standard apps,  etc.
    \item[/data] is where all the changing content of the system are put:
      apps, data added by the user, data generated by all the apps at
      runtime, etc.
    \end{description}
  \item These two directories are usually mounted on separate
    partitions, from the root filesystem originating from a kernel
    RAM disk.
  \item Android also uses some usual suspects: \path{/proc},
    \path{/dev}, \path{/sys}, \path{/etc}, \path{sbin}, \path{/mnt}
    where they serve the same function they usually do
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{/system}
  \begin{description}
  \item[./app] All the pre-installed apps
  \item[./bin] Binaries installed on the system (toolbox, vold,
    surfaceflinger)
  \item[./etc] Configuration files
  \item[./fonts] Fonts installed on the system
  \item[./framework] Jar files for the framework
  \item[./lib] Shared objects for the system libraries
  \item[./modules] Kernel modules
  \item[./xbin] External binaries
  \end{description}
\end{frame}

\begin{frame}
  \frametitle{Other directories}
  \begin{itemize}
  \item Like we said earlier, Android most of the time either uses
    directories not in the FHS, or directories with the exact same purpose as in
    standard Linux distributions (\code{/dev}, \code{/proc}), therefore avoiding collisions.
    \code{/sys})
  \item There is some collision though, for \code{/etc} and
    \code{/sbin}, which are hopefully trimmed down
  \item This allows to have a full Linux distribution side by side
    with Android with only minor tweaks
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{android\_filesystem\_config.h}
  \begin{itemize}
  \item Located in \code{system/core/include/private/}
  \item Contains the full filesystem setup, and is written as a
    C header
    \begin{itemize}
    \item UID/GID
    \item Permissions for system directories
    \item Permissions for system files
    \end{itemize}
  \item Processed at compilation time to enforce the permissions throughout
    the filesystem
  \item Useful in other parts of the framework as well, such as ADB
  \end{itemize}
\end{frame}
