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
-
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.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.