Introduction to Android architecture in Android Development

Source: Internet
Author: User
Tags dedicated ip

 

Source: Android development-android Architecture

In Android, the entire framework consists of applications, application frameworks, native libraries, Android real-time libraries, hardware abstraction layers, and linux kernels.

The core Android virtual machine is also open source code. For developers, if they want to develop products with alienated and highly competitive business trips on the basis of in-depth customization, a deep understanding of the application framework, native library, hardware abstraction layer, and Linux kernel is required. Figure 1 shows the architecture of Android.


Figure 1 Android Architecture

1. Core Services

The core services of Android include entropy service, Power Manager, activity manager, and telephony registry) package Manager, account manager, Content Manager, system content providers, battery service) lights service and Vibrator
Service, alarm manager, init watchdog, window manager, and Bluetooth service. These services are closely related to applications, but usually applications cannot directly access core services. Earlier versions of hardware services (hardware service) and sensor Service (sensor Service) have been removed, and light services and vibration services are started on core services through system servers. The implementation of the system server is located in systemserver. java.

2. Native services

In Android, upper-layer applications are developed based on Java, but many framework-layer services are based on C/C ++. For convenience, in this book, A Service Based on C/C ++ is called a native service. Currently, Android provides multimedia-related native services, including surface flinger, audio flinger, and camera service) media Player service and audio Policy Service.

3. Native Library

The android native library is mainly based on some native components implemented by C \ c ++, including C library bionic, browser engine WebKit, multimedia engine opencore, sqldatabase SQLite, 3D rendering engine OpenGL ES, bitmap and font vector rendering engine FreeType, 2D image rendering engine SGL (skia Graphics Library) and Internet security protocols such as SSL and TSL.

4. runtime Components

In Android, important Java components include the Java core library and Dalvik virtual machine. The two constitute the foundation of the android application environment.

5. Hardware Abstraction Layer

In Android, considering that not all components have standard Linux kernel driver interfaces, and the Linux driver Kernel Based on the GPL V20 license will expose the details of the dedicated IP core, in addition, Android has some special requirements for hardware drivers. To shield the underlying implementation details and separate hardware logic from hardware interfaces, Google defines a hardware abstraction layer interface Hal (hardware Hardware Abstraction action Layer ).

Hal facilitates business development while slightly compromising system performance. More levels will slow down the system. In desktop crash ut Linux, in order to speed up system startup, we have completely abandoned Hal's philosophy.

6. Linux Kernel

The Android platform is built based on the linxu kernel. The advantages of the Linux kernel include large memory management, process management, permission-based security model, unified driver model, shared library support, and open-source code.

During the design process of the Android platform, Linux is cropped to a certain extent based on the limited resources of mobile terminals: cut off the native window system, remove the support for GNU libc (introduced more efficient, optimized for Embedded bionic), cut out some of the features of some standard Linux tools, and so on.

In addition, the features of Android for mobile terminals include Linux kernel alarms (Alarm), low memory killer, ashmem, kernel debugging (kernel debugger), inter-process communication (binder), and log (logger) and power management.

The low memory killer mechanism is more flexible than the Linux Standard OOM (out of memory) mechanism. It can kill processes as needed to release the required memory. The implementation of low memory killer is mainly located in Aurora \ MSM Drivers/staging/Android/lowmemorykiller. c file.

Ashmem provides large shared memory for processes, and also provides a mechanism for the kernel to reclaim and manage the memory. The implementation of ashmem is located in the System \ core \ libcutils \ ashmem-dev.c file. (Excerpted from the far-sighted book "android multimedia programming from beginner to proficient")

More Clear Vision Original teaching material Exhibition: http://www.farsight.com.cn/FarsightBooks/home.html

For embedded and 3G related resources and learning, click: Embedded Development Video Android training 3G training QT Development Video Iot training IoT technology video embedded learning

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.