Android

Written by Ian on 30/08/10


OK you probably know that Android is based on Linux.
• Mainly due to the extreme reliability of Linux, it's configuability and efficiency.
• Without Linux we wouldn't have a working Android.

So what does Andoid bring to Linux?
• Well, it has some sort of wierd JAVA-based application development. Oh, and also 40,000 (and counting) applications that can be downloaded and run on any Androd device...

Recently I booted up Androd on a spare (very fast) ARM-based computer that I had lying round - a Beagleboard.
• This is a very compact, nicely coloured board mounted with a Texas Instruments OMAP processor (basically an augmented ARM), and lots of nice peripherals.

I had purchased a hy-research LCD display panel (and driver board) from SpecialComputing (which cost as much as the Beagleboard), and came with a resistive touchscreen.

OK, Android boots fine, but so far the touchscreen hasn't worked.
• Not good when you're running Andriod!

So my exploration began.

I started by connecting over the serial port - 115200 8N1, no problem there.
• Next I decided to use a decent shell (instead of the very basic one running by default). To do this I just typed

ash

Now I was in a decent shell I started to look around.
• Here's what I found.

STANDARD LINUX FEATURES

- the kernel (although there seem to be a few patches)

- the process list

- the /sys/, /proc/ and /dev/ directories

- the $PATH variable, and most (but not all) of the shell workings

- the system log (dmesg), although Android does have its own logging method.

- the user/group/password system - but not sure how that relates to Androd apps

- the system startup, at least until the init process runs (the first process to run once the Linux kernel has booted - with a PID of 1)

- the filesystem and mounting mechanisms

DIFFERENCES TO STANDARD LINUX

- the init process is definitely non-standard

- the location of the init scripts, and their syntax

- the /etc/ directory, /bin/ and other locations of executables

- the system libraries (strange)...

- the user interface (it's Android!)

- the method of controlling and executing programs

 

So in terms of differences (and ignoring the Android packages and XML files that you can learn about elsewhere), things run under Android are executed within Android, and can not be executed on the command line (or at least, I haven't worked out how to do this yet).

• Android, although it runs on Linux, seems to be quite self-contained.
• It is self-referencing and complete.
• For development, you connect to the Android system from your development Linux PC, and execute applications (on the target system) directly from that host computer.
• The host similarly debugs the applications on the target.
• Normally, this takes place (presumably) from an IDE running on the host machine. No command line in sight!
• Android is strange.
• Although it is graphicaly rich, and full of application support, it misses out on one of the greatest features of Linux: the powerful shell and system level commands that this contains.

 

Now as for developing Android applications, that comes next!