Unveiling the Depths of Android's Automotive Evolution
Android Automotive Architecture Explained in Detail 2023
Estimated read time: 1:20
Learn to use AI like a Pro
Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.
Summary
In 2023, Android Automotive Architecture showcases its integrated approach, by sharing the same code base with Android on phones, tablets, and TVs. The architecture demonstrates modules tailored specifically for automotive purposes, like Automotive Audio and System UI, which extend from standard Android counterparts. Key communication occurs through the Android framework API and Car API, leveraging binder IPC for process interactions. The framework is structured to allow automotive apps, system apps, OEM apps, and third-party apps to function seamlessly via a tiered communication system involving the Car Library and Car Service. This system oversees everything from communication with the vehicleβs ECU to managing vehicle properties, ultimately illustrating a robust interaction between hardware and software.
Highlights
Understanding Android Automotive as an extension of standard Android π²π
Delving into binder IPC for efficient inter-process communication π¬π
Exploring the Automotive Stack from apps to vehicle ECU connections ππ
Understanding the role of Car Service in system operations πβοΈ
Future-proofing with transition from HIDL to AIDL interfaces ππ
Key Takeaways
Android Automotive shares code base with other Android platforms ππ±
Automotive-specific modules like Audio and System UI extend existing Android modules ππ΅
Communication handled via Car API and binder IPC for seamless service interaction π
Car Service bridges Vehicle Hull and Car Library, acting as a mediator π§π οΈ
Future shifts from HIDL to AIDL interfaces point to ongoing architecture evolution ππ
Overview
Ever wondered how Android stretches its prowess into the automotive world? Well, it's not just a fork of the existing system but rather an extension, building on the same core principles and architecture. In the domain of automotive, Android evolves to include specialized modules - think automotive versions of your favorite Android features like the System UI or the Audio module, slightly tweaked to suit the driving experience. It's a testament to how Android's modular nature adapts to different devices and ecosystems effortlessly.
At the heart of the operation is the intricate communication network that Android Automotive employs. Standard Android and automotive-specific features operate through a finely tuned system of APIs and libraries. The Car API, for example, works via binder IPC - a secure method of managing communication between processes, crucial for the complex automotive services that need to run in tandem without hitches. From vehicle speed to system apps, this network ensures everything communicates just as it should.
Lastly, the Android Automotive setup continuously adapts, heralding the transition from HIDL to AIDL interfaces as the future cornerstone. This shift points towards ongoing innovation within Android's ecosystem, ensuring stability and advancements in how software interacts with automotive hardware. It's exciting to anticipate how these changes will further refine the drive towards smarter, more interconnected vehicles. The architecture is destined to only become more integrated, efficient, and sophisticated as time rolls on.
Chapters
00:00 - 00:30: Introduction to Android Automotive The chapter titled 'Introduction to Android Automotive' explains that Android Automotive is not a separate or divergent version of Android. Instead, it shares the same code base and repository as Android used for phones, tablets, and televisions. The chapter includes a diagram illustrating how automotive modules are developed in relation to the broader Android architecture.
00:30 - 01:00: Automotive Modules vs. Standard Android The chapter discusses the differences between automotive modules and standard Android modules. Automotive-specific modules are designed uniquely for vehicles but often extend standard Android modules. For instance, the System UI in automotive is an extension of the mobile version's System UI. Similarly, the Automotive Audio module builds on the core Android audio stack. The chapter includes a diagram illustrating how these modules are structured, with system apps at the top of the stack.
01:00 - 02:00: Application Communication and APIs Chapter titled 'Application Communication and APIs' explains how OEM and third-party applications interact with services. In standard Android environments, apps use the Android framework API for this communication. However, for automotive applications, a specific car API is employed to interface with the car service. The chapter details that car APIs connect to car services through Binder IPC (Inter-Process Communication) since they typically operate in separate processes. The default Android permissions do not typically support direct communication; hence, APIs structure this interaction.
02:00 - 02:30: Role of Car Service and System Services The Role of Car Service and System Services details how the car service interacts with Android system services. It uses Binder IPC for direct communication between processes. Positioned on the same stack, the car service relies on these system services to function properly and is initiated by the system server during device startup.
02:30 - 03:30: Automotive Stack Structure The chapter "Automotive Stack Structure" delves into the communication mechanisms within automotive systems. It highlights the role of the car service in interacting with the vehicle hull through Binder IPC, which, in turn, interfaces with the automotive ECUs (Electronic Control Units). Though these ECUs aren't depicted in the diagram, they will be explored further in the chapter. The narrative then shifts its focus to the automotive stack, particularly its right side, illustrating the hierarchical organization of automotive modules. At the pinnacle of this structure are the automotive applications.
03:30 - 04:00: Communication Protocols in Automotive Architecture This chapter discusses the communication protocols used in automotive architectures, focusing on the interaction between libraries and car services. It highlights the use of car manager classes to access these services, which communicate over the binder using AIDL interfaces. Additionally, it explains that the car service also uses binder IPC protocols, employing either HIDL or AIDL interfaces. However, there's a transition towards AIDL interfaces, replacing all HIDL files with AIDL in the future.
04:00 - 05:00: Responsibilities of Automotive Stack Components The chapter focuses on the responsibilities of automotive stack components, starting with the communication network known as the vehicle bus, such as the CAN bus. It highlights how the vehicle hull communicates with the ECUs (Engine Control Units) over these networks. This specialized internal communication network interconnects various components within a vehicle, facilitating their interaction and functionality. The chapter sets the stage to explore the specific roles and responsibilities of each component starting from the ECU level upward in the automotive stack.
05:00 - 05:30: Vehicle ECU and Vehicle Hulls The chapter discusses the relationship between the Vehicle Electronic Control Unit (ECU) and Vehicle Hulls in the context of a vehicle bus system. It explains how to obtain the speed of the vehicle by communicating with the appropriate ECU. This data is then transferred to the Vehicle Hull, where it is stored as vehicle properties. These properties are primarily derived from signals received from the ECUs. The chapter also briefly mentions the car service, which is a system service initiated by the system server during Android boot.
05:30 - 06:30: Car Service as a System Service The chapter discusses the concept of car service as a system service, highlighting its role in persisting state and providing APIs to the car library. It acts as an intermediary between the vehicle hull and the car library. The car service is actually a collection of services. The chapter suggests that a detailed code walkthrough will explain how these services are started, with a focus on the ICar implementation. The car library is shown to expose several APIs.
06:30 - 07:30: Car Library and Automotive Apps The chapter discusses the 'Car Library and Automotive Apps.' It begins with how automotive apps and the car Library communicate with the car service using the binder IPC through the Adel interface. At the top level, different types of automotive apps, including system apps, OEM apps, and third-party apps, are discussed. These apps use the APIs provided by the car Library to function effectively.
Android Automotive Architecture Explained in Detail 2023 Transcription
00:00 - 00:30 as you might be already knowing Android automotive is not a fork or parallel development of Android it is the same code base and it lives in the same repository as the Android on phones tablets and televisions in this diagram we can see how the automotive modules are developed in comparison to the Android architecture on the left side we have the Android
00:30 - 01:00 modules and on the right side we have the automotive specific modules these modules are created specifically for automotive many of the automotive modules are an extension to the standard Android modules for example the system UI is extended from the mobile version of system UI the Automotive Audio module is built on top of the core Android audio stack as displayed in this diagram at the top of the stack there are the system apps
01:00 - 01:30 OEM apps and third-party apps the app communicates with the services through the Android framework API in case of standard Android in the case of automotive apps the car API is used to communicate with the car service the car API communicates with the car service over the binder IPC this is because car API and car service are in different processes by default Android does not allow one
01:30 - 02:00 process to communicate directly with another process binder IPC is the inter-process communication mechanism used in Android as we can see the Android system services and the car service are on the same stack the car service communicates with the Android system services for its functioning the car service is started by the system server when the device boots up
02:00 - 02:30 the car service is responsible for talking with the vehicle Hull over the binder IPC the vehicle Hull communicates with the automotive ecu's that's not shown in this diagram but we will look at it shortly now let's look deeper into the right side of this diagram the automotive stack this diagram explains how the automotive modules are structured on the top we have the automotive apps
02:30 - 03:00 which communicate with the car Library normally we use the car manager classes to get hold of the services the library communicates over binder using the aidl interfaces with the car service the car service communicates over binder IPC using hidl or ideal interfaces hidl is being replaced by the aidl interface so in the future all the hidl files will get replaced by aidl
03:00 - 03:30 the vehicle Hull talks with the vehicle ecu's over the can bus or any other vehicle bus a vehicle bus is nothing but a specialized internal Communications Network that interconnects components inside a vehicle now let's look at the responsibilities of each of these components in the automotive stack let's start from the bottom vehicle ECU talks with the can bus or
03:30 - 04:00 vehicle bus for example to get the speed of the vehicle it would talk with the responsible ECU this data gets propagated to vehicle Hull as vehicle properties the vehicle Hull stores information as vehicle properties which are extracted from the ecu's almost all the properties are linked to the signals which are received from the ecu's car service is a system service started by the system server during Android boot
04:00 - 04:30 up car service can persist the state and provide apis to the car Library it works as a mediator between vehicle Hull and the car Library the car's service is in fact a collection of services if we look at the icar implementation we could find all these services we will discuss in detail how it is started when we do the Code walkthrough car Library exposes the apis to the
04:30 - 05:00 automotive apps car Library communicates with the car service over the binder IPC using the Adel interface and finally at the top we have the automotive apps this could be system apps OEM apps or even third-party apps these apps utilize the apis exposed by the car Library