GNU/Linux has gained a reputation the world over as being an operating system that lets the users have a full experience and customization according to personal interests and style. As you may already know, the Android operating system was designed based on the Linux kernel. Having said that, Android runs on top of the Linux Kernel while Linux is an independent Operating system. Hence, they are not entirely similar.
Android apps have limited access to hardware resources compared to regular desktop apps. Therefore, a superuser would find it hard to use an Android app instead of a desktop one. Luckily, this situation can be rectified by adding a GNU/Linux environment onto the Android device. This will involve installing and configuring GNURoot Debian to allow a Linux environment to work with. Purposely, this can be helpful when on the move, but you only have access to an Android gadget, be it a smartphone or a tablet. It is worth noting that what we are doing in this article is not like running a full-blown Linux distro installation on Android. Instead, we are only adding a program that in turn installs a Linux sub-system. This sub-system comes with a range of toys such as apt-get and even the privilege to launch a smaller X server. Well, let’s get started.
Before we begin, note that a GNU/Linux environment can be installed on any Android device whether it is rooted or not. However, since many users may not want to invalidate their warrants, they do not root their devices. As such, this tutorial assumes your device is not rooted.
Basically, setting up the GNU/Linux environment involves the installation of two components namely; the GNURoot Debian app and Xserver XSDL. GNURoot’s primary purpose is to create the Linux environment in the host operating system which in our case is Android OS. Usually, Linux’s “Chroot” functionality comes into play here, but since we do not have root privileges, the GNURoot app uses a software called “proot” to accomplish this. The Xserver XSDL connects to GNURoot to help with the processing of heavy graphics which is the primary function of the X servers.
How to Install
- After the download is complete and installation is done, find the GNURoot app from the app drawer and run it. However, at this point, you should watch out for a “root” shell which is fake and ignore, because the app installs a “counterfeit” Linux root file system.
- The next step is ensuring that you have the most recent version of files obtained from recent upgrades and updates. As such, you have to run the apt-get upgrade and apt-get update commands since you are now on an Ubuntu/Debian Linux environment.
$ sudo apt-get update $ sudo apt-get upgrade
- The next steps involves setting up an environment for handling graphics. This is done simply by running the “apt-get install lxde” command to get the graphical environment together with all the tools that come with it, or you can alternatively run the “apt-get install lxde-core” command if you are only interested in the desktop environment.
$ sudo apt-get install lxde $ sudo apt-get install lxde-core
- 5. The next phase is creating a path to the terminal using the graphical environment. To do this a software program called XTerm is used. After that, you are also required to get the Synaptic Package Manager which is a front end to attain apt-get drivers so that you can hear audio playback using Pulseaudio. Use the following command:
$ sudo apt-get install xterm synaptic pulseaudio
- The final step is starting the xServer XSDL and downloading all the necessary fonts. After doing that, return to the GNURoot and run the commands below:
$ sudo export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712 $ sudo startlxde &
- After that, go back to XServer XSDL and relax as you await the LXDE desktop.
Installing Linux Apps on Android
Now that we have successfully installed Debian Linux and it is running on our device, Linux apps are needed for enjoying the full Linux experience. At this stage, the Synaptic Package Manager comes into play since it houses the vast repository of Linux apps that can be installed on the device.
Simply access Run from the start menu at the bottom and type “synaptic” and hit enter. When the Synaptic Package Manager launches, all you have to do is find the name of the app you want from the list and select it for installation. When the apps finish installing, your device should be ready to go.
An important aspect to keep in mind is that we are not working on a fully Linux package, so some apps will not run as smoothly as they do on the full package. Some apps will not even run at all. So, it should not come as a shock to you, neither should you start thinking you missed a step during the installation process. The Android apps that were previously present can also be accessed from this point. Even though most of the apps will work just fine, those that require hardware acceleration like some games are likely to run into problems.
For those of us who use Linux nearly all the time, and need to pull off some Linux moves with just an Android device, this app will serve you right. Wherever you are, you can quickly fire up the command prompt and use the apt-get commands to install any command line tool you need be it Wget, Traceroute or even Ssh. If you want to enjoy Linux apps on your un-rooted Android device, then GNURoot Debian is the most straightforward method out there. Getting used to the smaller screen takes some time, but once you are done, you can get the hang of things and actually be more productive while on your handheld gadget.