Android 10.0 app calls hal layer interface function to realize series four (app layer implementation)

1 Introduction

 In the 10.0 system rom customization development, for some interfaces that need to be called in the hal layer in the app to realize certain functions, it is necessary to open up the interface from the app to the hal layer to realize the functional requirements. This section first talks about providing the interface in the hal layer and then implementing the call of the hal layer interface in the jni layer, adding services to call the jni interface in the framework layer, and finally realizing the call to the hal layer 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 user space and the driver is in kernel space. Therefore, in order to maintain the interests of major manufacturers
, core algorithms and the like need to be implemented in the hal layer

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, the Android system is divided into two layers to support hardware devices, one layer is implemented in the user space (User Space), and the other layer is the current kernel space (Kernel Space). The traditional Linux system fully supports the hardware in the kernel space, that is, fully realizes the support for the hardware in the hardware driver module.

The full name of HIDL is HAL interface definition language (hardware abstraction layer interface definition language), before that Android had AIDL&

Guess you like

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