Android Architecture
Android Architecture
In this tutorial, we will learn about Android Architecture, a software stack that consists of different components in different layers. The main layers of the Android architecture are as follows:
- Linux Kernel
- Native libraries
- Android Runtime
- Dalvik Virtual Machine
- Application Framework
- Applications
Linux Kernel
Linux kernel is the main component layer in the Android architecture. This layer is the bottom layer that is close to the physical device hardware. It provides the interaction of the hardware with the software components. The mobile device hardware drivers are handled by the Linux kernel layer. Drivers are programs written to communicate with the physical hardware device. The main components of the Linux Kernel layer are as follows:
- Display Driver
- Camera Driver
- WiFi Driver
- Audio Drivers
- Keypad Driver
- Power Management
Native Libraries
Android native libraries layer is on top of the Linux Kernel layer. This layer provides the capabilities to handle different types of data and information. These libraries are coded in C and C++ programming languages for performance. Some components of this layer are as follows:
- Surface Manager
- Media Framework
- Webkit
- SQLite
- libc
Android Runtime
Android runtime environment consists of the Dalvik Virtual machine and the Core Java libraries.
The Dalvik virtual machine is a register-based virtual machine, designed and written by Dan Bornstein with contributions from other Google engineers as part of the Android mobile phone platform.
DVM is highly optimized for low memory requirements and is designed to allow multiple VM instances to run at once, relying on the underlying operating system for process isolation, memory management, and threading support.
The bytecode on which the DVM operates is not Java bytecode. DVM operates on the .dex format. The dx tool, included in the Android SDK, transforms the Java class files compiled by the Java compiler into another class the .dex file format.
Application Framework
This layer is below the Applications layer. The application framework provides basic functionalities that directly communicate with the mobile applications in the Applications layer. Some important components of the Application framework layer are as follows:
- Activity Manager
- Resource Manager
- Window Manager
- Telephony Manager
- Location Manager
Applications
The applications layer is the top layer in the Android Architecture. This is the layer where the application is deployed on the mobile device. Pre-installed applications like Phone, SMS, Contacts, Browser are installed by default on the mobile device in this layer.