Ubuntu Touch: reports of its death have been greatly exaggerated

probono
17 min readNov 17, 2019

--

Ubuntu Touch. Credits: UBports

Remember the times when Canonical was working on a Qt-based desktop and mobile phone? Remember Unity, the default Ubuntu desktop that was about to be rewritten in Qt under the name as Unity8 shortly before Canonical killed the project and switched to GNOME? And Remember Ubuntu Touch, the Linux-based operating systems for tablets and smartphones based on Ubuntu with a QML-based user interface? Turns out that the Ubuntu-based mobile operating system is living on and thriving in an independent community under the auspices of the UBports project. Quite possibly, being driven by a community of passionate volunteers may be turning out as one of its strongest points. Time to try it out!

Wouldn’t it be cool if besides Android and iOS there was a mobile operating system that was truly open source not only by license but also by spirit, one in which you you could actually be in full control over your device and personal data, one which you could change as you please, one which you wouldn’t have to “jailbreak” and fiddle around with to get at a Linux root shell and to install a system-wide ad blocker? One where you could send a pull request on GitHub with a realistic change of it being reviewed and merged?

There is no shortage of Linux-based mobile operating systems, but most of them have remained rather esoteric. Remember FIC Openmoko, Nokia Maemo, Intel Moblin, Intel/Nokia MeeGo, its fork Mer, its successor Sailfish OS, its commercial counterpart Jolla, Palm webOS, Firefox OS, its successor KaiOS, Samsung Tizen, Purism PureOS, Ubuntu Touch, and KDE Plasma Mobile? There are probably many more that have come and gone, with only iOS and Android being a reality on today’s phones and tablets. Sadly.

Turns out that at least the latter two are alive and kicking in “real” (as in: community driven) open source projects. Today we will have a detailed look at Ubuntu Touch. Shame on me, I assumed it had ceased operation back when Ubuntu stopped developing it back in 2017 due to “lack of market interest”. Boy was I wrong.

According to https://ubports.com,

Ubuntu Touch is the touch-friendly mobile version of Ubuntu. This operating system is developed and maintained by UBports: An international community of passionate volunteers. This means Ubuntu Touch is 100% community driven and independent

Let’s give it a reality check.

Test drive

I am testing this on a Meizu MX4 Ubuntu Edition phone kindly provided by the UBports project. It is a device that has been on the market for 5 years; most iOS and Android devices from that are have long been retired. If this hardware can run Ubuntu Touch, contemporary devices should have no issues at all, at least performance-wise. If someone ports the system to them.

Installing UBports

UBports Installer is used to install Ubuntu Touch on devices from a host computer running Windows, macOS, or Linux.

The Linux version conveniently comes as an AppImage which means you can run it on most common desktop Linux systems, not just Ubuntu.

UBports Installer AppImage running on a Linux desktop

Quite a polished experience, no fiddling around with cryptic command line flashing tools. Neat!

First boot

The device is quick to boot. No leftovers from Android are visible in the boot process.

Lock Screen

The lock screen is simple and straightforward. The color scheme immediately tells that it is Ubuntu we are running here.

Ubuntu Touch main screen: Yes, it’s clearly (still?) Ubuntu branded

Main screen

The main screen is a straightforward application launcher. Personally I do not need more than that, so I actually find this much simpler to use than the convoluted Android launchers.

Ubuntu Touch main screen: Straightforward application launcher called “Scopes”

General navigation

  • Swipe from the left corner of the screen to the center to see the running apps and switch between them with a Dash-like launcher
Ubuntu Touch application launcher: Swipe from the left border to the center to bring it up. Ubuntu desktop users will feel right at home
  • Swipe from right corner to center for a Alt-Tab like application switcher. Actually, if a Bluetooth keyboard is connected, Alt-Tab does work. How cool is that
  • Therein: Swipe app from center to corner to kill
Ubuntu Touch application switcher: Swipe from the right border to the center to bring it up. Kill apps by swiping them from center to the border. With a Bluetooth keyboard attached, Alt-Tab brings this up

Performance

Loading a typical app like the Contacts app takes 4 to 5 seconds. Again, this is on a five-year old phone, so pretty much in line with what you would expect with other mobile operating systems as well.

Apps

To my big suprise, all of the usual apps preinstalled on mobile phones are there. Phone, Messaging, Contacts, Camera, Browser, Clock, Calculator, Calendar, File Manager, Gallery, Media Player, Music, Notes, OpenStore, System Settings, Terminal, Weather.

For podcasts I downloaded Podbird, and for maps I downloaded uNav.

So in terms of apps, it ships with about the feature set of iOS 2 (if not more), which was quite usable (and not bloated). The apps have no glaring feature gaps (for example, the Clock app doesn’t only show the current time but also lets you set alarms).

Third-party apps may be a different story, but there is always Anbox (more on that later) to run an Android app in case a native one is not available (yet).

Updating apps

Not much to see here, works as expected.

Ubuntu Touch My Apps: Updating works as expected

System settings

Here, too, everything you would expect (but not more) is there. No glaring omissions here either.

Ubuntu Touch System Settings: Everything you would expect (but not more)

You can even use the mobile phone as a hotspot.

Ubuntu Touch System Settings: Use the mobile phone as a hotspot

This feels much closer to a finished product than to an early working prototype.

Permissions system

Ubuntu Touch also comes with a permissions system similar to what is known from other mobile operating systems:

Ubuntu Touch permissions system: Users need to grant access

The OpenStore

The OpenStore is the official app store for Ubuntu Touch which allows you to discover and install new apps. Just like Ubuntu Touch itself, it is an open source project run by a team of volunteers with help from the community. The team encourages the apps published within to be open source, but also accepts proprietary apps.

The OpenStore on Ubuntu Touch

Truth be told, I normally avoid using app stores and Linux software repositories and prefer to get applications directly from their original authors, in order to be sure to get the “official” version and not to be tracked by the store operator. This store seems reasonable, though.

Especially nice is how they integrated the opportunity to donate to application developers:

The OpenStore on Ubuntu Touch: Voluntary donations made easy

The software selection in the store may not be the largest and is certainly not comparable to the Google Play Store and the iOS App Store, probably not even to the F-Droid store, but the software that is there is usually high-quality and open source. It is hard to overestimate how valuable this alone is:

The OpenStore on Ubuntu Touch: uAdBlock, a system-wide ad blocker

You will not find this in the Google Play Store nor the iOS App Store, and getting something working from the F-Droid store usually involves fiddling around a lot. Here, it’s just a click away.

Connecting to a desktop

USB MTP

Attach the phone, it shows up as a MTP device just like an Android phone. But unlike Android, you don’t have to swipe around and click “confirm” a gazillion of times — it just works. How cool is that.

Ubuntu Touch device showing up as an MTP device in the desktop file manager

This functionality is nicely integrated into and advertised within applciations, like the Music app:

Ubuntu Touch music app: This is the screen iPhone users would die for

Now try that with an iPhone. Nada. Need to use iTunes or however their latest proprietary app is called, and always tends to break with Linux desktops. In contrast, this feels really polished, but simple and straightforward. It makes the user’s like easier. I like it!

ADB

Supposedly you can use ADB like with an Android device, but for that unfortunately you need to set up a password for the lock screen, which I personally find inconvenient. So instead I use…

SSH

It’s a Ubuntu box. Why not use it as such. By default, password-based authentication is disabled, but we can change this easily.

After all, we have a root shell at our fingertips.

Ubuntu Touch shell: One of the best features of the system is that the user is in full control right out of the box— without having to fiddle around first

So here we go: In /etc/ssh/sshd_config edit

PasswordAuthentication yes
ChallengeResponseAuthentication yes
AllowUsers phablet

And sure enough, now we can access the device using SSH. This allows us to do everything you do, well, on an Ubuntu box…

The top command running on the Ubuntu Touch device

I’d be interested in knowing what trust-stored-sk is and why it is eating 159% CPU… Apparently it’s a background service for permission handling: https://github.com/ubports/trust-store — maybe it was performing some kind of maintenance tasks. One reboot later, CPU usage is normal.

Hardware

Let’s make it really short here:

  • Connecting a USB keyboard over Bluetooth —check.
  • Connecting to wireless LAN —check.
  • USB keyboard and mouse via OTG adapter —check.

What’s missing, and how often did it crash?

With Canonical having dropped the effort, I was expecting a half-baked system with 80% of the functionality missing and lose ends all over the place. This is not the case at all.

In fact, the system did not crash once on me. And I am hardly missing something on first sight.

Just some minor nitpicks which I am sure can easily be addressed:

Missing

  • Speech recognition and text-to-voice. Everyone likes to talk to their phones these days. I hardly ever type a text, I always dictate. This may be the biggie? No one has ported Mycroft yet? As I learn from UBports developer Jan Sprinz,

“There were some experiments, and some people had something working a year ago or so, but it wasn’t really worth it. Voice assistants are either perfect or useless. With the team being very much occupied with other tasks, it’s not on the roadmap as of now. But of course we’d welcome any community members to take a swing at this!”

  • Change brightness from swipe-down menu (turns out it’s actually there: in the Battery menu of all things, because, well, uh, supposedly you search in the Battery menu to change the brightness…)
  • A way to change font size and weight. The default font size is very small and also very thin which makes it less legible than possible (I hear this is in the works and might come with OTA-13)
  • Swiping on the keyboard. Have to type each letter separately
  • A super simple way to switch on password-based SSH without having to resort to the command line on the device
  • Geolocation using WLAN— apparently this only works via GPS and not using the hotspots around me, hence I could not be located on the map while using the device indoors (luckily something is the works and might land in OTA-13)
  • The lock screen is always in portrait mode, I would like to also see it in landscape — because everything else does work in landscape
  • Something like NewPipe, a lightweight YouTube viewer and downloader

Bugs

How many bugs did I encounter during my tests?

  • Switching to the front camera results in “Cannot access camera”. Back camera works. Apparently this is a device-specific issue, so future devices should not encounter this
  • trust-stored-sk was eating 159% CPU until a reboot
  • A cosmetic glitch, screen rotation is not always working
Cosmetic glitch: Screen rotation is not always working

So, no biggies, nothing that couldn’t be fixed. At this point, I have to say that I am deeply impressed. Where I was expecting an unfinished, “for developers only” experience, I got much, much more than that — something I would not hesitate to give to “mere mortal” users (at least those who do not need apps other than what comes with the system).

A system with no glaring omissions and no obvious showstopper bugs. Everything else we will only see in a longer-term “real life” test.

But how does it all work under the hood?

Under the hood: The Ubuntu Touch software stack

At the time of this writing, the most recent release is 16.04 OTA-11 — dont’ be fooled by its name, it is rather recent, namely from October 2019 (two months old at the time of this writing).

Android Linux kernel

Ubuntu Touch uses the Linux kernel. On mobile phones, most often you find a customized kernel from the phone manufacturer that has been specifically built for the particular hardware and for use with Android. My phone is still running a 3.10.35+ kernel (from 2014). I would assume that this kernel has originally been built by the hardware company to run Android.

Bionic

According to Wikipedia,

The Bionic libc is a derivation of the BSD standard C library code that was originally developed by Google for the Android embedded operating system

libhybris

According to http://mer-project.blogspot.com/2013/04/wayland-utilizing-android-gpu-drivers.html,

Libhybris is a solution that allows non-Android systems such as glibc-based systems (like most non-Android systems are) to utilize shared objects (libraries) built for Android. In practice this means that you can leverage things like OpenGL ES 2.0 and other hardware interfacing provided within Android hardware adaptations.

This should make it easier port the system to most recent Android smartphones. However, at the time of this writing, this doesn’t seem to have happened yet, as the UBports website states as compatible systems not a single phone that has been released in the past two years:

  • OnePlus One (2014; 5 years old)
  • Fairphone 2 (2016; 3 years old)
  • Nexus 5 (2013; 6 years old)
  • Bq Aquaris E4.5 (2012; 7 years old) — there used to be an “Ubuntu edition”. Possibly the original phone that Canonical originally developed for
  • Bq Aquaris E5 (2015, 4 years old)
  • Meizu MX 4 (2014; 5 years old) — the phone I have been using for this review
  • Meizu Pro 5 (2015, 4 years old)
  • Nexus 4 (2012; 7 years old)
  • Bq m10 HD tablet (2015, 4 years old)
  • Nexus 7 2013 WiFi (2013; 6 years old)
  • Nexus 7 2013 LTE (2013; 6 years old)

Luckily, I hear that there’s a couple “newer” ones in the pipeline as well, which likely will reach maturity over the next months. Among them the OnePlus 3 (2016), Oneplus 3 t (2017) and Sony Xperia X (2016), and there’s a couple more to follow soon: http://docs.halium.org/en/latest/supplementary/devices/index.html

Halium

Halium is a project to define a standard target for porting different GNU/Linux operating systems to Android hardware incorporating various components, the most important one being Libhybris. It was started by UBports and KDE in 2016. According to the documentation it should be possible to port Ubuntu Touch to an Android device by building a Halium image.

Libertine

Libertine allows to run traditional desktop applications on Ubuntu Touch. https://wiki.ubuntu.com/Touch/Libertine

Maemo/MeeGo frameworks

According to Wikipedia, Ubuntu Touch uses components from Maemo/MeeGo, including

frameworks such as oFono as telephony stack,[20] accounts-sso for single sign-on,[21][22] and Maliit for input

oFono

Maintained by Intel, according to https://01.org/ofono

oFono provides a mobile telephony (GSM/UMTS) application development framework that includes consistent, minimal, easy to use, complete APIs. As an open source project it includes a high-level D-Bus API for use by telephony applications of any license. oFono also includes a low-level plug-in API for integrating with open source as well as third party telephony stacks, cellular modems, and storage back-ends.

KDE Plasma Mobile is also using oFono.

Mir

Remember Mir, the Xorg replacement from Canonical? Not used on the desktop, but on the phone it is still alive:

root@ubuntu-phablet:/home/phablet# ps ax | grep mir
1363 ? Sl 1:08 unity-system-compositor --enable-num-framebuffers-quirk=true --disable-overlays=false --spinner=/usr/bin/unity-system-compositor-spinner --file /run/mir_socket --from-dm-fd 11 --to-dm-fd 14 --vt 1
2136 ? Ssl 0:05 trust-stored-skeleton --remote-agent DBusRemoteAgent --bus=session --local-agent MirAgent --trusted-mir-socket=/var/run/user/32011/mir_socket_trusted --for-service PulseAudio --with-text-domain PulseAudio --store-bus session --disable-whitelisting=yes
2285 ? Ssl 209:40 trust-stored-skeleton --remote-agent UnixDomainSocketRemoteAgent --endpoint=/dev/socket/camera_service/camera_service_to_trust --local-agent MirAgent --trusted-mir-socket=/var/run/user/32011/mir_socket_trusted --for-service CameraService --with-text-domain CameraService --store-bus session --disable-whitelisting=yes
2287 ? Ssl 0:05 /usr/bin/trust-stored-skeleton --remote-agent DBusRemoteAgent --bus=system --local-agent MirAgent --trusted-mir-socket=/var/run/user/32011/mir_socket_trusted --for-service UbuntuLocationService --with-text-domain ubuntu-location-service --store-bus session

The Mir display server (now compatible with Wayland) is continued by Canonical upstream.

Qt 5 and QML

Qt 5-based[19] touch user interface.

Ubuntu UI components

Give Qt 5 apps the distinct “Ubuntu Touch” look and feel. To avoid confusion, should probably be renamed since Ubuntu proper has since switched to GNOME and Gtk.

Unity8 desktop

https://unity8.io/

In addition to the phone, the UBports community wants to “explore the possibilities of Unity8 on the desktop”. https://github.com/ubports/unity8

Morph Browser

Lightweight web browser tailored for Ubuntu, based on the Qt WebEngine and using the Ubuntu UI components. It requires Qt 5.9 to build and run. https://github.com/ubports/morph-browser

Click packages

Click is a package format that was designed by Canonical in 2012/13 for Ubuntu Touch (hey, was the name inspired by the original name for AppImage, klik?). Like with klik/AppImage, files do not need to be extracted and spread around the root file system. Architecture-wise it’s very similar to deb packages, with some small additions. Apparently it does the job admirably well.

Anbox

Anbox runs Android without hardware virtualization and seamlessly bridges over hardware acceleration features. The basic functionality is there, but it’s not recommended to be used for production yet. The UBports project welcomes contributions here, and also in the upstream project. Unfortunately it does not run on the phone I use due to some missing kernel patches.

Package system

Click, not Snap. Probably lighter on resources. Also, Snap needs systemd, wile UBports is still using upstart, because, you guessed it, kernel patches. But it looks like the UBports team wants to move to systemd sooner or later.

root@ubuntu-phablet:/home/phablet# click 
Usage: click COMMAND [options]
Commands are as follows ('click COMMAND --help' for more):build Build a Click package.
buildsource Build a Click source package.
chroot Use and manage a Click chroot.
contents Show the file-list contents of a Click package file.
framework List available frameworks.
hook Install or remove a Click system hook.
info Show manifest information for a Click package.
install Install a Click package (low-level; consider pkcon instead).
list List installed Click packages.
pkgdir Print the directory where a Click package is unpacked.
register Register an installed Click package for a user.
unregister Unregister an installed Click package for a user.
verify Verify a Click package.
Options:
-h, --help show this help message and exit

At this point I am asking myself, “can I use the APT repositories on Ubuntu Touch and install packages?” — turns out this is actually a FAQ question already answered by UBPorts like this:

Our goal is to provide a single platform for app developers, which will allow a single codebase to run on all Ubuntu Touch devices. It is possible to use apt on your Ubuntu Touch device but it is only for developers as it will most certainly break future ota updates.

But this is what I get:

root@ubuntu-phablet:/home/phablet# sudo apt update
Ign:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease
Ign:2 http://repo.ubports.com xenial InRelease
Err:3 http://repo.ubports.com xenial Release
Could not open file /var/lib/apt/lists/partial/repo.ubports.com_dists_xenial_Release - open (30: Read-only file system)

This would have been too easy, wouldn’t it. Turns out, actually it is:

mount -o remount,rw /

Works!

As UBports developer Jan Sprinz points out,

For developing and hacking, this works just fine. The reason we’re not using apt to update every part of the system (except for dev work and testing) is that we need to be a lot more stable and reliable. You don’t want your phone to be stuck with conflicting packages while you’re out and about.

So we’re using a system Canonical designed called image-based upgades, where (delta-)images are built on our servers and then installed over the rootfs.

Clever!

Running processes

Here are some of the more interesting processes that are running on the system:

/sbin/cgmanager --sigstop -m name=systemdupstart-local-bridge --daemon --event=android-container --path=/dev/socket/upstart-text-bridgelxc-start -n android -d -- /initrsyslogddbus-daemon --system --forklightdmunity-system-compositor --enable-num-framebuffers-quirk=true  --disable-overlays=false  --spinner=/usr/bin/unity-system-compositor-spinner --file  /run/mir_socket --from-dm-fd 11 --to-dm-fd 14 --vt 1upstart-udev-bridge --daemon --user/usr/bin/mediascanner-service-2.0gnome-keyring-daemon --start --components pkcs11,secretsupstart-dbus-bridge --daemon --session --user --bus-name sessionpulseaudio --start --log-target=syslog/usr/lib/rtkit/rtkit-daemonunity8 --mode=full-greeter/usr/lib/arm-linux-gnueabihf/thumbnailer/thumbnailer-service/usr/lib/evolution/evolution-calendar-factory/usr/bin/zeitgeist-daemon/usr/lib/qt5/bin/qmlscene qml/Main.qml/usr/lib/arm-linux-gnueabihf/qt5/libexec/QtWebEngineProcess

The UBports project

For a project attempting a massive undertaking such as maintaining an open source mobile operating system, it is vital to have a healhy environment of sponsors and contributors. So I was positively surprised to find out that this seems to be in place for the UBports project.

Sponsors

According to Wikipedia,

Mark Shuttleworth announced that Canonical Ltd. would terminate support for the project due to lack of market interest on 5 April 2017 and it was then adopted by UBports as a community project.

Back then, some may have mistakenly thought that Canonical had “killed” Ubuntu Touch. Now, in 2019, it looks like other sponsors have taken up the opportunity to continue the project, so besides individuals in what the projects describes as a “community of passionate volunteers”, corporate backing seems to be there.

UBports has many sponsors in 2019

Development model

The UBports application on the phone boldly claims:

UBports builds the most private and innovative experience. It is limited in potential only by what you — the community member — can dream. Regain control of your device and personal data. You have choice and freedom with UBports.

With UBports you can actually change the things you don’t like. Ever felt frustrated by a feature or a limitation or a weird layout? Get it changed! By reporting bugs and sending feature requests UBports will become the smartest platform you’ve ever experienced.

While the leadership (and funding) of one strong sponsor such as Canonical can certainly get things started fast, not being sponsored exclusively by any one company may well turn out as one of the strongest selling points for UBports — and can set it apart from Android which is under tight control of one single company, Google. In contrast, according to its website, “Ubuntu Touch is built by the community for the community”, and the project is looking for contributors.

https://ubports.com/community/get-involved says:

We need your help and support to make the UBports community more efficient and successful. Whatever set of skills you have, you can become our next Star-player by starting to contribute.
UBports is a community in which everybody is highly appreciated and welcome to contribute.

So, if you would like to contribute, head over to https://ubports.com/community/get-involved and sign up.

Bugs can be reported at https://github.com/ubports/ubuntu-touch/issues.

Conclusion

This feels solid. This feels like a product. This feels good. It makes one’s life easier. It has everything that is needed, but not more. And it’s fully open and community based.

Copying an mp3 to the music player over USB? Running a Linux root shell command? SSH into it? Install a system-wide ad blocker? It just works, no fiddling around. Easy! Most of this is probably “somehow” possible with other mobile systems as well, but here it is straightforward and simple.

The user is in full control. No Google tracking, no background services spying. The user has root access via sudo.

Already now, I like it.

Looks like Canonical didn’t kill it, but release it into freedom — and thus made it stronger than it ever was. Is UBports to Ubuntu Touch what Firefox was to Netscape?

I hope it will be ported to commonly available, recent devices, and I hope it will not suffer from feature (and complexity) creep.

How does this compare to KDE Plasma Mobile? It’d be for sure interesting to do a comparison… but that’s for another day.

probono is the founder and lead developer of the AppImage project and the author of a series (part 1, part 2,part 3, part 4, part 5, part 6) about #LinuxUsability. Grateful acknowledgment is made to UBports developer Jan Sprinz who provided a warm welcome, ample insight, and a test device. Screenshots were taken on the phone, transferred to the host computer via MTP, and edited using the mogrify -resize 33% -shave 1x1 -bordercolor grey -border 1 <image> command.

--

--

probono

Author of #AppImage and contributor to hundreds of open source projects. #LinuxUsability, digital privacy, typography, computer history, software conservation