In this article, when I say Linux I mean a unlocked phone running a conventional GNU/Linux userspace on a kernel that is upstream or reasonably close to mainline - not Android, even though Android itself uses the Linux kernel.
Introduction #
I've been a linux user for a very long time. I really like being able to control the device I'm using and tinker with it any way I like (even though, a lot of times, I don't actually tinker with anything - my Arduino and Raspberry Pi have been sitting unused for years). I like knowing that I can just look at the source code of the system and learn how it works and modify and customize it, and that anyone else can do the same and we can all share our modifications and have a really diverse and innovative ecosystem, from simple utilities that do only one small thing to really crazy new ways of working with your computer. That culture of openness has given us an incredibly abundant ecosystem. I currently use Arch Linux with XFCE, but others run GNOME, KDE, tiling window managers, or minimal setups that look nothing alike, yet all share the same foundation. That simply isn’t possible on closed platforms.
I never wanted to have an iPhone because Apple has the exact opposite philosophy, they want to control as much as possible and leave me as little control over the device as possible. I don't actually blame them, I think this should be an option, some devices I want to choose and customize everything, with others, I don't care. One of the features I always look for when searching for new devices is how open they are, thats why I have always opted for Android and usually Google pixel devices. But even Android has drifted toward the same walled-garden control.
On linux I can install different desktop environments and just modifying some files I can customize a lot of how the system works, I can write a bash/C/python script that modifies almost anything in the OS to suit my needs and I dont need to ask permission to anyone or submit my code to be approved by anyone before being able to run or share it. Compare this to our current mobile landscape.
I have a dream of having a mobile device that can work as my main phone and when connected to a keyboard and mouse (and optionally monitor) can work like a desktop environment. I have been experimenting with samsung dex and it is not bad, but far from ideal. I'm pretty sure if we had linux already, this would not be an issue.
Why Linux on Mobile Matters #
Here are some reasons why full linux on mobile devices matters beyond personal preference:
- Freedom and control: You can modify the system at any level, from the kernel to the UI. You can build any app, run it and share it easily and freely. No app store gatekeepers.
- Longevity and repairability: Linux can keep old hardware useful and more secure for years after official support ends.
- Privacy and transparency: Open code means you can audit what your system is doing.
- Interoperability: Linux desktops, servers, and IoT devices already share tools, libraries, and development environments. Mobile should be part of that same ecosystem.
- Innovation: Real experimentation happens when users can build and share without permission.
What are our current options? #
From least to most ideal:
-
Android-based: These include OSes like lineageos or grapheneos, they are good alternatives to Android and iOS but I don't believe they can be as strong a competitor as mainline linux. One of the main reasons I believe in linux is because of all the software that already exists for it, all libraries, tools, window managers, desktop environments, etc, and how everyone already knows how to work on it. From what I see those OSes do not want to become standard linux. Lineageos uses the kernel from the device's manufacturer, which is usually very old, the advantage is that lineageos seems to have the broadest support.
-
Halium and libhybris based: Not sure how active and maintained this still are, but halium and libhybris try to expose the Android functionality the device originally uses to userland linux, but they still use the original vendor Android kernel, which is usually old and not updated, not the mainline linux kernel. This can be an intermediary step since this seems easier to do than porting mainline linux to the device, but is not ideal.
-
postmarketOS on downstream kernel: one way to use postmarketOS is to use the device's original kernel, patch it and build linux userland over it, this is called using postmarketOS with downstream kernel, this can be easier because it uses a kernel we already know works on the device.
-
Mainline linux: All above alternatives are based on the Android kernel the device shipped with, although this makes it easier to work with the device, it has a lot of shortcomings. Using the mainline kernel is the ideal and long-term solution in my view. Devices that ship with linux or have first-class mainline linux support: PinePhone, Librem 5, Volla, etc. postmarketOS: for devices that do not ship with linux you can try to install postmarketOS with a mainline linux kernel, that is, it doesn't use the kernel that was shipped with the device but tries to run the mainline one.
In summary, this is a non-exhaustive list of projects working on linux (or at least non-Google Android alternatives) on mobile devices:
Android-based OSes (customized versions of Android) #
- LineageOS
- GrapheneOS
- /e/OS
- calyxos
Linux over Android (using the Android kernel originally shipped with the device) #
- Droidian (Debian based)
- Ubuntu Touch
- sailfish OS
- postmarketOS using a downstream kernel
Mainline linux (do not use device Android kernel) #
- postmarketOS with a mainline kernel
- PureOS
- Mobian
- sailfish OS
Mobile devices that support linux or custom Android OSes #
- PinePhone
- Librem 5
- Murena
- Volla
- furilabs FLX1s
- Jolla
- Unofficially: fairphone, Google pixel, etc.
Desktop environments for mobile devices (these are userspace projects that depend on a working kernel for the device) #
- Phosh
- GNOME mobile
- Plasma Mobile
- NemoMobile
- sxmo
Android Virtualization Framework #
Google has been improving Android Virtualization Framework (AVF) and we can already try running linux over Android. I think this is great, but it still leaves Android as the host operating system.
Linux is not ready yet #
Linux on mobile today is maybe like linux on desktop decades ago. On most devices you cant officially replace Android and we need to rely on workarounds. Even when you can replace Android, linux might not even start, and even if it starts, usually nobody except manufacturers knows how to talk to the phone components (touchscreen, display, audio, wifi, bluetooth, etc) so they might not work. Even if it works, there aren't many applications with UX adapted for the mobile world yet, but this should improve as the user base grows. In the transition period it would help a lot being able to run Android applications, waydroid already does it and it seems to work very well.
The hardware landscape in mobile devices seems worse than the PC world because it seems far less standardized, so every new device becomes a new reverse-engineering project. Compare desktop monitors to device screens for example, device screens seem much more different between each other than monitors, that makes it harder.
It is bad, but I believe it is the best long term bet we have.
Security #
Critics often say Android and iOS are more secure than Linux because of sandboxing and app isolation. That’s mostly true today. But Linux can evolve and the openness of its architecture means those improvements can happen transparently. Modern desktop Linux security features like SELinux, AppArmor, Flatpak sandboxing, and privilege separation could extend to mobile systems too. On the other hand, old Android devices stop receiving security updates after only a couple of years, so they become unsafe too.
Challenges #
Some major obstacles I see at the moment:
Government and banking app support: Most apps do not care about where they are running, if in an emulator or not, but some really important daily use apps really care, will check and wont run outside a real iOS or Android device, and worse, many don't even have a desktop/web alternative, like government and banking apps. Most of my banking apps only have a mobile app, and those that still have a web app are slowly shutting them down. You may try some workarounds and try to deceive those apps, but it is a tiresome battle.
Firmware: Android devices ship with many binaries that are loaded in the device components to make them work. Many of these probably cant be freely distributed and reverse engineering them to write an open source version is hard.
Battery: Power consumption is especially important for mobile devices and something that probably influenced everything in Android and iOS development, and I'm not sure linux would be on the same level, so I would expect that a linux OS would consume a lot more energy and thus experience shorter battery life.
Camera: it seems a lot of what is needed to take photos in smartphones is proprietary and poorly supported on Linux.
My plan #
I don't believe linux support will be pushed top down from governments and companies. Governments will not support or demand support from device manufacturers, device manufacturers will not add linux support, companies will not develop linux mobile apps on their own without user demand and actual users using it.
This will only happen if there is bottom up demand, from users. If only 0.5% of a company's users ask for linux support, they will obviously not do it, nobody would do it, don't expect them to do it.
This is mostly how I believe linux support evolved on the desktop.
So my plan is to spend my time moving linux support on mobile forward, starting in the simplest way I can, trying to make Linux work on devices I already own but don't use. These devices are effectively e-waste now and I plan to install postmarketOS, work through driver and configuration issues, and document everything I learn: display, touchscreen, audio, calls, Wi-Fi, camera.
Maybe starting with old hardware isn't the most strategic move, but it's something concrete. A really good alternative is having a target device with good specs that we could focus on and keep as a daily driver, I'll start looking for those. But I really love that we can make linux run on really different, unusual and old desktop and laptop devices, so making linux run on old devices is definitely useful, and it is only the start.
What you can do #
What you buy signals to the market what your preferences and priorities are, if you buy closed devices over open ones, that is what you are telling companies that you want, and that is what they will keep giving you.
When considering your next smartphone (and tablets, smart tvs, etc.), take a moment to consider how open it is, how easy it is to unlock it and how easy it is to run all the non-Google/Apple OSes mentioned in this article. If we keep buying the same stuff, the same stuff is what we will keep getting. Are you putting control over your device in the right order in your priority list?
Find all your devices that you can use to install postmarketOS, try to install it and document all the steps so others can reproduce and report all the issues you find during the process.
Conclusion #
I know this will be very hard and that today linux is behind, but what I know is that I wouldnt want a world where our only desktop choices were windows and macos, and right now the mobile world is even worse than that because proprietary mobile OSes are much more controlled than windows and macos, and it's getting worse, both are tightening their grip with every new release.
We don't need 90% of the market, or even 50%. Maybe at 5-10% Linux stops being ignored and start receiving the support from manufacturers we need.