Android System Architecture
The Android system architecture is divided into four layers, from top to bottom, respectively:
- Application Layer (application)
- Application Framework layer (application framework)
- System runtime layer (libraries and run time)
- Linux kernel layer
1. Application Layer
- Android applications are primarily user-Interface, usually written in the Java language. Android itself offers a host of core applications such as home screen, contact, phone, and browser (brower). Developers of applications can also implement their own programs using the API of the application framework layer.
2. Application Framework Layer
- The Android application framework provides the API for developers of the application layer, which is actually the framework of an application. Many core applications implement their core functionality through this layer, which simplifies the reuse of components and allows developers to use the components they provide for rapid application development, or to extend their individuality through inheritance.
- Hidden behind each app is a range of services and systems, including:
- Activity Manager (active manager)
Manage individual application lifecycles and common navigation fallback capabilities
- Window Manager (Windows Manager)
Manage all the Windows programs
- Content Provider (contents provider)
Enables access to or sharing of data between different applications
- View System
Build the basic components of your application, which include lists (lists), grids (grids), text boxes (texts boxes), buttons (buttons), and even web browsers that can be embedded.
- Notification Manager (Notification Manager)
Enables applications to display custom prompts in the status bar
- Package Manager (Pack manager)
Program Management in Android system
- Telephony Manager (Phone manager)
Manage all your mobile device features
- Resource Manager (Resource Manager)
Provides various non-code resources used by the application, such as localized strings, pictures, layout files, color files, etc.
- Location Manager (position Manager)
Provide location services
- XMPP Service (XMPP services)
Provide Google Talk services
3. System Runtime Layer
As can be seen, the system runtime layer can be divided into two parts, the system library and the Android runtime, respectively, described as follows:
- System Library
The system library is the support of the application framework and is an important link between the application framework layer and the Linux kernel layer. It is mainly divided into the following several:
- Surface Manage
When executing multiple applications, you are responsible for managing the interaction between the display and access operations, as well as the 2D drawing and 3D drawing for display compositing.
- Media Framework
Multimedia library, based on PacketVideo Opencore, supports a variety of commonly used audio, video format recording and playback, the encoding format includes MPEG4, MP3, H, AAC, ARM.
- Sqlite
A small relational database engine
- Opengl|es
3D drawing function Library implemented according to OpenGL ES 1.0API Standard
- FreeType
Provide the description and display of dot matrix and vector word
- Webkit
A set of web browser software engines
- SGL
The underlying 2D graphics Rendering engine
- SSL handshake is implemented during Andorid communication
- LIBC standard C system function library from BSD, specifically tailored for embedded Linux-based devices
- android runtime
android application is written in the Java language, the program executes in the Android runtime, it runs at the core library and the Dalvik virtual machine two parts.
- Core library provides most of the features of the Java language API, but also contains some of Android's core APIs, such as Android.os, Android.net, Android.media and so on.
- dalvik Virtual machine
Android programs are different from J2ME programs, each Android application has a proprietary process, and not many programs run in a virtual machine, but each Android program has an instance of the Dalivik virtual machine and executes it in that instance. Dalvik virtual machine is a register-based Java Virtual machine, rather than a traditional stack-based virtual machine, and the use of memory resources to optimize and support the characteristics of multiple virtual machines. It is important to note that unlike the J2me,android program that executes in a virtual machine is not a compiled bytecode, instead the Java bytecode is converted to an intermediate code in DEX format by the conversion tool DX.
4.Linux Core Layer
Android's use of the operating system includes core and driver parts, Android's Linux core is the standard Linux 2.6 kernel, Android More is need some mobile device related drivers. The main drivers are as follows:
- Display Driver: A common Linux-based frame buffer drive.
- Flash memory Driver: is a MTD-based flash driver.
- Camera Driver (Driver): Linux-based V4L drivers are commonly used.
- Audio Driver: Common drivers based on ALSA (Advanced Linux sound Architecture, Premium Linux voice system).
- WiFi driver (Camera Driver): The IEEE 802.11 standard-based driver.
- Keyboard driver (KeyBoard Driver): The keyboard driver for the input device.
- Bluetooth driver (bluetooth® Driver): Wireless transmission technology based on IEEE 802.15.1 standard.
- Binder IPC Driver: A special driver in Android with a separate device node that provides the ability to communicate between processes.
- Power Management (Energy Management): Manage information such as battery power.
----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------References: [1] http://www.cnblogs.com/xiangzhong/archive/2013/03/19/2969311.html
[2] http://www.cnblogs.com/zhixing/archive/2012/10/31/2748908.html
Android System Architecture