Introduction to Android Automotive OS (AAOS)
Android Automotive OS (AAOS) is not a fork of Android; it is the Android Open Source Project (AOSP) augmented with automotive specific services, libraries, and hardware abstractions. It is designed to run directly on the vehicle's "bare metal" (or hypervisor) as the primary In-Vehicle Infotainment (IVI) operating system.
Understanding the IVI architecture is critical for engineers transitioning from standard mobile Android development to the automotive sector.
AAOS vs. Standard Android
While the underlying kernel, hardware abstraction layers (HALs), and core system services remain largely identical, AAOS introduces several fundamental architectural differences to handle the unique requirements of a vehicle.
1. Life Cycle and Power Management
A phone is either asleep or awake. A car has distinct states: completely off, accessory mode (radio on, engine off), engine cranking, and engine running. AAOS handles these via the CarPowerManagementService, which communicates with a Vehicle Microcontroller Unit (MCU) rather than relying solely on standard Linux suspend/resume.
2. Multi-User and Audio Routing
In a car, multiple users might interact with the system simultaneously (e.g., driver navigating, passenger watching a movie). AAOS enforces strict multi-user models and complex audio routing (ducking navigation audio over music, routing passenger audio to rear headsets) via the CarAudioManager.
3. Safety and Security
A phone crashing is an inconvenience; an IVI system crashing or being compromised can be a safety hazard, especially if it interfaces with the CAN bus. AAOS strictly isolates the IVI system from safety critical vehicle networks using the Vehicle HAL (VHAL) as a secured gateway.
AAOS Build Targets (car.mk)
When building AAOS, you do not use standard mobile targets. Google provides specific makefiles that pull in the necessary automotive packages.
To convert a standard AOSP build to an automotive build, your device's device.mk must inherit from the car core makefiles:
# Inherit standard car packages
$(call inherit-product, packages/services/Car/car_product/build/car.mk)
# Define the form factor
PRODUCT_CHARACTERISTICS := automotive
The car.mk file includes the CarService, CarSystemUI, default automotive applications (like the Car Launcher, HVAC app, and Media Center), and automotive specific permissions.
The Architecture Stack
The AAOS architecture stack adds an entirely new vertical slice dedicated to car functionality.
The Vehicle HAL (VHAL)
At the lowest level, the VHAL standardizes communication between the Android OS and the vehicle's internal networks (CAN, LIN, Ethernet). It abstracts physical sensors (speed, gear, HVAC temperature) into standardized properties.
CarServiceHelperService and SystemServer
In standard Android, SystemServer starts core services like ActivityManager and WindowManager. In AAOS, SystemServer also starts the CarServiceHelperService.
This helper service bridges the gap between core Android framework components and the automotive specific CarService. For example, it allows CarService to influence user switching or handle automotive specific power policies before the main CarService is fully initialized.
CarService
Running as a persistent system application, CarService is the central hub of AAOS. It binds to the VHAL and provides high level APIs (the Car API) to applications.
System UI and Apps
Automotive applications differ significantly from mobile apps. They must adhere to strict driver distraction guidelines (implemented via the CarUxRestrictionsManager).
The CarSystemUI replaces the standard phone System UI. It manages persistent navigation bars (often used for HVAC controls) and unique notification styles tailored for glanceability while driving.
<!-- Example: CarSystemUI layout configuration -->
<com.android.systemui.car.window.SystemUIOverlayWindow
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Top Nav Bar -->
<include layout="@layout/car_top_navigation_bar" />
<!-- Bottom HVAC Bar -->
<include layout="@layout/car_bottom_navigation_bar" />
</com.android.systemui.car.window.SystemUIOverlayWindow>
By understanding how AAOS extends standard AOSP, developers can properly architect OEM solutions that integrate seamlessly with vehicle hardware while maintaining Android's vast app ecosystem.