Platform is the combination of a particular computer and a particular operating system where as architecture defines the structure and organization of a computer’s hardware or a system software. In the previous post we discussed about the Android platform and through this post we will see the architecture of Android.The figure below is the architecture of Android.
In the 2nd post of this series we have seen the brief description about the structure of Android.Now lets go deep into the layers of Android.
Following are the different layers in the Android stack:
- Linux Kernel Layer
- Native Layer
- Application Framework Layer
- Applications layer
Linux kernel Layer
Linux kernel lies at the bottom of the Android stack.Linux kernel provides the functionalities like : Hardware ,Abstraction,Memory Management Programs,Security Settings,Power Management Software,Other Hardware Drivers (Drivers are programs that control hardware devices.),Support for Shared Libraries,Network Stack.
In the initial stage the bootloader loads the Kernel and start the Init process then the Daemons are started which will handle the USB,ADB,debugger and radio.After this,initial Dalvik VM process(Zygote) is created and runtime process initiates the service manager which is a part of binders and Inter Process Communication.
For running System server , Runtime process requests Zygote to start a new instance.Then graphics and audio outputs are handled.Then the components of Android are started.
The set of libraries in Android includes : open-source Web browser engine WebKit, well known library libc and SQLite database
Android Libc implementation:
It mainly for embedded applications.It has built-in support for android-specific services.
Storage, rendering, multimedia:
SQLite, WebKit,Media Framework,Optimized 2D//3D graphic library based on OpenGL ES
It provides a surface composer.Manages the surfaces and use hardware accelerators.
Audio manager handles the audio streams. It can take audio as the input , process it and output the audio.
Hardware Abstraction Libraries:
It contains the libraries that helps in the interface. It contains the standard APIs and other necessary components for integrating with android application.es hardware “drivers” to implement.
The Android Runtime and libraries reside in the same layer.The Dalvik Virtual Machine is th key component of Android and this DVM can be found here.DVM is mainly optimized for mobile OS.It runs applications in executable .Dex format and this can be found in APK .
The application framework supports the applications to run on the DVM machine.It act as an interface between the underlying components and the applications.Underlying all applications is a set of services and systems, including:
- Activity Manager
- Windows Manager
- Content Provider
- View System
- Package Manager
- Telephony Manager
- Resource Manager
- Location Manager
- Notification Manager
Android applications are found at the top layer .The applications are usually written in Java programming language.They run on DVM which resides on Linux kernel.