This technical document, Custom HAL in AOSP, explores how to implement and integrate a Custom Hardware Abstraction Layer (HAL) within the Android Open Source Project (AOSP). Using a real-world case study from a marine infotainment system, it breaks down the Android stack - from the Linux kernel and HAL interface to the framework and app layers - showing how custom hardware functionalities can be seamlessly added to Android-based systems.