A software-defined vehicle is any vehicle that manages its operations, adds functionality, and enables new features primarily or entirely through software. Software-defined vehicles (SDVs) support capabilities that go beyond the processes employed at the production line of a manufacturer and can be fine-tuned or upgraded with over-the-air (OTA) updates. With SDV, the hardware can remain fixed throughout the lifecycle of the product and also be able to compete with new and upcoming versions with just an update to the software. Global brands like Tesla, Kia and more are leading this exciting transformation in the automotive industry, where updates are not just limited to the dashboards but throughout the vehicle electronics.
Achieving software-defined capabilities with Android
In our journey to achieve SDV capabilities with the vehicle powertrain electronics, we found the Android platform or in a better sense the Linux Kernel to be the perfect fit for the architecture, providing a user-friendly front end to the vehicle owner, having a robust and proven environment for any developer to write applications for the automobile world and also the ability to control added hardware on top of it through software modifications at the kernel level.
Pirdain recalls his venture into the Android ecosystem
In 2012, I used to have an HTC G1. It was the first Android smartphone to ever hit the consumer shelves. Compared to today it was a very alien Phone, HTC didn’t quite know which design philosophy to hold on to so it went with it all. It had a touch screen, a Qwerty Keyboard and also a track-ball. Some of you reading might not even know that a track ball used to exist on a phone! Compared to today when I use the Galaxy Flip Z4, we’ve come a long way. While we can sit all day to discuss phone ergonomics, in this article we will focus more on the Android Operating System for the Automotive environment. The Android Operating System has also come a long way since its inception in the mid-2000s. As they say, “It’s a very mature Operating System”, so one would rarely see any ground-shattering UI update hit the Android market anytime soon. Now let’s talk about what it was before it reached this stage. Back in the day rooting, which is unlocking the bootloader of the kernel and gaining root-level access, was the only way an Android phone could unlock its true potential and unleash the full power of the hardware which the manufacturer didn’t intend the common user to utilize. These features are available today to the end consumer in the form of “Gaming Mode” or “Power Saving Mode”, etc. I remember rooting my Samsung Galaxy S4 to flash a custom kernel tweak and change all the characters in the OS to display “Hodor”, referring to the character Hodor in the Game of Thrones show. Although this resulted in me not being able to make any sense of what was happening on the phone, it laid the foundation for my understanding of the “open-source” aspect of the Android ecosystem, meaning that anything is truly possible.
Linux Kernel — what controls Android?
A kernel can be thought of as the heart of an Operating System. Every OS has one, be it Windows devices, Apple devices and of course any Android device as well. Android uses the Linux Kernel which is an open source Kernel, meaning that its internal code, or at least most of it, is available publicly to use and add upon as required. The Kernel is responsible for managing and handling all the system resources, manipulating and assigning the memory, running user space and system essential services, handling file operations, etc. On average, the Linux kernel contains about 15 million lines of code, but almost 70% of it is dedicated to device drivers used for compatibility and communication with different hardware. So, think of the kernel as the layer of software which comes on top of the hardware drivers, be it your screen, GPS sensor, camera or even the storage peripherals. It’s responsible for executing the user application services, like an alarm app, as well as running the system-level services like maintaining the system clock. As seen in Figure 1, Android is really whatever comes next after the Linux kernel, namely, application framework, Java Native Interface and other native interfaces, operations managers and the user applications themselves.
Adding ‘any’ hardware to the Android OS
Kernel modules & vendor library modules; these are blocks of code programmed in C/C++ which have been compiled into binary files from their respective .c files. These modules can be used to add functionality to a system through Kernel/Vendor Image integration. These can be added at runtime in the form of a Loadable Kernel Module or added at the system build process, which is recommended. And through communication protocols such as i2c, UART or CAN we can virtually achieve any configuration of hardware combinations. The possibilities are limitless.
Integrating software-defined electronics with Android at its heart
There is an open-source version of the Android Operating System available for anyone to use called the Android Open-Source Project (AOSP). Although it lacks a lot of vendor-defined services and features, it enables us to implement our version of the Android OS and integrate our own vendor-specific files to provide a complete Android experience to the consumer. It would allow any Android developer to develop applications for the automotive industry with the knowledge they possess for smartphone Android application development. The time has come for the automobile industry to also host a whole plethora of applications, ranging from safety provisions in the form of ADAS software or some precise battery SoC calculation apps for the end consumer. With the capabilities of SDV and the functionality of Android, we can add any hardware to our automobile be it a camera, a GPS sensor or better yet, a traction motor or a Fig.1 The different layers in the Android Operating System battery pack! The “open source” aspect of the Linux kernel and the Android OS is also something to look forward to achieve an open-source software-defined vehicle like never seen before.
Akhil Gupta
Founder & CEO
Mazout Electric
Pirdain Bhalla
Product Manager
Mazout Electric