Relationship between the Android Framework application Framework layer, the HAL Hardware Abstraction Layer, and the Linux Kernel underlying layer
Relationship between the Android Application Framework layer, hardware abstraction layer, and underlying layer
1. JNI technology:
(1). the JNI technology simply declares the local method in the local Java language and loads the dynamic link library (. so file)
(2). The dynamic link library (. so file) is compiled by the ndk c/C ++ file.
2. hal layer development:
(1). HAL is short for Hardware release action Layer. It is also called the hardware abstraction layer.
(2) Hardware access services are implemented at the Framework layer.
(3) Hardware access services are implemented in Java and the hardware abstraction layer is written in C ++. Therefore, the hardware Access Service must call the interface of the hardware abstraction layer through JNI technology.
(4) The Hardware Abstraction Layer calls the underlying interfaces of Linux Kernel.
3. Main Causes of Android HAL:
(1). Not all hardware devices have standard Linux Kernel interfaces.
(2) Some device manufacturers do not want to disclose hardware drivers, so HAL is used.
(3) Android has some special requirements for some hardware.
Figure:
Component usage.
These functions are exposed to developers through the Android Application Framework layer.