Running Linux apps on Android without rooting your phone
Sound, OpenGL, and Cameras
The UserLAnd project has a good tutorial on how to use the Android sound system [5]. You'll need to route the sound output via TCP to another Android process. First you have to install the Android Termux app. Add the first two lines from Listing 5 to ~/.bashrc
. Then, in UserLAnd, install the pulseaudio package and add the last line from Listing 5 to .bashrc
.
Listing 5
Additions to .bashrc
pulseaudio --start --exit-idle-time=-1 pacmd load-module module-native-protocol -tcpauth-ip-acl=127.0.0.1 auth-anonymous=1 export PULSE_SERVER="127.0.0.1"
Now the VLC player can also output sound – and many nice games will work too (see the box entitled "Games"). However, some games only display an error message because I have not yet been able to install OpenGL. I also couldn't get the Linux system to access the smartphone's cameras.
Games
I could only check a few of the large number of games available in Ubuntu. Some refuse to launch completely unless you set up sound output or OpenGL first. However, some games do run and are easy to install, including Pingus, Maelstrom, and Gnome Sudoku, as well as XBoard with the chess engines Crafty and Fruit (Figure 3).
Performance
Once you get Linux up and running on your Android phone, the next question might be, does it provide the performance you'll need to make it a viable option? You can test the performance with exactly the same benchmarks you would use on a real PC to compare the results directly. Sysbench requires small adjustments (see Listing 6).
Listing 6
Benchmarking with Adjustments
$ sudo apt-get install sysbench hardinfo $ cd /usr/lib/aarch64-linux-gnu $ sudo mv libc.so libc_script.so $ sudo ln -s /lib/aarch64-linux-gnu/libc.so.6 libc.so $ sysbench --threads=8 cpu run $ sysbench --threads=8 memory run $ sysbench --threads=1 --file-test-mode=seqwr fileio run $ sysbench --threads=1 --file-test-mode=seqrd fileio prepare [... Reboot required ...] $ sysbench --threads=1 --file-test-mode=seqrd fileio run
The Hardinfo GUI tool depends on the VNC viewer. RealVNC is clearly the winner with 1,449 points compared with bVNC which only scores 930 points. Before running the seqrd fileio run
test, you need to restart the Linux system to avoid unrealistic results due to caching. The Phoronix test suite [6] (Listing 7) also provides interesting results. I would also have liked to run the 3D graphics tests like unigine-heaven
from this suite, but they are only available in binary format for x86_64 machines.
Listing 7
Phoronix Test Suite
$ sudo apt-get install unzip gdebi-core $ gdebi Downloads/phoronix-test-suite_10.0.1_all.deb $ phoronix-test-suite run sunflow
The surprise: An average family computer clearly outclasses a smartphone, but cannot totally outrun it. The 3D graphics performance is probably the only real drawback (Figure 4).
Alternative Browsers
During the tests, Firefox did not run at times, for example, due to problems with fonts. You can install a different browser if you are having trouble with Firefox [7]. Not all of browsers are available for the ARM architecture, but Chromium and Epiphany work. For a successful start, you have to add the option --no-sandbox
.
« 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
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.
-
New KDE Slimbook Plasma Available for Preorder
Powered by an AMD Ryzen CPU, the latest KDE Slimbook laptop is powerful enough for local AI tasks.