Is a Linux or Android faster on the same hardware?

Tinker Board

After playing around with a tinker board running Android and a Raspberry Pi 3B running Linux Raspbian I was interested to know if there was any performance difference between the same app running on Android and Linux on the same small processor boards.

This test was really only comparing apps running in each platforms browser, so for non browser apps the results might be completely different.

Raspberry Pi 3B
Raspberry pi 3B

This little test wasn’t quite as easy to do as I expected it to be. I needed a version of Android AND Linux that worked on the same hardware. I thought this was going to be fairly easy as I’d seen Internet references to Android on the Pi and Linux on the tinker board.

I tried a number of different Android implementations on the Raspberry Pi and they all had the same problem which was none of them supported a display resolution higher than about 1280 x 800. You can prod Android into different resolutions via ADB but nothing worked to get a higher resolution so the Android on the Raspberry Pi test was abandoned as I wanted 1920 x 1080.

Raspberry Pi Digital Signage Player
Raspberry Pi Signage Player

I have Android running perfectly on the tinker board in both landscape and portrait orientations so all I needed to do was put Linux on it.

Like Android on the Pi, Linux on the tinker wasn’t straightforward either. The link on the ASUS website to the official Linux distribution just returns a page not found error.

A number of tinker board Linux distributions were tested and they weren’t very good. Some had no hardware acceleration at all, others had it only in Landscape orientation. Without acceleration it’s not much use for anything beyond simple desktop or server use.

Eventually I found a copy of the proper Linux for the tinker board. It boots incredibly fast but needed some tinkering to get it running in portrait mode and to not flip back into landscape mode if the screen was disconnected then reconnected.

The Chrome web browser didn’t want to play video either.

Those problems aside, I had a tinker board that was running both Linux and Android so could do a speed comparison test. My test is an HTML5 signage player with the screen split into a number of different zones, with each zone showing pages that have some JavaScript animation in them.

On Android I had a full screen app with an embedded browser in it. On Linux I was using Chrome in full screen mode. Different browsers but they weren’t doing much.

So which was the faster, Linux or Android?

I was expecting Android to be the slower of the two, but there wasn’t really any difference between them. I tested both running in landscape 1920 x 1080 and portrait 1080 x 1920 resolutions.

In my test all the work is done by the browser which should be running nearer the metal so to speak which would explain the performance similarities.

I then upgraded the Chrome browser on the Linux tinker board and due to a bug it wouldn’t start. I put Firefox on it. That wouldn’t start either. I downgraded Chrome to something that worked but all the hardware acceleration had stopped working and animations then ran incredibly slowly.

I later tried the latest version of Armbian Linux for the tinker board which worked better than a previous version. This appeared to have both portrait and landscape orientation hardware acceleration. It wasn’t without it’s problems though, the Chrome web browser crashes so badly it shuts the board down.

Firefox worked so I tested our html5 signage with that. The animations weren’t as smooth as the Android app, which ironically uses the Gecko (Firefox) embedded browser.

Speed test done, I decided that Linux on the tinker board wasn’t ever going to work reliably, and updates just broke things.

I’ve been using Linux for years in one form or another and you always hit the same problem which is the hardware often isn’t fully supported due to licencing issues so you need to use a more powerful processor to do the grunt of any graphics work. Android tends to be built for the hardware so usually doesn’t have those problems.

As a footnote, the performance of the tinker board running the test app in Android and Linux (when it worked!) was far better than the Raspberry Pi 3B but that’s not surprising as it has a much faster CPU.

As a further further test I ran the same tests on a Windows 10 net-top PC and a Pi4. The Windows PCs are small sub £150 units about 12cm x 12cm and have 1.4GHz Intel Atom processors.

The performance of the Windows PC was far better than any of the other small boards at showing smooth animations so if you don’t mind putting up with disruptive updates that might put it out of action for a few hours every now and again it’s a good choice.