Android Auto on Raspberry Pi: OpenAuto
By Lucy Hattersley. Posted
Advertisement
Head to head: Raspberry Pi + Raspberry Pi Zero + Raspberry Pi Pico.
Software engineer Michal Szwaj has released an open-source Android Auto emulator called OpenAuto, which runs on a Raspberry Pi 3.
Michal’s motivation for the project was straightforward: he wanted to retrofit his car and use Android Auto while driving. “I wanted to keep my car’s original head unit to preserve the design of the dashboard,” says Michal, but his car is “14 years old, so its head unit is far, far behind the modern head units.”
See also:
- Running Android on a Raspberry Pi 3
- Self-driving RC Car using Tensorflow and OpenCV
- Dride: Raspberry Pi Alexa car dashcam
Android Auto on Raspberry Pi
Thankfully a Raspberry Pi 3 has “a lot of advantages” for OpenAuto, as Michal lists: “It is very cheap, [has a] multicore processor, hardware video decoding, OS based on Linux, support for the MCP2515 CAN Bus module, and RCA video output.”
Android Auto essentially allows an Android smartphone to ‘project’ its interface onto another screen, but while this “sounds trivial,” Michal reveals that actually “projection requires processing a huge amount of data” as the projection system needs to display the Android Auto screen, play sounds, and relay user inputs to the smartphone as quickly as possible.
Michal reveals, “The challenge is to handle projection on [a Raspberry Pi], where RAM and CPU utilisation is very limited and even a small bottleneck leads to audio or video glitches.”
Android Auto and OpenAuto
Michal continues, “The most important thing to implement
[for successful emulation] was support for hardware acceleration of video decoding.”
He tells us, “As far as I know, all Android Auto POCs use GStreamer to render the video stream.” Alas, “GStreamer used on the Raspberry Pi does not provide plug-and-play support for OpenMAX,” according to Michal’s research. This means that OpenAuto’s video is “pretty slow, even at 480p@30[fps].”
As such, Michal cannot recommend you install OpenAuto in your car just yet, but by the time you read this, version 1.0 of the software should have been released for you to trial on a bench.
Head to OpenAuto on GitHub to see how to install OpenAuto in Raspbian.
Lucy is Editor of Raspberry Pi Official Magazine.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Teka-Sketch
This all-new e-ink-based Etch-a-Sketch can play Pong, and it also has an undo button
Read more →
Raspberry Pi vs Raspberry Pi Zero 2 vs Raspberry Pi Pico in Raspberry Pi Official Magazine 159
Without an operating system, any computer – including your Raspberry Pi – is just a dumb lump of sand. Put Raspberry Pi OS on it however, and you’ve got yourself a working system that can handle games, web browsers, emails, programming and everything else we bang on about here all day every day. The latest […]
Read more →
Win one of ten M.2 HAT+ Compact
The ability to connect NVME SSD drives to Raspberry Pi 5 is very cool, although it does slightly limit the cases you can use. With the M.2 HAT+ Compact, you can even fit an SSD-powered Raspberry Pi into the official case – and we have ten to give away below. Win one of ten M.2 […]
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.
