Running Linux apps on Android without rooting your phone
UserLAnd
The UserLAnd website offers the following description: "When UserLAnd first launches, it presents a list of common distributions and Linux applications. Clicking one of these then leads to a series of set-up prompts. Once these have been completed, UserLAnd will download and set up files required to start the task that has been selected. Based on the set-up, you will then be connected to your Linux distribution or application in a terminal or VNC viewing Android application."
UserLAnd offers a user-friendly (basic) installation of distributions such as Alpine, Arch, Debian, Kali, and Ubuntu. In addition, you can choose a desktop with LXDE or Xfce or just single applications like Firefox, LibreOffice, Octave, Gimp, and others.
The LXDE desktop environment is a good place to start, and it already comes with Firefox. If you were to install several desktop environments or a desktop and individual applications on top, UserLAnd would give each of these components its own runtime environment in its own session. This approach consumes a large amount of space, for example 850MB on the filesystem for Gimp alone. It makes more sense to opt for one desktop or one distribution and then add the applications internally, which would mean that Gimp needs only 80MB extra space.
If you decide to install a distribution and choose Ubuntu, the window manager twm first comes up with an xterm window. You can now install basic tools and the LXDE window manager (Listing 1, first two lines), which takes 20 to 40 minutes. Firefox is already included. Afterwards it makes sense to adjust the screen resolution to the monitor you are using. Edit the ~/.vncrc
file with an editor like Leafpad or vi and then restart the session. It is also important to set the time zone (Listing 1, last line).
Listing 1
Basic Setup
$ sudo apt-get update $ sudo apt-get install vim dialog tasksel lxde $ sudo dpkg-reconfigure tzdata
Expansion
The Linux world is now accessible: lsb_release -a
reports Ubuntu 18.04.5 LTS
, and uname -a
reveals the processor architecture – on the Snapdragon 845/855, aarch64
. The first thing you might want to do is set the background image, the font size, or the theme.
On Android 10, the filesystem is not immediately accessible due to security policies. The feature is known as Scoped Storage and causes an app to only access app-specific directories. The UserLAnd project describes a way to import files into the Linux session [3]. It is also possible to bypass these security settings if you are aware of the risk.
To test access to the internal storage and the SD card(s), use the commands in Listing 2. In the storage/
directory, the SD card(s) and USB sticks should appear as directories with nine-digit numbers. emulated/0/
is usually the path to the internal storage. The DCIM directory is where the camera stores its photos and videos. You will also find other known directories, such as Android/data/
.
Listing 2
Testing Storage
$ ls /host-rootfs/storage $ ls /host-rootfs/storage/emulated/0
You could also research manufacturer-specific paths. However, on Android 10 or higher, you can't access the paths directly: Permission denied
. You then either have to follow the hints in the UserLAnd tutorial [3] or look at the section in this article entitled "Building Your Own UserLAnd."
System expansion continues now with applications like an office package, C, Java, Gimp, VLC, or games (Listing 3, lines 1 to 4). OpenJDK 11 JRE is already included with LibreOffice. You can set up a variety of other programs just as easily, for example Octave, Gnuplot, or Inkscape (Figure 2).
Listing 3
System Expansion
01 $ sudo apt-get install libreoffice thunderbird 02 $ sudo apt-get install gcc g++ make 03 $ sudo apt-get install gimp vlc 04 $ sudo apt-get install xboard crafty scid fruit stockfish 05 $ sudo apt-get install cups hp-ppd hplip iputils-ping system-config-printer
First Difficulties with Eclipse and CUPS
Installing the Eclipse IDE for Java is unexpectedly difficult; sudo apt-get install eclipse
does not return the desired results. On the Internet, the use of Snap is recommended, but I couldn't get Snap to work either. Fortunately, you can also download the precompiled IDE from Eclipse.org [4]. What is unpleasant is that you then have to copy it manually onto the filesystem (usually to /usr/lib/eclipse/
with a start link in /usr/bin/
), and it does not add itself to the Start menu.
Printing with CUPS does not immediately work either. For a printer from HP, however, adding a few components is all it takes (Listing 3, line 5). In the test, printing failed at first. The cause of this failure was the /data/user/0/tech.ula/files/support/libcrypto.so.1.1
file. I solved the problem with the workaround shown in Listing 4. Annoyingly, Android restores the libcrypto.so.1.1
after each reboot, so the script has to run once per session. The UserLAnd project might fix this bug soon.
Listing 4
libcrypto.so Workaround
$ mv /data/user/0/tech.ula/files/support/libcrypto.so.1.1 /data/user/0/tech.ula/files/support/libcrypto.so.1.1_orig $ cp /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1 /data/user/0/tech.ula/files/support $ sudo /etc/init.d/cups start
After you replace libcrypto.so.1.1
, the final step is to configure system-config-printer
. In addition, you need to install the tool again and launch it, and then you can conveniently bind (WLAN) printers. After that, the printer is available to many programs.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.