What am I doing?
I am looking into developing for the Google Android platform. I am doing this because it appears likely that Android will see some success in competing with the iPhone for market share.
Here's the twist - My development will take place on a somewhat less-than-accomodating platform. I will be using an Asus EeePC 4G Surf with a 8.9" 800x480 display, 4G of disk, 512M RAM, and 630MHz Celeron. I am running a bare install of Debian with the dwm tiling window manager. I plan on using a CLI-based toolchain as opposed to the slick Eclipse IDE integration plugin offered by Google. Lessons learned here might be applicable to others who run mildly-stripped Linux systems.
Downloading the Android SDK
Download the software development kit direct from Google. Save it to your $HOME directory if you like. Unzip with unzip -x android*.
Prepare the Development Environment
There are a couple of dependencies that need to be taken care of. These include 'ant', 'sun-java6-jdk',
and sun-java6-jre' which are available from the non-free branch of your Debian repositories. They can be
installed with sudo apt-get install sun-java6-jdk sun-java6-jre ant && apt-get remove avahi-daemon
&& apt-get autoremove. I have removed avahi-daemon because I can't imagine that I'll actually need it
- we'll see later.
Next, append the path of the Android tools to your $PATH variable. mv android* android && echo
"export PATH=${PATH}:${HOME}/android" >> ~/.bashrc. This will let you run the CLI tools without
using their full paths. Go ahead and source ~/.bashrc if you want the changes to
take place immediately.
Testdrive the Emulator
Because the screen I'm using is so small, I will be using the emulator in "landscape" mode so that
I can fit more on the screen. First, create a data directory so that the emulator can benefit from the speedup:
mkdir ~/android/data. Then, to run the emulator, use emulator -datadir ~/android/data -noaudio -skin HVGA-L -scale 0.8. The scaling used here lets me fit the entire emulated device image as well as the virtual keyboard on the
EeePC's small screen.
The emulator will take a VERY long time to start. Run adb logcat to view the verbose logs generated by the startup sequence.