\subchapter{Add a native application to the build}{Learn how to begin with
the Android build system}

After this lab, you will be able to:
\begin{itemize}
  \item Add an external binary to a system
  \item Express dependencies on other components of the build system
\end{itemize}

\section{Add the binary to the compiled image}
Copy the \code{bin} folder from the
\code{$HOME/android-labs/native-app} directory and put it into your
device folder.


Just as for \code{libusb}, you now need to make an \code{Android.mk} file
giving all the details needed by the build system to compile. But
unlike \code{libusb}, this binary is an executable and depends on another
piece of software.

Make it compile and be integrated in the generated images. Once you
have the images, boot the board, plug a missile launcher and test the
application.

You can then control the missile launcher once you have started the
\code{mlbin} application, using the following commands on the
standard input, following by the duration in seconds:
\begin{itemize}
	\item L - go left
	\item R - go right
	\item U - go up
	\item D - go down
	\item F - actionnate trigger
\end{itemize}

For example, use \code{L 1 U 1 F 5} will turn left for one second, up
for one second and fire a missile.
