Android Architecture : The Basic Nuts and Bolts

Android Architecture : The Basic Nuts and Bolts

Android is an omniscient OS with everyday millions of new devices being sold. This post tries to explain different layers of android architecture. Android architecture consists of several layers. They are:

  • Linux Kernel layer
  • Native Layer (Consisting of System Libraries and Android Runtime)
  • Application Framework
  • Application

Linux Kernel Layer is the lowest layer of software and it provides the core services that any android computing device will rely on. It provides generic operating system services such as :

  • Permissions (for security purposes)
  • Memory and process management(example: multiple processes can run simultaneously without interference with each other)
  • File & Network I/O (low level details of file and network I/O)
  • Device drivers (allows device drivers to be plugged in so that android can communicate with wide range of low level hardware components like camera, memory etc.)

System Libraries are written in C/C++ and they handle core performance sensitive activities on device like updating the display (managed by surface manager) or quickly rendering web pages(managed by webkit), Open GL for providing high performance graphics etc.

Android Runtime comprises of core java libraries and Dalvik Virtual Machine. Core java libraries written in core java programming language consist and support various packages and classes like Java.* and Javax.* classes, org.* packages, org.* packages for internet/web services etc.

Dalvik Virtual Machine: This is the software that actually executes android applications. Typically the application should run on Java Virtual Machine since the code is written in Java but it is not so. The developer writes the application in java language and the java compiler compiles the source code file into multiple java byte code files. Then a tool call DX converts the java byte code file in to a single DEX byte code file(referred to as CLASSES.DEX). Dex file is packaged with another app resource and installed on the device. Finally when user launches the app, the Dalvik Virtual Machine executes the CLASSES.DEX file.

Image: Typical workflow of Dalvik Virtual Machine

Application Framework contains reusable software. It has various components which manages different tasks.

  • Package manager: Keeps track of all the applications, Kernel installed in the device/system.
  • Window manager: Manages the main window that comprises the application.
  • View system: They provide common user interface elements for example Icons, buttons, text entry boxes and many more.
  • Content Providers:These are databases that allow application to store and share their structured information.
  • Location manager: Allows application to receive location and movement information generated by GPS system.

Application Layer: This layer hosts the applications which are already present or installed by users. Android comes with some built-in apps and these include things like Home(main screen), Contacts(Contacts database), Phone (Dialer), Browser(View web pages), Email Reader(Compose and read email messages).

Nice thing about android is that none of these apps are hard coded into the system. You can substitute your own app for any of these standard apps.

 

By Akanksha Choudhary, DecodeIT

To view or add a comment, sign in

More articles by Akanksha Choudhary

Explore content categories