Starting March 27, 2025, we recommend using android-latest-release instead of aosp-main to build and contribute to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
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 talks 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?
To learn how to implement a HAL service, refer to
AIDL for HALs.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Hardware abstraction layer (HAL) overview\n\nA *hardware abstraction layer (HAL)* is type of abstraction layer with a\nstandard interface for hardware vendors to implement. A HAL allows hardware\nvendors to implement lower-level, device-specific features without affecting or\nmodifying code in higher-level layers.\n| **Note:** HALs existed before Android 8. However, Android 8 ensured each HAL had a standard interface. For an explanation of HAL architecture before Android 8, refer to [Legacy HALs](/docs/core/architecture/hal/archive).\n\nRequired terms\n--------------\n\nFollowing is a list of definitions for terms used in this section of\ndocumentation:\n\n*Android Interface Definition Language (AIDL)*\n: A Java-like language used to define interfaces in a way that is independent of\n the programming language being used. AIDL allows communication between\n HAL clients and HAL services.\n\n*Binderized HAL*\n: A HAL that communicates with other processes\n using\n [binder inter-process communication (IPC)](/docs/core/architecture/hidl/binder-ipc)\n calls. Binderized HALs run in a separate process from the client that uses them.\n Binderized HALs are registered with a service manager so that clients can\n access their capabilities. HALs written for Android 8 and higher are\n binderized.\n\n*HAL client*\n: The process that accesses the HAL service.\n\n*HAL interface*\n: The common interface used by both the HAL client and service to communicate.\n\n*HAL service*\n\n: The hardware-specific code, such as the code that talks to your specific\n device's camera. You must implement all required HALs listed in the\n compatibility matrix for the release you target in your vendor partition.\n For further information on compatibility matrixes, see\n [Compatibility matrixes](/docs/core/architecture/vintf/comp-matrices).\n\n You can also create a new HAL interface, or extend the interface of a HAL, to\n support your hardware's unique capabilities.\n\n*Hardware Interface Definition Language (HIDL)*\n\n: A language used to define interfaces in a way that is independent of the\n programming language being used. HIDL enables communication between\n HAL clients and HAL services.\n\n | **Note:** As of Android 13, HIDL has been deprecated. Instead of HIDL, you should use Android Interface Definition Language (AIDL) for HALs. HALs previously written using [HIDL](/docs/core/architecture/hidl) are supported.\n\n*Same Process (SP) HAL*\n\n: A restricted set of wrapped HALs. Membership in the set is controlled by\n Google. SP HALs include:\n\n - Stable C mapper 5 HAL\n - OpenGL\n - Vulkan\n - android.hidl.memory@1.0 (provided by the Android system, always wrapped)\n - android.hardware.renderscript@1.0\n\n | **Note:** Some HAL implementations wrap legacy interfaces, such as those in `libhardware`, in an AIDL or HIDL wrapper.\n\n*Wrapped HAL*\n\n: A HAL service that was created before Android 8, but has been wrapped in an\n AIDL or HIDL wrapper to work with Android 8 and higher.\n\nWhat's next?\n------------\n\n- To learn how to implement a HAL service, refer to [AIDL for HALs](/docs/core/architecture/aidl/aidl-hals).\n- To learn how to create or extend an existing HAL, refer to [Attached extended interfaces](/docs/core/architecture/aidl/aidl-hals#attached-extensions)."]]