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.”
- 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.