Android System Architecture

Source: Internet
Author: User

The Android system is divided into four tiers: Linux kernel, Android Core library and Android Runtime Environment (Android runtime),

Application frameworks, applications, and so on.

Linux kernel (Linux Kernel)
Android's core system services depend on Linux 2.6, such as security, memory management, process management, network stacks, and drive models.
Linux Kernel also acts as an abstraction layer between hardware and software, which hides specific hardware details and provides a unified service for the upper layer.
In addition to the standard Linux kernel, the Android system also adds kernel drivers, such as display drivers, bluetooth drivers,
Camera driver, Flash card driver, Binder IPC driver, input device driver, USB Drive, WiFi Drive, audio system driver, power supply tube
Provide basic support for the operation of the Android system.
The advantage of this layering is to use the services provided below to provide a unified service for the upper layer, shielding the differences between the layers and the following, when the
Layers and the following layers do not affect the upper layer when the changes occur. That is, each layer does its job, each layer provides a fixed sap (Service Access
point), i.e. high cohesion, low coupling.

The

Android Core library (Libraries)
Android contains a collection of C + + libraries for use by various components of the Android system. These features are presented to developers through the Android Application
Program framework (application framework). Some core libraries are listed below:
? 1, System C Library--a standard C system function library (LIBC) derived from BSD inheritance, tuned to a library based on embedded Linux devices.
? 2, Media Library--Opencore based on PacketVideo. These libraries support the playback and recording of a variety of popular audio and video formats,
and encoding/decoding formats in a variety of media formats, including MPEG4, H, MP3, AAC, AMR, JPG, PNG.
? 3, interface Management-Displays the manager of the subsystem, manages the two-and three-dimensional
graphics layers that access the display subsystem and seamlessly combine multiple applications.
    4, libwebcore--'s modern web browser engine that drives Android browsers and embeddable Web views.
? 5, Sgl--skia Graphics library, basic 2D graphics engine.
? 6, 3D libraries--based on OpenGL ES APIs implementation. The library uses hardware 3D acceleration or uses a highly optimized 3D soft plus
speed.
? 7, freetype--Bitmap (Bitmap) and vector (vectors) font rendering.
? 8, sqlite--a powerful and lightweight relational database engine that all applications can use.

The

Android Runtime Environment (Android runtime)
also has an Android runtime layer on the Linux kernel layer that includes the Dalvik virtual machine and the Java Core Library, which provides Java
Most features of the programming language core library. The
Dalvik virtual machine is a Java virtual machine used by Android. Each Android application is an instance of the Dalvik virtual machine, with the
line in their own process. Dalvik virtual machines are designed to efficiently run multiple virtual machines on a single device. Dalvik the file format that the virtual machine can
Execute is the. Dex,.dex format is a compression format designed for Dalvik, suitable for systems with limited memory and processor speed.
Most virtual machines (including JVMs) are stack-based, while Dalvik virtual machines are register-based. Both architectures have pros and cons, and
in general, stack-based machines require more instructions, and register-based machine instructions are larger. DX is a set of tools that convert
Java. class to. dex format. A. dex file typically has more than one. Class. Because. Dex sometimes has to be optimized, it increases the size of the text
by 1~4 times, ending with Odex. The
Dalvik virtual machine relies on the Linux kernel to provide basic functionality, such as threading and underlying memory management.

Android Application Framework (application framework)
The application framework layer is located above the Android library and runtime. By providing an open development platform, Android enables development
Can access the API framework used by the core application, which simplifies the reuse of the component, and any application can publish its
Functionality and any other application can use these features (subject to the security restrictions that the framework enforces). This allows developers to develop a very
Its rich and innovative applications, free to take advantage of device hardware, access location information, run background services, set alarms, state
Bar to add notifications and more.
Each application is actually a set of services and systems, including:
? View-a rich, extensible collection of views for building applications. Include list (ListView), grid
(Grid), text box (edittext/textview), button, and so on, even an embeddable web browser (WebView).
? Content Providers--Enables an application to access data from other applications, such as a communication record, or
Share your own data.
? Resource Manager (Resource Manager)-provides access to non-code resources, such as localized strings, graphics, and layouts
File.
? Notification Manager (Notification Manager)-Enables applications to display customized prompts in the status bar.
? Activity Manager-manages the application lifecycle and provides commonly used navigation fallback features

Android Apps
Android assembles a collection of core applications, which are published together with the system, including e-mail clients, SMS
Programs, calendars, maps, browsers, contacts, and other settings. All applications are written in the Java language and are developed by the user
Android apps and Android core applications are at the same level.

Android System Architecture

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.