Android is based on the Linux kernel and is designed for mobile terminal operating systems. Mainly includes the following aspects:
Application Framework:
This layer provides rich application programming interfaces for application developers, such as activity manager,content provider,notification Manager, and various window widget resources. All apps are running on top of this layer.
Dalvik Virtual machine:
the Dalvik VM uses a register schema, rather than the JVM's stack architecture, to be better suited to mobile devices. The Java source code is compiled into a. Class bytecode file, which is then converted into a Dalvik-identifiable. dex file by the DX tool provided by Google.
Linux Kernel:
each app application is interpreted by a standalone Dalvik VM, and a Dalvik VM instance corresponds to a Linux kernel process.
So, each app is completely isolated and resource independent. Makes each app more secure, but it's not conducive to interprocess communication
Android Official Introduction
Android System Architecture
Application Framework
most developers are very concerned about this layer. You have to understand all the API interfaces that developers are exposed to, most of which correspond to the hardware abstraction layer (HAL Layer) interface one by one, and they tell you how to implement your own drive.
Binder IPC
the binder interprocess communication mechanism helps the application framework layer to cross processes and invoke system-level services. Fundamentally, it helps the API interfaces of the high-level framework interact with the Android system services.
System Services
Most application framework APIs have functionality that relies on communicating with a system service to operate the underlying hardware. System services are divided into modular components based on different functions, such as window manager, Search Service, or Notification manager. System services consist of two major chunks: systems and media. The former corresponds to a service that includes, for example, window Manager or Notification Manager, which corresponds to a service that is related to playing or recording media.
Hardware abstraction Layer Hardware abstraction layer (HAL)
The hardware abstraction layer can be used as a standard interface for the Android system to invoke the device-driven layer without having to manage the drivers and hardware.
Linux Kernel
In most cases, you develop your own device drivers as well as when you develop Linux device drivers. Android picks up a specific version of the Linux kernel, which contains examples such as Wakelocks (a memory management system), Binder IPC drivers, and other features that are important for mobile embedded platforms like Android. You can also choose the appropriate kernel version for your own needs, as long as it supports some of the necessary properties such as binder IPC drivers. However, we still recommend that you use the latest version of the Android kernel.
Related Knowledge points:
Application inter-process isolation mechanism:
The Android system includes a four-tier architecture: from the bottom up to the Linux kernel layer, the C/S library and the Android runtime (Dalvik VM) layer, the Android framwork framework layer, the application layer. Among them, the Android runtime Environment layer is similar to Java in the JRE layer, mainly used to run Java programs, but here the virtual machine is the Dalvik virtual machine. Each Android application runs in a separate Davlik process, and the Dalvik virtual machine is optimized for simultaneous and efficient running of multiple virtual machines, which enables the application's process isolation.
Dalvik virtual machine differs from JVM:
The JVM runs directly from the. class or Jar package, which dalvik the. class file to a. dex file (Dalvik executable) through the DX tool.
The JVM uses a stack structure, and Dalvik adopts a register structure, which is more suitable for mobile devices.
Why does Android take the Dalvik virtual machine instead of the JVM?
Most virtual machines (including JVMs) are based on stacks, while the Dalvik virtual machines are based on registers and have better performance, but also result in a slight hardware commonality;
Run the proprietary. dex file. The DX tool, when compiling the. class file, removes redundant information from it and consolidates all. class files into one file, improving performance. The DX tool also optimizes the performance of the. dex file.