With the exception of mobile phones, Linux has long been the standard for embedded devices, such as gaming consoles, smart TVs, set top boxes, ECG, monitors, and other medical devices. However, for the past year or so, there has been a strong indication that Android could potentially replace Linux as the platform of choice for the next generation of connected devices.
The big question is this: can Android really replace Linux as the go-to platform for your next embedded device? The right way to evaluate the question is by looking at two separate parts:
Here is our position: If the device you are envisioning has the following…
…then you really should consider Android as an alternative to Linux.
And why do we suggest Android, is it really ready enough?
The answer is yes, it’s ready, but you may have to tweak Android to work and fit well into your device. Without enough information, it’s very easy to conclude that Android is just too bloated, too slow, or too limited to get onto a device anything smaller than a 1GHz ARM CPU. And you would be right if you just looked at ‘mainstream Android.’ BUT, that is really not the case if you delve in deeper and work with partners who know how to customize Android for your needs.
Now, a Linux expert could turn around all of these points and state that “Android is just a layer on top of Linux” and that Linux can do everything listed above. This is technically true. The point however is how much effort do you need to spend on top of a vanilla Linux distribution to achieve these additions? Android already has them, so why not use it?
And herein lies the other part of Android: myth busting. Many people evaluate Android from its “stock image” –that Google maintains (AOSP) and conclude that it’s not suitable (yet) because it:
The answer to all of this is: you need to know how to customize Android to suit your needs. Once you do, the benefits are tremendous.
Android’s boot up and startup procedure is heavily customizable. There have been significant advances to improving Android’s U-Boot, including replacing it with single stage boot loaders such as Qi. There have also been advances in hibernation support for Android that results in significantly fast power-to-ready scenarios. These options reduce the time to load the kernel by over 5x. Next, you should look at reducing the number of system services that get started – only use the ones you need. There are many other optimizations you can achieve there, including reducing the preload of classes by Zygote and several others. If you search, developers have shown a sub 3 second boot for Android devices using a multitude of technologies.
First, ARM is probably one of the most common and flexible platforms for embedded devices. And yes, Android AOSP mainly supports ARM. But did you know that Android is also ported on MIPS, x86 and other platforms? There are several groups like android-x86, mipsandroid and others that support Android on platforms that Google directly does not. You should also keep a track of Linaro.
Depending on how you customize Android (see above), it is possible to have it work efficiently on a 700MHZ processor with 512MB of memory. Frankly, if you are working on a very low end processor, it’s probably not worth it to port Android. Is this a high end processor? We really don’t think so but if you have a form factor that is significantly less powerful, then Android is probably not a great choice.
Yes, the stock version is. But we’ve customized it for desk phones (powered, Ethernet!), medical devices, and appliances which have nothing to do with mobile phones. The benefits are tremendous – if you do get Android working on your platform (and we can do that for you), it’s so much easier to add features and upgrade, not to mention automatic support for a plethora of applications.
If we could count the number of times we’ve heard this from our customers… The point here is you can never predict your roadmap a year ahead. If you are in the market with a device with a rich UX and you believe you will never need apps, your end users will prove you wrong. Even if you don’t allow 3rd parties to deploy applications (yes, you can customize Android to not allow Play Store access) you can use the same infrastructure to deploy your own apps as upgrades!
There are two parts to Android: the core platform and the apps on top of it. The core platform is Apache Licensed – which means you can use it commercially, without paying Google at all. The other part, which is the core apps – like Google maps, search and others – are Google licensed and the only way you can get them on your platform is to be able to certify your device as Google compliant. You don’t need to have it certified unless you need Play Store access or need the apps. So let’s be clear – the core Android platform is Apache licensed and has been forked many times by many vendors for commercial use.
In our opinion, Bionic actually has several advantages, size and speed being one where it is more appropriate than glibc and even uClibc. Furthermore, it is BSD licensed so that means Android applications are not tied to GPL/LGPL effects. Bottom line, this really should not be a concern.
This is the corollary of ‘Java is easier’. Actually, this is not true. Android has two parts: the Java SDK and the C NDK – you can write applications that use the NDK as well. Furthermore, the core Android Framework is split between Java and C – and you can customize it at both levels to do what you want. Really, if you understand the source, it’s incredibly customizable.
Well, Android is a layer above Linux! When we modify Android, we hack Linux too – you have the source code for both, so don’t let Android stop you from hacking at the Linux that lies underneath it! Of course, you need to know how Android’s framework interacts with Linux, and that is where companies like us can help you make sure your changes don’t break anything.
Indeed it does. But that is a function of readiness and time. If you look at the market today, it’s all about applications – no matter what you are building. You now have fridges, car dashboards, watches , TVs and set top boxes powered on Android – and we expect this trend to explode
Bottom line, Android has a lot of additional, standardized work done on top of Linux: things that are very useful of you are thinking of a UX rich device. Don’t let the bulk of Android scare you – tame the beast and enjoy its incredible benefits.
(Do you find this article interesting? You may want to check out our Embedded Android pages to read more about what we do in this space.)