Tech News
← Back to articles

Running PostmarketOS on Android Termux proot without a custom ROM (2024)

read original related products more articles

閱讀中文版

Running postmarketOS and Phosh on Android phone without rooting or flashing a custom ROM.

I’ve taken the unofficial and weird approach of running postmarketOS on Termux Proot, so that we can run mobile Linux on Android.

A video demonstration. Phosh + postmarketOS runs on Sony Xperia 10 V Android 14.

Why do I do this? To explore the possibilities of running mobile Linux on an Android phone. And we needed a desktop environment designed for touchscreens.

It’s my personal wish to run mobile Linux on my Sony Xperia 5 & 10 series, but not many people have ported postmarketOS for them, and I didn’t succeed myself. So I’m just using Termux to taste the sweetness of the mobile Linux OS. I would like to share this highly experimental method of running postmarketOS on Android with you.

postmarketOS is a GNU/Linux system designed for out-of-season mobile phones. Based on Alpine Linux, it has full Linux functionality and is able to run Linux pc applications, and it has become one of the most popular distro choice among PinePhone users. However, postmarketOS is not available for all Android phones, see postmarketOS pmbootstrap installation instruction. In order to port a postmarketOS to an Android phone, you need to pacth the Linux kernel a lot, and since many drivers are not compatible between Android and Linux, it is more difficult to create a postmarketOS ROM than to port LineageOS. Even if you finally get it up and running, there will be lots of missing proprietary drivers, which makes the system unpleasant to use.

Moreover, the entry barrier for installing postmarketOS is very high, and for many mobile phone users, they can’t even unlock the bootloader, so it’s impossible to flash a custom ROM. This makes Termux a good option to consider, as it allows you to run Linux containers on your Android without rooting, and display the Linux container X server screen with Termux X11. The first question we have to ask is whether pmbootstrap can be run on Termux. According to this Github issue, chroot is hard to run on Android without rooting. So we use a slower proot instead.

Termux provides rootfs for Alpine Linux, and postmarketOS is originally based on Alpine Linux, so if you do a little trick to convert Alpine Linux to postmarketOS, you can get those packages designed for mobile Linux. Why don’t we use Alpine Linux directly, because some packages of postmarketOS are not being upstreamed, some packages are not found in Alpine Linux’s repsitory.

Finally, let’s talk about Phosh, a desktop environment developed by Purism, a free software company, designed for Linux phones. Its Wayland compositor, Phoc, is based on wlroots. In the PinePhone community, Phosh is one of the best rated interfaces. According to my personal experience of using PinePhone, I think Phosh is the most stable interface although the interface is very simple, and Phosh is very resource-saving. The animation of Phosh is still very smooth even running on the underpowered PinePhone which equipped with Allwinner A64 processor. I think Phosh is very useful for users who want to interact with Linux system in Termux X11. Because most Android phones don’t have keyboard and mouse, so if you run XFCE, KDE Plasma, GNOME and other traditional Linux desktops in Termux X11, it would be very awkward. So that , the touchscreen-optimized Phosh would be an excellent choice.

... continue reading