Android, Linux & Real-time Development for Embedded SystemsAt first sight, Android appears to be (yet) another operating system for smart phones, joining all of the others that are vying for supremacy " such as Symbian, Windows Mobile, WebOS and various flavors of Linux.
However, it would be better to think of Android as being a software platform for the construction of smart phones, as it is freely available and highly configurable. To be more precise, it is a software platform for building connected devices.
Android is an application framework on top of Linux. We will look at the details of the layers of the framework, shortly. It is supplied as open source code, but does not bind the user with the constraints of the GPL " there is no requirement for developers to make public any code developed using Android.
Another way to look at Android is to take a historical perspective. In the early days of the PC, the operating system was DOS. A programmer writing applications for the PC had some significant challenges, as the services provided by the operating system were quite limited.
For example, the developer of a spreadsheet application would need to provide drivers for every possible printer that users might wish to deploy. This was a significant development and support overhead.
In due course, the release and wide acceptance of Windows (version 3 onwards) addressed this problem very effectively. In many ways, Android does for Linux what Windows did for DOS: it provides an intermediary layer between the application program and the operating system.
As Android seems to be a hot topic of discussion at this time, it is hard to remember that it is quite new. It really started when Google acquired Android Inc. in 2005. They established the Open Handset Alliance and announced Android in 2007, with the first handset appearing the following year. The source code was released at that time.
Android has now reached version 2.1 and enjoys widespread support, as more devices " mainly handsets " have been announced. The latest, and certainly the most talked about, being Google's own Nexus One device.
An Android system consists essentially of five software layers: 1) Linux; 2) Libraries; 3) Runtime; 4) Application Framework; 5) Applications
Linux . The bottom layer is the Linux OS itself " version 2.6.3x with 115 patches, to be precise. This provides process and memory management, security, networking and an array of relevant device drivers.
Libraries. A set of libraries reside on top of the OS. This includes Google's version of libc, called bionic, along with media and graphics libraries and a lightweight database " SQLite.
Runtime. Alongside the libraries, on top of the OS, is the Android runtime " the Dalvik VM. This is not strictly a Java virtual machine, though it serves that purpose. It was designed specifically for Android and is register based to conserve memory and maximize performance. A separate instance of the Dalvik VM is used to execute each Android application. The underlying OS is used for memory management and multi-threading.
Application Framework. This layer provides a number of services to applications: views, content providers and resource, notification and activity managers. These are all implemented as Java classes. Any application can "publish" its capabilities for use by other applications.
Applications. A number of applications are routinely distributed with Android, which may include email, SMS, calendar, contacts, and Web browser. All applications have the same status " the supplied ones are not "special".
Applications are generally written in Java and processed with the standard Java tools with a converter being used to translate to the Dalvik VM bytecodes.