Android Architecture

Android Architecture – 5 Essential Components of Android Architecture

Android architecture is basically a design flow of how the android device works in order to perform any kind of operation. Well, to understand any OS (operating system) its very important to understand its architecture.I know most of you might not understand what exactly does a “operating system architecture” mean. What you see on screen right now is just the upper layer of this architecture. Any action you perform on the screen goes through some set of layers and in the end interacts with the hardware of your machine. 

Android was created for a small machines. So designers should keep in mind that they would be working with limited resources yet will have to replicate the operations performed on big machines. Therefore they had to come up with a architecture specific to small machine/devices.

For more definitions on android you can visit : What Is Android ?

Android Architecture

We can classify Android Architecture into four layers.

  • Linux Kernel
  • Libraries+Android Runtime
  • Application Framework
  • Applications

Linux Kernel

This is at the bottom of the Android architecture. Let’s understand what exactly Kernel means. Kernel is central module of a OS. It is responsible for disk management, memory management and process management. Basically  kernel is the first layer of software which interacts with the device hardware.

Android architecture also needs a kernel and instead of writing its own they choose Linux. Why? Because Linux is open source project, Google’s Android developers can modify the Linux kernel to fit their needs. Linux gives the Android developers already maintained operating system kernel to start with. This is the way many different devices are built. for example, the Xbox One uses the Windows NT kernel which is found in modern versions of Windows, also the PlayStation 4 uses the open-source FreeBSD kernel.

HAL(Hardware Abstraction Layer)

Android application communicates with the underlying hardware by the Java APIs not by system calls. But the Linux has the ability to handle only systems calls from the application. Therefore a layer is required which can acts as bridge between hardware and software. HAL acts as this bridge layer.

The hardware abstraction layer, or HAL as its popularly known  defines a standard interface for hardware vendors to implement and allows Android Applications to be agnostic about lower-level driver implementations. It is a c/c++ layer which is a vendor specific implementation. HAL implementations are packaged into modules (.so) file and loaded by the Android architecture system at the appropriate time. Android architecture HAL allows the Android application to communicate with the hardware specific device drivers.

Libraries

On the top of HAL we have a set of libraries which are used to enable various features in the Android OS. All these are written in C++ programming language. Here are some of these libraries with its function.

SQLite : It is used to access data published by content providers and includes SQLite database management classes.

SSL : It is used to provide internet security.

OpenGL : It is used to provide Java interface to the OpenGL/ES 3D graphics rendering API.

Media framework : It is used to provides different media codecs which allow the recording and playback of different media formats

WebKit : It is the browser engine used to display internet content or HTML content

Android Runtime

Android Runtime basically has two components

  • Dalvik Virtual Machine
  • Core Libraries

Dalvik Virtual Machine
Well I consider this as the most important part of Android architecture. This is what makes Android ->”ANDROID”:P Actually everything above this level of the Android architecture  is written in Java. So basically we will have a set of .class files. Running those .class files on a small mobile processor is could lead to issues. Dalvik Virtual machine converts these .class files into .dex files which makes processing much faster. These files run with minimum memory footprint. Hence you can have multiple instances of this Virtual Machine running  i.e. Multitasking. Dalvik Virtual Machine is similar to JVM but only difference is that it is designed and optimized for Android architecture.

Core Libraries
These are a set of libraries written in Java to provide APIs for Android development

Android Application Framework

This is the topmost level of Android Architecture. It is basically the environment in which your application runs. This layer provides high level APIs for your android application, enabling it to implement custom features. I have listed some components below

  • Activity Manager – Controls all aspects of the application life cycle and activity stack.
  • Content Providers – Allows applications to publish and share data with other applications.
  • Resource Manager – Provides access to non-code embedded resources such as strings, color settings and user interface layouts.
  • Notifications Manager – Allows applications to display alerts and notifications to the user.
  • View System – An extensible set of views used to create application user interfaces.
  • Package Manager – The system by which applications are able to find out information about other applications currently installed on the device.
  • Telephony Manager – Provides information to the application about the telephony services available on the device such as status and subscriber information.
  • Location Manager – Provides access to the location services allowing an application to receive updates about location changes.

Applications

This contains all the application that you see on your device. This includes system based apps like Contacts, Calender etc and all the applications you have installed from the Google playstore. All these are developed with the help of APIs from core libraries and Android framework.

Since, android is an open source OS for mobile devices & a corresponding open source project led by Google. This site and the AOSP (Android Open Source Project) repository offer the information and source code needed to create different custom variants of the Android Operating System, port devices and accessories to the Android platform, & ensure devices meet the compatibility requirements that will keep the Android ecosystem a healthy and stable environment for millions of users.

1 thought on “Android Architecture – 5 Essential Components of Android Architecture”

  1. Pingback: Ninja Gaming

Leave a Reply