Design Article
Android, Linux & Real-time Development for Embedded Systems
Colin Walls
1/19/2010 6:56 PM EST
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.
Android History
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.
Android Architecture
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.



gavinsingh
5/2/2011 2:47 PM EDT
Great article!
Sign in to Reply
bubbapebi
5/2/2011 4:43 PM EDT
It is a very interesting piece. However, I found it difficult to read the code in those inserted JPEG's. Could you, perhaps use PNG? The files are bigger, but they produce a much clearer image. Thanks.
Sign in to Reply
Anatolio
8/8/2011 1:42 PM EDT
I can not understand: why Andriod is so complex.
Why programmers gone frome traditional programming to Virtual Machines. Hardware machines was so bad?
I think - it's attempt to monopolize all the world.
Sign in to Reply
Anatolio
8/9/2011 1:51 AM EDT
First they were combained all (mp3, mp4, Wi-Fi, etc.) in one big heap and one core. Then began split by functions: one function for one core.
Where their Logic is?
Better have separate devices: Phone, Player, FM-radio. Maybe in one transformable common case...
Sign in to Reply
pekon_
11/25/2011 4:30 PM EST
very nice introductory article..indeed helpful for novice like me
[pekon]
Sign in to Reply