Hardware abstraction layer (HAL) overview

A hardware abstraction layer (HAL) is type of abstraction layer with a standard interface for hardware vendors to implement. A HAL allows hardware vendors to implement lower-level, device-specific features without affecting or modifying code in higher-level layers.

Required terms

Following is a list of definitions for terms used in this section of documentation:

Android Interface Definition Language (AIDL)
A Java-like language used to define interfaces in a way that is independent of the programming language being used. AIDL allows communication between HAL clients and HAL services.
Binderized HAL
A HAL that communicates with other processes using binder inter-process communication (IPC) calls. Binderized HALs run in a separate process from the client that uses them. Binderized HALs are registered with a service manager so that clients can access their capabilities. HALs written for Android 8 and higher are binderized.
HAL client
The process that accesses the HAL service.
HAL interface
The common interface used by both the HAL client and service to communicate.
HAL service

The hardware-specific code, such as the code that takes to your specific device's camera. You must implement all required HALs listed in the compatibility matrix for the release you target in your vendor partition. For further information on compatibility matrixes, see Compatibility matrixes.

You can also create a new HAL interface, or extend the interface of a HAL, to support your hardware's unique capabilities.

Hardware Interface Definition Language (HIDL)

A language used to define interfaces in a way that is independent of the programming language being used. HIDL enables communication between HAL clients and HAL services.

Same Process (SP) HAL

A restricted set of wrapped HALs. Membership in the set is controlled by Google. SP HALs include:

  • Stable C mapper 5 HAL
  • OpenGL
  • Vulkan
  • android.hidl.memory@1.0 (provided by the Android system, always wrapped)
  • android.hardware.renderscript@1.0
Wrapped HAL

A HAL service that was created before Android 8, but has been wrapped in an AIDL or HIDL wrapper to work with Android 8 and higher.

What's next?