DEV Community

Sohrab Behdani
Sohrab Behdani

Posted on

Linux on mobile, my experience so far

I spoke about this subject at MashhadLUG a few weeks ago but regretfully didn't record it. So I figured I would make the essence of what I talked about a blog entry—something useful and permanent and easy to access. Here's a glimpse at my experience with Linux on mobile devices, how it runs, the application base, and whether or not it's actually usable in everyday life.

Hold on a minute. Isn't Android also Linux?

Technically speaking, Android is indeed Linux. Sort of.
Android employs the Linux kernel but otherwise shares little in common. Unlike a standard GNU/Linux distro, Android has a non-identical C standard library—Bionic rather than glibc—which results in binary incompatibility from most standard Linux software. And on top of all this, Android isn't exactly the freest or most open OS in the universe either.

So when we mention Linux on Mobile, we're talking about installing a true GNU/Linux distribution on your phone—just like on your desktop or notebook, but (ideally) tailored for use on a phone.

How Linux operates on Smartphones: The Two Fundamental Approaches

  1. Middleware (Halium / libhybris) This is the "compatibility layer" approach. libhybris and Halium cooperate and fill the compatibility gap between Android's kernel/hardware and a Linux distro. The majority of the systems based on Halium (e.g., Sailfish OS, Droidian, and Ubuntu Touch) enjoy good hardware support as they reuse Android drivers.

There's a catch, however: they're based on the Android kernel, usually very outdated and not supported. So although this method "just works" for most devices, you give away freedom and future-proofing.

How it works:

  • Halium operates on top of the Android kernel
  • libhybris resides on your Linux distribution and translates glibc syscalls to Bionic So when you flip your flashlight on, for instance, libhybris converts the demand into a form which can be forwarded on to the Android hardware level. It's magical, really. But also a bit... Frankenstein-esque.

You can't bolt the full Linux experience on an Android platform and hope for it to be perfect. It's a hack—and hacks tend to have their limits.

  1. Mainlining the Kernel (a.k.a: Doing it the right way) With this approach, developers port a mainline Linux kernel on a phone's SoC. Rather than leveraging Android's driver stack and reusing it, everything gets rebuilt from the ground (or nearly so) from upstreamed Linux support.

This provides a much "cleaner" and more native Linux experience. Distros such as Mobian, postmarketOS, Koofr, and upcoming Parch make use of this approach.

But it's not all sunshine and rootshells:

  • Relatively few of the SoCs enjoy full mainline support (primarily Snapdragon chips)
  • Hardware support remains limited—cameras don't usually function, for example
  • Development is less device-friendly and slower compared to Halium setups

📲 Mobile Linux App Ecosystems

One of the things GNU/Linux distros are well known for is having plenty of choices available. That legacy carries over on the phone as well. You can execute apps designed for GNOME, KDE Plasma, or even alternative desktops—on your phone.

GNOME Ecosystem
GNOME has a fairly good mobile-optimized ecosystem. It's possible to use GNOME Mobile or Phosh or any of the countless GTK apps which scale well on small screen sizes. Personal favorites of mine are:

  • GNOME Podcasts
  • Dino - a great XMPP client

You won't really notice anything's lacking in this world—most apps work really well on phone.

Plasma Mobile
KDE's Plasma Mobile offers you a neat, contemporary, and familiar experience. In my experience, I've found Plasma Mobile has a noticeably longer battery life compared to GNOME or Phosh and so it seems more optimized.

Its app catalog is not as large, however. Nevertheless, there are some positives:

  • PlasmaTube – a YouTube client
  • Kasts - a Podcast App

😬 Things That Don't Feel Great

🧭 Web Browsers
This is part of the more frustrating aspects.

  • GNOME Web (Epiphany) employs WebKitGTK, which has trouble with contemporary websites and will sometimes crash.
  • The Angelfish browser from KDE has somewhat improved courtesy of QtWebEngine but remains barebones in features and polish.
  • Firefox, as available, takes a huge amount of tweaking through CSS just to look properly. It's far from as fluid or even as mobile-friendly as you might expect.

So yeah—don't look for a browsing experience comparable to Android or iOS yet.

📵 Telegram
No decent mobile-optimized Telegram client on Linux yet. The desktop version sorta works. You'll have to shrink it way down just so it'll even fit on screen, and even then it's about as useful as a screen door on a submarine without a magnifying glass.

🔬 My Real-World Usage

I've used Droidian, postmarketOS, Ubuntu Touch, and Parch on my phone.

Here's the real story:
Linux on a cell phone isn't anywhere close to being suitable for ordinary users. It's a playground for tinkerers and trouble shooters even now.

Main Issues:

  • Absence of critical apps
  • Limited Hardware Support
  • Strange and inconsistent UI/UX in most apps

Yes, Android emulators can certainly fill some voids—but now you're missing the point. The true objective is to run Linux apps on a Linux phone, not resort back to Android compatibility.

📷 Some Screenshots

Gnome Mobile

About Page

System Information

🗨️ So....

This Post has turned out brief—I didn't feel I could elaborate without making it a little book. 😅

I'll make it up in a subsequent entry, perhaps a bit technical or a how-to-type post.

Top comments (2)

Collapse
 
darshan_rathod profile image
Darshan Rathod

Great blog! Ubuntu Touch is also worth a try.

Collapse
 
behdanisohrab profile image
Sohrab Behdani

Thanks! I had used ubuntu touch a while back, it was the first thing that i tried.

unfortunately for me, at that time my phone was redmi note 8 pro and it only supported 16.04 which was outdated.