Integrating Android applications into GNOME and KDE on mobile using Sailfish OS’ aliendalvik

Plasma 6 is coming together nicely on the desktop!

Coming back from hiatus, I was pleasantly greeted by a much more working session than when I last saw it in May; I have now completely switched over to it on my main machine!

On the other hand, there is still a lot of work to do on mobile to prepare it for the Plasma 6 release in February. I will outline the current situation and the work I have done in the past few months in order to make Plasma 6 a possibility for Plasma Mobile.

Devin at espi.dev

The linked blog post provides a great overview of the work that is being done and needs to be done on Plasma Mobile for Plasma 6, and I have to say that it’s definitely looking good and I’m quite interested is somehow giving Plasma Mobile a go.

The problem, however, is one that’s all too familiar to anyone who’s tried to run anything but Android or iOS as their main mobile operating system over the past 15 years or so: the lack of the kind of applications that you need to be a part of modern society. I don’t like it, but without my banking applications, identity applications I need in Sweden, things like WhatsApp, Signal, Discord – my phone would basically be a curious toy instead of a useful tool. Add needing the best possible smartphone camera to the equation – I have two small kids – and using anything but iOS and Android is simply out of the question.

One alternative smartphone operating system knew this, and implemented fairly transparent Android application compatibility – Sailfish – through their Aliendalvik tool. It seems Jonas Dressler, who works on GNOME Shell for mobile, was curious, and decided to take a closer look at Aliendalvik, to see if there’s anything there that the teams working on bringing KDE and GNOME to smartphones can make something of it. Sadly, Aliendalvik is not open source, so some reverse-engineering was required.

The interesting thing here is that due to the fairly standard userspace Sailfish is using, the Android integration is mostly using standard freedesktop APIs to integrate with the host OS: Running Android apps are exposed as individual Wayland surfaces/windows, notifications from Android appear as org.freedesktop.Notification messages on DBus, music player controls are exposed using MPRIS, and even text input for android apps can be provided using the Wayland text input protocol.

This means that basically Aliendalvik should work just as well on a standard Linux distribution like Fedora, Arch Linux, or Debian. The Android container can be started using standard linux container tooling and the host integration binaries are compiled for ARM64 and mostly link to various open source Qt libraries.

Jonas Dressler

After a few days of reverse-engineering, hacking, and lots of other hard work, Dressler managed to get Aliendalvik to work on GNOME Shell running on Arch on a smartphone, with all the integration between the Android applicatins and the underlying Arch installation working, and the code and instructions are up on Github. He also posted a video showing it working, and it’s indeed as impressive as it sounds.

Sadly, the elephant in the room here is, of course, the fact that Aliendalvik is not open source. Jolla could potentially offer it for purchase on non-Sailfish Linux-based smartphones, or perhaps even release it as open source entirely, but I’m not entirely sure if Jolla would be interested in any of that. The company is… In a bit of an odd state, and I feel like it’s mostly been in limbo with not as much progress as they once hoped they’d make. Releasing one of their crown jewels as open source seems unlikely.

My personal conviction is that if we ever want a Linux smartphone that is somewhat viable but isn’t Android, it’s going to have to be either Plasma Mobile or GNOME Shell on mobile, running on one of the popular, mainstream distributions that already run on ARM, are interested in mobile, and have a huge community to power the whole thing. Things like Sailfish or even Ubuntu Touch, as interesting and impressive as they are, just don’t seem viable to me in the long term when the entirety of the KDE and GNOME communities are working on their own projects.

6 Comments

  1. 2023-12-20 11:26 pm
  2. 2023-12-20 11:48 pm
    • 2023-12-21 5:01 pm
      • 2023-12-22 9:45 am
  3. 2023-12-21 4:06 pm