Otto Ryynänen

Boot to Qt on embedded HW using Android 7.0 and Qt 5.8

Published Friday February 17th, 2017
9 Comments on Boot to Qt on embedded HW using Android 7.0 and Qt 5.8
Posted in Android, Dev Loop, Embedded

One can have real pain trying to create a demo setup or proof-of-concept for an embedded device. To ease the pain Qt for Device Creation has a list of supported devices where you can flash a “Boot to Qt” image and get your software running on the target HW literally within minutes.


Back in 2014 we introduced a way to make an Android device boot to Qt without the need of a custom OS build. Android has been ported to several devices and the Android injection method made it possible to get all the benefits of native Qt applications on an embedded device with the adaptation already provided by Android.

The Android injection was introduced using Qt versions 5.3.1. whereas the supported Android versions were 4.2 and 4.4. It is not in our best interest that anyone would be forced to use older version of Qt, nor does it help if the Android version we support does not support the hardware that the developers are planning to use. I have good news as the situation has now changed.

Late last year we realized that there still is demand for Android injection on embedded devices so we checked what it takes to bring the support up to date. The target was to use Qt 5.8 to build Boot to Qt demo application and run it on a device that runs Android 7.0. The device of choice was Nexus 6 smartphone which was one of the supported devices for Android Open Source Project version 7.0.0.

The process

We first took the Android 7.0 toolchain and updated the Qt 5.4 Boot to Qt Android injection source code to match the updated APIs of Android 7.0. Once we could build Qt 5.4 with the toolchain, it was time to patch the changes all the way to Qt 5.8.
Since Qt version 5.4 there has been improved modularity in Qt and it became apparent during the process, e.g. the old Surfaceflinger integration was replaced with a platform plugin.

The results can be seen in the videos below.

The Boot to Qt Android injection is an excellent way to speed up the development and get your software to run on target hardware as early as possible. If you want to know more about the Boot to Qt and Android injection, don’t hesitate to contact us.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Android, Dev Loop, Embedded


Vlad says:

Looks really cool.Will this works for any Android device?
What Android parts are involved: bootloader+kernel+drivers?

what about native parts like surfaceflinger, binder etc?
are those wiped out?

Otto Ryynänen Otto Ryynänen says:

Hi and thanks for the interest.
I have to say I think it looks really cool too. 😉

The setup requires bootloader, kernel and drivers. It does not use JVM, only native parts like surfaceflinger (which we use for graphics).
As this is injection, we are just adding the Boot to Qt on top of existing OS, like we usually could put Qt binaries into a Linux system. The full Android with JVM etc. is still on the device but the UI and Java API-related files could just as well be removed as we don’t use them and those are not launched on boot.

The idea is to keep the existing OS as untouched as possible, this should work for any Android device that can be rooted (i.e. root access via adb is available and bootloader is unlocked).
You may want to read the blog post about the first time this was introduced for more detailed description.

Tofe says:

So I guess the main drawback is that applications that can be run have to be independant of a classic glibc stack ? Or have to be rebuilt on the bionic Android stack ?

Otto Ryynänen Otto Ryynänen says:

The toolchain includes android/bionic and the relevant libraries that are used for the build.

Alexander says:

I would like to see this running on the BeagleBone Black. Will it run with the Android image for this platform?

Otto Ryynänen Otto Ryynänen says:

In the original introduction of Boot to Qt Android injection the point was that it was mainly aimed for programmable development devices. The motive for using consumer devices for demonstration is to show that this is not limited to development boards alone.
But in your case yes, this should work well on Beaglebone. As said above, this should work for any Android device where boot image can be reflashed and root access is possible.

Scott says:

Can I do this with the LGPL version?

Otto Ryynänen Otto Ryynänen says:

No, this is currently something that is only offered via commercial version of Qt.

Otto Ryynänen Otto Ryynänen says:

One additional comment. Although the demonstration here is done on Nexus 6 (a 32-bit device) we have done the very same excercise also on a Nexus 6P (a 64-bit device). So the support applies to both 32-bit and 64-bit architectures.

Leave a Reply

Your email address will not be published.

Get started today with Qt Download now