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)