Android11.0 app calls the hal layer interface function to realize the fourth series (app layer implementation)

1 Introduction

 In the 11.0 system rom customization development, for some interfaces that need to be called in the hal layer in the app to achieve certain functions, it is necessary to
open up the interface from the app to the hal to realize the functional requirements. This section first talks about the hal The interface is provided in the layer, and then the hal layer interface call is implemented in the jni layer, and
the added service call jni interface is implemented in the framework layer, and finally the call to the hal layer is implemented in the app


2. The app calls the hal layer interface function to realize the core class of series four (app layer implementation)

package/apps/TestService

3. The core function analysis and realization of app call hal layer interface function realization series four (app layer realization)

HAL is the hardware abstraction layer, which shields the hardware implementation details downwards and provides an abstract interface upwards.
HAL is the direct interface between the underlying hardware and the upper framework. The framework layer can operate hardware devices
HAL and kernel drivers through HAL. HAL is implemented in the user Space, the driver is in the kernel space, so in order to protect the interests of major manufacturers
, the core algorithm and the like need to be implemented in the hal layer


The full name of HIDL is HAL interface definition language (hardware abstraction layer interface definition language). Before that, Android had AIDL, which was
built on top of Android binder and used to define the interface between Android-based Binder-based Client and Service.
HIDL also has a similar role, except that it defines the interface between the Android Framework and the Android HAL implementation.
The hardware abstract layer (Hardware Abstract Layer, HAL) of the Android system runs in the user space. It shields the implementation details of the hardware driver module downward and provides hardware access services upward. Through the hardware abstraction layer, A

Guess you like

Origin blog.csdn.net/baidu_41666295/article/details/132327966