Many car subsystems interconnect with each other and the in-vehicle infotainment (IVI) system via various bus topologies. The exact bus type and protocols vary widely between manufacturers (and even between different vehicle models of the same brand); examples include Controller Area Network (CAN) bus, Local Interconnect Network (LIN) bus, Media Oriented Systems Transport (MOST), as well as automotive-grade Ethernet and TCP/IP networks such as BroadR-Reach.
The Android Automotive hardware abstraction layer (HAL) provides a consistent interface to the Android framework regardless of physical transport layer. This vehicle HAL is the interface for developing Android Automotive implementations.
System integrators can implement a vehicle HAL module by connecting function-specific platform HAL interfaces (e.g. HVAC) with technology-specific network interfaces (e.g. CAN bus). Typical implementations may include a dedicated Microcontroller Unit (MCU) running a proprietary real-time operating system (RTOS) for CAN bus access or similar, which may be connected via a serial link to the CPU running Android Automotive. Instead of a dedicated MCU, it may also be possible to implement the bus access as a virtualized CPU. It is up to each partner to choose the architecture suitable for the hardware as long as the implementation fulfills the interface requirements for the vehicle HAL.
The vehicle HAL is the interface definition between the car and the vehicle network service:
- Car API. Contains the APIs such as CarHvacManager
and CarSensorManager. For details on supported APIs,
- CarService. Located at
- Vehicle HAL. Interface that defines the vehicle properties
OEMs can implement. Contains property metadata (for example, whether the vehicle
property is an int and which change modes are allowed). Located at
hardware/libhardware/include/hardware/vehicle.h. For a basic reference implementation, refer to
For more details, see Vehicle Properties.
The vehicle HAL supports these levels of security for accessing data:
- Accessible to app with permission (through car service).
- Accessible without permission (through car service).
Direct access to vehicle properties is allowed only to selected system components with vehicle network with selinux access protection. Most applications go through additional gatekeeping by car service (for example, only system applications can control HVAC as it requires system permission granted only to system apps).