Google's Android Auto application casts content from a smartphone to a car's head unit display. Officially, that content includes navigation (e.g., Google Maps and Waze), media players (e.g., VLC, Spotify), and messaging apps. The application is useful, but it would be even better if you could show a film on your head unit's display or use it as an interface to a custom onboard computer that manages multiple cameras, GPS, and so on.
This article will demonstrate Android Auto Client-Server (AACS), an early-stage application I'm developing to do these tasks.
How to hack Android Auto
There are two approaches for displaying other content on the head unit's screen: you can hack the Android Auto application, or you can reimplement the protocol from scratch. The first approach seems simpler but is somewhat risky: it may use Google's intellectual property and therefore be subject to legal action, and it may break with new Android Auto versions (especially since Google actively works to make that happen).
Therefore, reimplementing the protocol from scratch is the safer approach for the long run. One such implementation of the Android Auto protocol is OpenAuto, a head unit emulator by Michal Szwaj. However, this article utilizes the other side of the communication interface—the mobile device side of the protocol.
Android Auto Client-Server (AACS)
AACS currently consists of three core modules and one external module that run on ODROID N2, an ARM-based single-board computer:
- AAServer is an implementation of Android Auto Protocol (AAP) that communicates with the car's head unit. It handles encrypted AAP-over-USB communication and exposes it over a Unix socket for use by other modules.
- AAClient is an AAP implementation that communicates with a phone that may be connected to ODROID N2 and forwards all traffic to AAServer. By using AAClient, you do not need to choose whether to connect your mobile or ODROID N2—you can connect both simultaneously.
- AAVideoSink is a GStreamer sink that sends video from a GStreamer Gst pipeline to AAServer. Combined with other Gst elements (such as ximagesrc), it allows you to cast any application to your car's head unit.
- GetEvents is an application that connects to AAServer and forwards touch events from the car's head unit touch screen to the selected application window using X Server's XTest extension.
Try it out
To try AACS, you need the following hardware:
- An ODROID N2 with power supply
- An SD card (16GB should be enough to start; 32GB is recommended) with a USB SD card reader
- A USB Type-A to Micro USB cable
- A cigarette lighter plug to 2.1/5.5mm plug cable (to power the ODROID in the car)
- A GPS USB receiver (I've tested the u-blox 7); this is not required to test AACS, but it's useful
Once you have the hardware:
- Grab the latest AACS release.
- Concatenate the files, unpack them, and copy the results to an SD card:
$ cat \ aacs_image_20201029.img.xz.aa \ aacs_image_20201029.img.xz.ab \ aacs_image_20201029.img.xz.ac \ aacs_image_20201029.img.xz.ad | \ unxz | dd of=/dev/sdX bs=1M
- Move the card to the ODROID N2. Make sure the ODROID is connected to the web by Ethernet and turn it on.
- Get the ODROID's IP address and connect to it through Virtual Network Computing. The password is
- You should see the OsmAnd start screen. Download appropriate maps and other files, then turn off the ODROID.
- Go to your car, change the car's date to somewhere between July 3, 2014, and April 6, 2020 (these are the certificate validity dates).
- Connect USB and power to your ODROID. Try connecting to the ODROID from the head unit with Android Auto. After roughly 30 seconds, you will see a control video on the head unit, and a few minutes more, you will see navigation (OsmAnd).
Please be aware that this is not production-quality software yet. It is closer to a proof of concept, so I would like to invite others to participate in its development.
Currently, the software has the following limitations:
- It was tested on only one head unit—an LG unit in a 2019 SEAT Ateca—and should be tested AACS with other head units.
- The only application that is available out of the box is OsmAnd running on Anbox. It would be great to have other applications available on AACS for things such as managing cameras (recording, road sign recognition), phone call support (multiple phones connected over Bluetooth), paid parking zone applications, etc.
- It was tested only on ODROID N2. If you port it to other single-board computers, please submit patches.
- It supports only input and video channels. It would be great to have support for audio, voice input, and other channels.
If the project looks interesting to you, join me on Github to submit ideas, patches, report issues, or help promote the project.
Comments are closed.