Architecture of Android
Android architecture is a stack of software components. It is in the form of a software application, operating system, run-time environment, middleware, native libraries and services.
It is categorized into five parts as below:
1. Linux Kernel
2. Native Libraries
3. Android Runtime
4. Application Framework
5. Applications
Each part of the stack and the elements within each layer are integrated and provide optimal application development and execution environment for mobile devices.
The following diagram shows the architecture of Android,
1. Linux Kernel- Linux is the heart of Android architecture.
- It provides a level of abstraction between the hardware devices and the upper layers of the Android software stack.
- The Android operating system is based on the Linux kernel.
- The Linux kernel is responsible for various device drivers such as Camera driver, Display driver, Bluetooth driver, Keypad driver, Memory management, Process management, Power management, etc.
2. Native Libraries- The native libraries such as Media, WebKit, SQLite, OpenGL, FreeType, C Runtime library (libc) etc. are situated on the top of a Linux kernel.
- Media library is responsible for playing and recording audio and video formats, FreeType is for font support, WebKit is for browser support, SQLite is for database, SSL is for Internet security etc.
3. Android Runtime- Android Runtime is the third section of the architecture and situated on the second layer from the bottom.
- Android Runtime includes core libraries and Dalvik Virtual Machine (DVM) which is responsible to run android application.
- Dalvik Virtual Machine (DVM) is like Java Virtual Machine (JVM) in Java, but DVM is optimized for mobile Devices.
- DVM makes use of the Linux core features like memory management and multi-threading, which are essential in the Java language.
- DVM provides fast performance and consumes less memory.
4. Application Framework- Application framework is situated on the top of the Native libraries and Android runtime.
- Android framework provides a lot of classes and interfaces for Android application development and higher level services to the applications in the form of Java classes.
- It includes Android API's such as Activity manager, Window manager, Content Provider, Telephony Manager, etc.
- Activity manger is responsible for controlling all the aspects of the application lifecycle and activity stack, Content provider is responsible for allowing the applications to publish and share the data with the other applications, View system is responsible for creating application user interfaces, etc.
5. Applications- Applications are situated on the top of the Application framework.
- The applications such as Home, Contact, Alarm, Calender, Camera, Browsers, etc. use the Android framework which uses Android runtime and libraries. Android runtime and Native libraries use Linux kernel.
- The user can write his/her application to be installed on this layer only.