Android10.0 app calls the hal layer interface function to realize the first series

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 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 called through jni

2. The app calls the hal layer interface function to implement the core class of series one

hardware/libhardware/include/hardware/test.h
hardware/libhardware/modules/test/test.c
hardware/libhardware/modules/test/Android.bp

3. The app calls the hal layer interface function to realize the core function analysis and realization of series one

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.

Manually implement a HAL module, this HAL provides an addition function
First create a test.h file in the hardware/libhardware/include/hardware directory

#include <sys

Acho que você gosta

Origin blog.csdn.net/baidu_41666295/article/details/131626443
Recomendado
Clasificación