Sunday 25 April 2010

Building Android in Debian Sid

We are going to build and test Android in Debian Sid on x86 32 bits architecture.

As a requirement we need JDK 5.0, update 12 or higher. Java 6 is not supported, because of incompatibilities with @Override.

Debian Sid provides all packages we need except this one. We could install from source but instead we are going to install JDK 5.0 from Debian Stable (Lenny) repositories:

ADD DEBIAN STABLE (LENNY) REPOSITORIES


#echo "deb http://ftp.debian.org/debian/ stable main contrib non-free" >> /etc/apt/sources.list

#aptitude update

sun-java5-jdk package will now become available.


INSTALL ALL PACKAGES WE NEED:


#aptitude install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev


SELECT THE RIGHT JAVA VERSION:


$file /etc/alternatives/java* # To know which alternative files we have to update.
#update-alternatives --config java
#update-alternatives --config java_vm
#update-alternatives --config javaws


We also install valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
#aptitude install valgrind