Running Linux apps on Android without rooting your phone
Building Your Own UserLAnd
Why compile UserLAnd yourself? First, compiling UserLAnd lets you work around the Android 10 storage policy. Second, you might have new ideas and want to collaborate on the project. If the motive is to disable the storage restrictions, you should definitely be aware of the risk of removing what is in principle a sensible security barrier.
You can download the source code of UserLAnd directly from GitHub [2] and then open it with Android Studio 4.x [8]. If you want to bypass the new storage policy, you can compile UserLAnd with an older Android SDK, such as version 28, which predates the restrictions. To install version 28, you have to edit the app\gradle.build
file in three places (Listing 8).
Listing 8
Changes to app\gradle.build
compileSdkVersion 28 targetSdkVersion 28 versionName "2.7.2-Android9"
As usual, you'll need to set your own device as a developer device and install the software APK from the PC with adb [9] or via the file manager in the device. Annoyingly, you have to uninstall the official UserLAnd version beforehand (due to the different or missing signature) and thus lose all data the Linux system set up.
Limits and Problems
Probably the most annoying weakness of the UserLAnd solution for Linux on Android is the limited number of open windows (three to six), which can even decrease during the session. UserLAnd then reports
Maximum number of clients reached. Failed to open display.
What is also very annoying is that the connection to the VNC server occasionally breaks down. Then you lose all your unsaved data because you can't connect to the session anymore.
Some VNC viewers had trouble transferring keystrokes for non-English character sets. AndroidVNC does not have the problem, but it is no longer maintained and has many other shortcomings. RealVNC's PC viewer, on the other hand, transfers the key combinations correctly.
Wireless mice often react clumsily. This seems to be a hardware problem that cannot be solved via the energy-saving settings. It is also annoying that you cannot shut down a Linux session and have to stop it in Android instead.
On the positive side, the filesystem can be exported and used as a backup – very handy for transfers to other devices, but keep in mind that backing up the filesystem can take some time.
Conclusions
The age of full-fledged pocket-sized computers has arrived. Once a few teething problems have been solved, these computers can be used at home without restrictions. Smartphones can already handle many basic applications, but you still need modern desktop computers or laptops for special tasks and 3D games with high performance and resource requirements. I also own a smartwatch with a dual-core CPU and 4GB RAM, and I am already wondering whether I'll be able to get a Linux distribution running on it.
Infos
- Android source code: https://source.android.com/
- UserLAnd: https://github.com/CypherpunkArmory/UserLAnd
- Importing files: https://github.com/CypherpunkArmory/UserLAnd/wiki/Importing-and-exporting-files-in-UserLAnd
- Eclipse downloads: https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.17-202009021800/eclipse-SDK-4.17-linux-gtk-aarch64.tar.gz
- Using the Android sound system: https://github.com/CypherpunkArmory/UserLAnd/issues/371
- Phoronix test suite: https://www.phoronix-test-suite.com/?k=downloads
- Alternative web browsers: https://www.ubuntupit.com/13-best-ubuntu-web-browsers-which-one-is-right-for-you/
- Android Studio: https://developer.android.com/studio
- adb: https://developer.android.com/studio/command-line/adb
« Previous 1 2 3 4
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
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.