In short, the hardware abstraction layer of Android encapsulates the Linux kernel driver and provides interfaces up to shield implementation details at the lower layer. That is to say, the hardware support is divided into two layers: one layer in the user space and the other layer in the kernel space, where the hardware abstraction layer runs in the user space, the Linux Kernel Driver runs in the kernel space. Why is this arrangement necessary? Is it not feasible to integrate the hardware abstraction layer with the kernel driver into the kernel space? From the technical implementation point of view, yes. However, from the commercial point of view, putting the hardware support logic in the kernel space may harm the interests of the manufacturer. We know that the Linux kernel source code copyright complies with GNULicense, while the Android source code copyright complies with ApacheLicense. The former must publish the source code when releasing the product, while the latter does not need to publish the source code. If you place all the code supported by the hardware on the Linux driver layer, it means that the source code of the driver must be published at the time of release, the open source code means that the hardware-related parameters and implementations are made public. In today's fierce competition in the mobile phone market, the damage is very huge for manufacturers. Therefore, Android will think of dividing hardware support into hardware abstraction layer and kernel driver layer. The kernel driver layer only provides simple access to hardware logic, such as reading and writing hardware registers, as for what value is read from the hardware or what value is written to the logic in the hardware, it is placed in the hardware abstraction layer, so that the trade secrets can be hidden. Because of this layering, Android is kicked out of the main line code tree of the Linux kernel. The driver program for Android in the kernel space does not provide complete hardware support. When we port the Linux kernel to another machine, the hardware abstraction layer is not supported, hardware is completely unavailable, Which is why Android is an open system rather than an open source system.