The bottom of the Android system is built on the Linux system, and the entire system is built using the software stack (software stack), which includes 4 layers: the operating system layer, the middleware layer, the user interface layer, and the application software layer. The laminated structure can separate the layers from each other and clarify their respective division of labor, which ensures the low coupling between the layers and the layers. The sections are described below, based on the architecture diagram of the Android system.
First, the Linux kernel
Built on Linux2.6, the Linux kernel is an abstraction layer between the system hardware and software stacks, providing core system services such as security, memory management, process management, network protocol stacks, and drive models. Drive models include:
Disney Driver: Display driver
Camera Driver: Webcam driver
Flash memory Driver: Flash drive
Binder (IPC) Driver:binder (IPC) drive
Keypad Driver: Keyboard driver
WiFi Driver:wifi Driver
Audio Driver: Video driver
Power Management: Powering management
Second, the system library
Surface Manager: Manages access to the display subsystem.
Media Framework: library, PacketVideo-based Opencore, supports viewing still images, supports recording and playback of audio and video files in a variety of mainstream formats, including PNG, JPG, MPEG4, H, MP3, AAC, AMR, and more.
SQLite: A powerful lightweight relational database.
OpenGL ES: A system library for 3D development
FreeType: Bitmap and vector font display.
Webkit:web browser engine.
SGL: The underlying 2D graphics engine.
SSL: A library for SSL encryption in network traffic.
LIBC: Standard C system library.
Third, the Android runtime
Before Android5.0, the Android runtime consisted of two parts: theAndroid Core Library and the Dalvik virtual machine . From 5.0 onwards,ART replaced the Dalvik virtual machine. The reason is that the Dalvik virtual machine is dynamically compiled and executed using the JIT (just-in-time) interpreter, which causes the app to run slowly, while art mode compiles (AHEAD-OF-TIME,AOT) when the user installs the app. The bytecode is pre-compiled into a machine code to make it a true local application when the program is originally run and the compilation action is advanced to the user's installation. While art takes up more storage space, extending application installation and system startup time, it can reduce the overhead of dynamic compilation when the program runs, and improve the efficiency of the app.
IV. Application Framework
When developing an Android application, developers are facing the underlying application framework layer. The application framework layer provides a number of APIs for developers to use. Application framework is not only the foundation of application development, but also the important means of software reuse. This layer includes:
Activity Manager: Event Manager
Window Manager: Windows Manager
Content Providers: Contents provider
View System: Views Systems
Package Manager: Pack Manager
Telephony Manager: Phone Manager
Resource Manager: Resource Manager
Location Manager: Position Manager
Notification Manager: Notification Manager
V. Application Layer
The tier provides core application packages such as e-mail, text messages, calendars, maps, browser and contact management. At the same time, developers can use the Java language to design and write their own applications.
Android's system architecture