Android gives you the freedom to implement your own device specifications and drivers. The hardware abstraction layer (HAL) provides a standard method for creating software hooks between the Android platform stack and your hardware. The Android operating system is also open source, so you can contribute your own interfaces and enhancements.
Before porting Android to your hardware, take a moment to understand the Android system architecture. Because your drivers and the HAL interact with Android, knowing its structure can help you navigate the many layers of code in the Android Open Source Project (AOSP) source tree. When you are comfortable with the basic Android architecture, review the interface-specific documentation in this section to learn about specific HALs and how to build them for your device.
To maintain a high level of quality and offer a consistent user experience, Android requires that all implementations meet the requirements stated in the Compatibility Definition Document (CDD) and that all devices pass tests in the Compatibility Test Suite (CTS). For details on the Android compatibility program, see Compatibility.