Android system architecture, android system

Source: Internet
Author: User

Android system architecture, android system

The Android system architecture adopts a layered architecture, as shown in figure 1. There are four layers from the upper layer to the bottom layer, namely the application program layer, application framework layer, system library, and Android runtime and Linux kernel.

Figure 1: Architecture of the Android System

The features of each layer are briefly described as follows:

Application Layer

This layer provides some core application packages, such as email, SMS, calendar, maps, browser and contact management. At the same time, developers can use the Java language to design and compile their own applications, which are equal and friendly to those core applications.

2. Application Framework Layer


This layer is the basis for Android Application Development. Developers are mostly dealing with her. The application framework layer consists of activity manager, Window Manager, content provider, view system, Package Manager, Phone Manager, resource manager, Location Manager, notification manager, and XMPP service. On the Android platform, developers can fully access the API framework used by core applications. In addition, any application can publish its own functional modules, while other applications can use these released functional modules. Based on this reuse mechanism, you can easily replace various application components of the platform.

A) Activity Manager (Activity Manager)

Manage the lifecycle of each application and the usual navigation rollback function

B) Window Manager)

Manage all window programs

C) Content Provider (Content Provider)

Allows different applications to access or share data.

D) View System (View System)

Build basic components of applications

E) Notification Manager (Announcement Manager)

This allows the application to display custom prompts in the status bar.

F) Package Manager (Package Manager)

Program Management in the Android system

G) Telephony Manager (telephone Manager)

Manage all mobile device functions

H) Resource Manager (Resource Manager)

Provides various non-code resources used by applications, such as localized strings, images, layout files, and color files.

I) Location Manager (Location Manager)

Provide location service

J) XMPP Service (XMPP Service)

Provide Google Talk services

 

Three system libraries and Android Runtime

The system library consists of nine subsystems: layer management, media library, SQLite, OpenGLEState, FreeType, WebKit, SGL, SSL, and libc. Android runtime includes the core library and Dalvik virtual machine. The former is compatible with the function functions required to be called in most Java languages, and includes the Android core library, such as android. OS, android.net, and android. media. The latter is a register-based Java virtual machine, the Dalvik virtual machine is mainly used to complete important functions such as lifecycle management, stack management, thread management, security and exception management, and garbage collection.

A) System Library

The system library is the support of the application framework and an important link connecting the application framework layer and the Linux kernel layer. It is mainly divided:


Ø Surface Manager:

When executing multiple applications, you are responsible for managing the interaction between the display and access operations, and for displaying and merging 2D and 3D drawings.

Media Framework:

Multi-media library, based on PacketVideo OpenCore; supports multiple common audio and video formats for recording and playback. The encoding formats include MPEG4, MP3, H.264, AAC, and ARM.

Ø SQLite:

Small Relational Database Engine

Ø OpenGL | ES:

3D drawing function library based on OpenGL ES 1.0API Standard

Ø FreeType:

Provide the plotting and display of dot matrix words and vector words

Ø WebKit:

A set of web browser software Engines

Ø SGL:

Underlying 2D graphic rendering engine

Ø SSL:

Handshaking during communication on Andorid

Ø Libc:

The standard C system function library inherited from BSD, which is specially tailored for embedded linux-based devices


B) Android Runtime

Android applications are written in Java and executed during Android runtime. The runtime is the core library and the Dalvik virtual machine.

 

Ø core database

The core Library provides the majority of Java language APIs and also includes some core Android APIs, such as android. OS, android.net, and android. media.


Ø Dalvik Virtual Machine

The Android program is different from the J2EE program. Each Android Application has a proprietary process. Instead of running multiple programs in one virtual machine, each Android program has a Dalivik Virtual Machine instance, and run the command in the instance. Dalvik virtual machine is a register-based Java virtual machine, instead of a traditional stack-based virtual machine. It optimizes memory resources and supports multiple virtual machines. It should be noted that, unlike j2-android, the Android program does not execute the compiled bytecode in the virtual machine, but converts the Java bytecode to the intermediate code in dex format through the conversion tool dx.

4. Linux Kernel

Android core system services depend on the Linux2.6 kernel, such as security, memory management, process management, network protocol stack, and driver model. Linux Kernel is also an abstraction layer for hardware and software stacks. Driver: display driver, Bluetooth driver, Flash memory driver, Binder IPC driver, USB driver, keyboard driver, WiFi driver, audio driver, and energy management.

Display Driver: Commonly Used Frame Buffer drivers based on Linux.
Flash Memory Driver)
Camera Driver: commonly used Linux-based v4l (Video for) drivers.
Audio Driver (Audio Driver): Commonly Used drivers based on ALSA (Advanced Linux Sound Architecture, Advanced Linux Sound system.
WiFi Driver: A Driver Based on the IEEE 802.11 standard
KeyBoard Driver)
Bluetooth Driver)
Binder ipc driver: Andoid is a special driver with a separate device node that provides inter-process communication.
Power Management)



Summary:

1. The Android system architecture adopts the layered architecture. The architecture is clear, hierarchical, and collaborative.

2. The Android system architecture not only understands the Android system from a macro perspective, but also points out the direction for our study and practice. If you are engaged in Android Application Development, you should study the Android Application Framework layer and application layer; if you are engaged in Android system development, you should study the Android system library and Android runtime; if you are engaged in Android driver development, you should study the Android Linux kernel. In short, find the starting point and practice it.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.