Launching full OS on Android

Today, two operating systems occupy leading niches in the mobile segment - iOS and Android. Many manufacturers are closely involved in creating their own mobile systems. Some attempts were successful. The result was, at best, a few devices that never achieved market success. Ubuntu Touch was announced in 2013.

The phones are equipped with a mobile version of the Linux system - Ubuntu Touch.

It had some interest from users. Ubuntu Touch, which can still be installed on a smartphone today, offers the user not only a new interface. It will be of interest to enthusiasts, as well as all fans of the Linux OS. And just for those who are tired of the monotony of mobile platforms.

The Ubuntu Touch mobile platform appeared 4 years ago. She gained quite wide popularity - this was facilitated by the well-known desktop “mother” of the new mobile system. But popular version on Ubuntu phone I didn't. The reason for this was low stability, a large number of bugs Devices running this OS were often rebooted, and the shell did not represent the height of design thought.

The press has returned to this topic many times. operating system. There were all sorts of rumors - both about the freezing of the platform and about a complete cessation of work on it. You can’t trust all of them, but as a fact, Ubuntu Touch appears quite rarely on smartphones. IN Lately information is being released about significant updates to the platform and this gives all fans of the mobile OS hope that Canonical has not forgotten about the promising product.

The Ubuntu mobile version project has two separate global versions- for smartphones and tablets. They are called Phone and Tablet respectively. They are practically the same for the end user, and the differences are aimed, rather, at supporting the hardware platform.

Key Features

The desktop version of the OS uses the Unity graphical interface, which is loved by non-professional Linux users. In the mobile phone, the manufacturer moved away slightly from it - only the side and top panels remained unchanged.

All basic actions in the new OS are performed using gestures. For example, if you drag between the edges of the screen, the multitasking menu will appear on it. For Android users, this solution will be somewhat inconvenient, but innovative and unusual.

In addition, Ubuntu has a Terminal on your smartphone! This is still an inferior version of it, and it is still far from the functionality of the desktop one. However, some functions are still there, and the techniques work.

How to install Ubuntu on Android?

To install Ubuntu on your phone instead of Android, you need to have basic skills in working with the Android system. The installation will not remove your “native” system; it will be performed on top of an existing distribution.

IMPORTANT. You perform all actions at your own peril and risk.

  1. You will need the Android application - Linux Deploy. You can find it on Play Market.
  2. Launch the program and explore the on-screen help menu. You should see a suggested course of action.
  3. If necessary, go to “Settings” and select Russian interface language.
  4. Create new profile for accounting Linux entries. To do this, in the main screen of the program, click on the “Linux” line. It is located at the top.
  5. Click OK. All that remains is to select the desired profile.
  6. And now you need File manager. It's best to use ES File Explorer. Open it. In the root directory, create an Ubuntu folder. It is very important to write down the name in English. The OS files will be installed in this folder.
  7. Write down the folder path in a separate place. It will still come in handy.
  8. Run Linux Deploy again. In the options, select “Distribution” - “Ubuntu”. After this it should start Ubuntu download to a smartphone.
  9. When the installation is complete, click on the “Start” button. You will see service messages. They say that the OS deployment process is underway.
  10. Download and install the VNCViewer application. You will need it to obtain additional data. Password account default is changeme.
  11. That's all! You now have a fully functional copy of Ubuntu installed on your smartphone or tablet!

Installing Ubuntu Phone

We looked at installing a full-fledged Ubuntu on mobile device. Installing Ubuntu Mobile to smartphone - more simple task. It can be performed from the desktop version of this operating system.

Detailed instructions for converting any device running under Android control, into a full-fledged Linux-based computer.

Running Linux on Android is possible! And you don’t need a device with root rights for this: all the necessary software is available in official store Google Play. In just 10–15 minutes you can get an operating system that differs from Android in advanced functionality.

Note: if you follow our instructions, Linux OS will run in virtual environment. Android will still be running in the background. To call such a system complete would be incorrect. However, with the list standard tasks she's coping well.

Before installation, close all unnecessary applications and clean RAM Android device.

1. From the Google Play Store, install GNURoot Debian and XServer XSDL.

2. Before the beginning Linux installations Make sure your device is connected to a stable Wi-Fi network. Launch GNURoot. The required environment packages will begin downloading.

Installation takes from 30 seconds to several minutes depending on the speed of your Internet connection. Ignore the tickers until the following message appears:

root@localhost:/#

Those familiar with the concept of “root rights” should not be scared by this line: the application will not cause any harm to the device, since it works in a “sandbox”.

3. Enter the following command:

apt-get update

Wait until the packages are downloaded. This will be indicated by the line Reading package lists…Done.

4. Now enter another line:

apt-get upgrade

To the question “Do you want to continue?” enter the English letter Y and press Enter. The installation of packages will begin.

This time the installation procedure will take a little longer. Wait patiently for the installation to complete until the coveted line appears:

root@localhost:/#

Wednesday Debian Linux installed, and now you can proceed to deployment graphical shell.

5. Installing all packages Linux distribution executed with the following command:

apt-get install lxde

There is also an option to install the system kernel using the line:

apt-get install lxde-core

Confirm the installation by re-entering Y and pressing Enter. The package download process will begin.

During installation, make sure that all files have successfully downloaded, and that when unpacking, your device does not run out of free space. Otherwise, the system startup will fail.

6. To complete the installation of the operating system, you must download three additional utilities:

  • XTerm - to access the terminal from the Linux graphical shell;
  • Synaptic Package Manager - for managing apt packages and downloading applications;
  • Pulseaudio - for installing sound drivers.

All three utilities are installed using one GNURoot terminal command:

apt-get install xterm synaptic pulseaudio

About 260 MB of data will be downloaded to the device.

7. Now minimize the GNURoot application and open the previously installed XServer XSDL. Agree to download additional fonts. After the installation is complete, tap on the screen several times (the application will ask you to select the resolution and font size - it all depends on your preferences) until you see a splash screen with a blue background and white text.

Re-launch GNURoot and enter the following two commands one after the other:

export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712
startlxde &

The sequence for further restarting the system (when you want to open Linux again) looks like this: start XServer XSDL and wait for the blue screen to appear, open GNURoot and enter the two commands above, return to XServer XSDL.

If the terminal complains about an invalid command, return to step 5 of these instructions and try installing a bare kernel. Check the memory status of your Android device.

8. Now open XServer XSDL, wait a few seconds, and you'll have Linux ready to go.

To install applications in the lower left corner, open Start menu and select Run. Type Synaptic and press Enter.

In the window that opens, use the search and install the necessary applications. This could be the Firefox browser, editor GIMP images, office suite Libre and other Linux compatible programs.

Of course, this option for installing Linux cannot be called full launch operating system on Android. Virtual Linux has several limitations, but when using a wireless mouse and keyboard (it is also possible to connect using an OTG adapter and a USB hub), you can turn your smartphone or tablet into laptop with the functionality of an adult OS.

Many Android phone owners have difficulty running real Linux software on their devices. By all laws, it seems to be supposed to work here, but for some reason you need root rights to install it, it itself is distributed in some homemade installers, and the choice of programs is very limited. This article will offer an answer to the question of why this happened and suggest a solution - convenient way installing and running almost any Linux software on Android.

Linux or not Linux?

As you know, Android is based on Linux kernel and includes a set of standard libraries and command line utilities typical of a regular Linux distribution. However, launching classic Linux software here is very difficult due to many reasons, including ABI incompatibility, lack of a package manager, proprietary security system, and the absence of many components of a standard Linux system.

So, despite the presence in Android standard libraries libc and others, their implementation in most cases is incompatible with libraries from the GNU project and is greatly reduced in functionality. For this reason, Linux software needs to be at least rebuilt specifically for Android and ARM processors, and in many cases also patched, adding functionality that is missing in the libraries.

BotBrew: list of supported devices

BotBrew has been tested on the following devices: Barnes & Noble NOOK Color, LG P970 Optimus Black, Huawei Ascend M860, HTC Desire, HTC Evo 4G, HTC Evo 3D, HTC Inspire 4G, HTC Droid Eris, HTC Hero, Samsung Galaxy Nexus, Samsung Galaxy S2 (GT-I9100), Samsung Galaxy Y (GT-S5360), Motorola Atrix 4G, Motorola Droid/Milestone, Sony Ericsson Xperia X8, Asus EeePad Transformer TF101.

System Android security, cutting off applications in privileges by full program and not allowing them to go beyond their own directory, also seriously interferes with the operation of standard Linux software. Therefore, it is often necessary to obtain root rights, which removes these restrictions. The lack of a package manager that allows you to install regular Linux software, and not just Java applications, forces developers to write applications that are needed only to install other applications. This is how all these custom installers appear.

Well, the picture is completed by the fact that Android simply does not have many standard Linux components, including, for example, even such integral ones as the X Window graphics stack or the GTK+ library. Some attempts are being made to bring all this here, of course, but things are not moving beyond semi-working alpha versions.

Nevertheless, the opportunity to transfer the functionality of a full-fledged Linux system to Android is too tempting an idea for enthusiasts not to try to solve the problems that arise in the process and give us a full-fledged universal solution. The most obvious and simple way is to run a “virtualized” version of a full-fledged Linux distribution, which we have already written about in detail. This method is interesting, but suffers from the problem of dividing the system into two areas, each of which operates independently of the other.

The BotBrew project looks much more interesting - within its framework, a package manager and repository that is quite common for Linux systems is being developed, with the help of which you can install Linux software in a separate directory inside Android. Also, at one time, many different scripts were invented that make it easy and without unnecessary problems to assemble Linux software suitable for working inside Android on big brother. The rest of the article will be devoted to these two projects.

BotBrew

The BotBrew project is designed to solve many problems with installing Linux software that a user may have, and prepare Android system to accept applications foreign to her. Essentially, the system consists of four components:
  • repository with precompiled for Android applications, using which you can install many Linux applications using a single command;
  • package manager, which uses lightweight Opkg or dpkg along with apt-get in the experimental version of BotBrew Bazil;
  • the runit process manager, which is necessary to properly launch and maintain the operation of daemons, if any are installed;
  • a proprietary build system that contains all the tools needed to cross-compile applications using any desktop Linux distribution.
To work, this miracle of programming thought requires nothing at all: root rights and a little free space in internal memory smartphone or memory card. Moreover, the first option is preferable, since in the case of SD the files will be dumped on a virtual disk, which is not supported by all cores.


Initialization

At the moment, the classic version of BotBrew, which uses its own repository, allows you to install software such as dcron, GCC, Git, dropbear SSH server, Lynx console browser, Nmap security scanner, rsync backup tool, Vim editor, lighttpd web server, scripting languages Python and Ruby, as well as several dozen other packages. By the way, all this is installed in a dedicated directory in the internal memory of the smartphone/tablet and does not clutter up the main system in any way. In other words, you can get rid of BotBrew and everything you installed by simply deleting one directory.

Install the software

So, how do you use BotBrew to install Linux software? First, we need a package with the program itself. It is available on Google Play (note that you need BotBrew root, not the experimental Bazil) and weighs less than a megabyte. After installation, launch and click the “Proceed” button at the bottom of the screen so that the software downloads all the components necessary for its operation, such as console manager packages, and other utilities (in Debian Linux terms - bootstrap). They weigh only a few megabytes, so you won't have to wait long. Once the installation is complete, BotBrew will display a window with the official website of the project, which you can safely close.

Now on the screen you should see a list of packages available for installation. There are quite a few of them, but for the reasons described above, you won’t find any graphical applications among them. But there are a variety of servers, compilers and interpreters, so everyone who wants to seriously “play around” with a smartphone will have room to turn around. To install a package, just tap on its name and on the next screen containing information about the application, click the “Install” button.

Dancing with tambourines

If you encounter problems with BotBrew bootstrap, you can try installing it manually using the following command:

Wget http://repo.botbrew.com/anise/bootstrap/install.sh -O - | su
If this does not help, you can try removing all installations (“Remove BotBrew” in the settings) and then try running this command.

After this, the package will appear on the “Installed” tab, but you will not see any “Run” button or anything similar. The application will have to be launched independently from the console, which, however, is logical. The application itself is installed inside the directory structure /data/botbrew, in which the real environment of the Linux distribution with the directories /etc, /usr and others is “emulated”. And in order not to torment users with the need to type the full path to the command, the BotBrew developers have provided a wrapper command of the same name. To use it to launch, for example, the installed Lynx console browser, you should type the following command:

$ botbrew lynx http://xakep.ru
Alternatively, the /data/botbrew/bin directory can be added to the PATH environment variable, but this will have to be done after each start of the terminal:

$ export PATH="$PATH:/data/botbrew/bin"
By the way, things are much better with demons and various network services. After starting, the daemons will be launched immediately, and you can control their inclusion through the graphical interface, accessible by clicking on the “Play” button at the bottom of the BotBrew interface. Some applications may require creation additional users and changing their parameters, this can be done in the same way as in a regular Linux system:

  1. Creating a user:
    $ botbrew adduser Vasya
  2. Opening Internet access to the user:
    $ botbrew addgroup vasya inet
  3. Switch BotBrew to another user:
    $ botbrew su vasya
Please note that all these changes will affect only the BotBrew virtual environment and will not affect the main system in any way. The console can also be used to install applications bypassing the GUI. To do this, you should use the console package manager Opkg, whose command syntax is fully compatible with apt-get:

$ botbrew opkg install dropbear
Reverse operation:

$ botbrew opkg remove dropbear
To stay “at the forefront of progress”, the BotBrew repository needs to be updated from time to time by clicking on the corresponding button in the graphical interface (it cannot be confused with anything else). New versions of packages will be displayed on the "Upgradable" tab. Just tap on his name and click “Upgrade”.

BotBrew Basil

You can also find an application in the market called BotBrew Basil, which is marked as experimental. In essence, this is still the same BotBrew, but with one very important difference. Instead of native repositories and the Opkg package manager, it uses Debian Linux ARM repositories and the apt-get package manager. This means that the amount of software that can be installed using the “Brazilian version” of the application is much greater. Ten times more.

In addition to using Debian repositories, Basil also features a slightly modified interface. For example, immediately after launch it prompts you to select an installation directory. The default is /data/botbrew-basil, which, in my opinion, is quite logical, but you can choose any other one, including on the ext2 partition of the memory card (FAT will not work).

The second important difference is the ability to choose how to use the application, which appears immediately after clicking “Proceed”. There are four options here:

  1. Use BotBrew on the command line- in fact, an analogue of the installation in the style of a regular BotBrew.
  2. Use the dpkg/APT system - installation along with apt-get and Debian repositories. Recommended installation option.
  3. Run Python programs - analogous to the first option with automatic installation Python.
  4. Install a minimal Debian - minimalistic installation of Debian.
Let me explain the second and fourth points. The first BotBrew and the first item on this list does nothing more than install a minimalistic Linux system (consisting of just a few commands and libraries), within which the Linux software is launched. However, apt-get, unlike the minimalistic Opkg, requires a more or less complete Linux installation. Therefore, by selecting the second option, you will get a kind of micro-Linux on your smartphone. And if we can install a microversion, why not install a more or less full-fledged distribution. This is why there is a fourth point.

After the BotBrew Basil bootstrap, the same application installation management interface, familiar to us from the classic version of the application, will appear on the screen, and the botbrew2 command will appear in the system, with which you can launch the software. There are no significant differences in management here, except perhaps the apt-get command instead of opkg and the ability to connect additional repositories (including the first BotBrew repository) directly through the application installation interface.

Let's take matters into our own hands

Precompiled applications and pre-packaged repositories are great, but what if required application not available for installation? After all, even the same BotBrew Basil, which allows you to connect Debian repositories with a huge amount of software, due to its experimental nature will not work on every smartphone.

In this case, we can try to build the application ourselves. However, several difficulties await us here: the fact is that to build software for a smartphone, you will have to prepare the necessary cross-compilation tools, then take into account all the dependencies of the application being assembled, and, finally, in some cases, make the necessary changes to the code. These are all rather troublesome matters that are hardly worth wasting time on.

However, we can use the work of other people to automate the process of building software. One of the most developed and interesting solutions from this area is a set of SCRIPTSET scripts developed by user smitna from XDA Developers. It allows literally a couple of teams to assemble many of the most different applications, including htop, ImageMagick, iptables, ELinks, Screen, mc, node.js, Samba, strace, QEMU, Parted, SANE (it can be used to print directly to a printer from your phone!) and many others. The script itself will download the cross-compiler, all the necessary dependencies and applications, apply patches where necessary, and generate an archive ready for unpacking on the phone.

SCRIPTSET only works on Linux, but if you have Windows, you can install Ubuntu on virtual machine. Next, you should open a terminal and install the tools necessary to build the cross-compiler:

$ sudo apt-get install build-essential cmake autoconf2.13 scons
After this, you can get the SCRIPTSET itself and unpack it:

$ cd ~ $ wget http://goo.gl/zvnom -O scriptset-2.6.zip $ unzip scriptset-2.6.zip
As a result of unpacking, we will receive... another archive: scriptset-2.6.tar.bz2. But that's not all, the archive is packaged without the traditional root directory for tar, so you need to create it yourself. And already unpack into it:

$ mkdir scriptset $ cd scriptset $ tar -xjf ../scriptset-2.6.tar.bz2

After unpacking, several scripts, configs, as well as an impressively sized README file containing instructions for using the scripts will appear in the directory. The scripts do not have an execution bit (which is not surprising, given the previous problems), so you need to set it yourself:

$ chmod 755 *.sh

# vi ~/scriptset/configuration.conf // Directory for installing applications on the smartphone TARGET_SYSROOT="/data/sysroot" // Target processor TARGET_MARCH="armv7-a" TARGET_MTUNE="cortex-a9" TARGET_MFPU="neon" TARGET_MFLOAT=" softfp"

This will be enough to correctly build any application; The target processor will be a standard ARMv7 with an additional NEON instruction set. This is installed in any smartphone released over the last three to four years. The /data/sysroot directory will be used to install applications on the smartphone, however, oddly enough, it will also have to be created on the desktop machine:

$ sudo mkdir -p /data/sysroot $ sudo chown user:users /data/sysroot $ sudo chmod 777 /data/sysroot
As the author of the scripts explains, this action is necessary because the paths for key directories in some applications are sewn in at the build stage. Therefore, if we were to build an application using the current and any other directory as the root, it simply would not work on a smartphone due to differences in paths. I am sure that it would be more correct to solve this problem using chroot, but it is easier and faster to create the desired directory, and delete it when finished.

Next, we must indicate the list of applications that we plan to collect. To do this, open the package_selection.conf file and change no to yes in the necessary options. For example, to build bash, ImageMagick and Screen, you need to change the following three lines:

# vi ~/scriptset/package_selection.conf BASH=yes IMAGEMAGICK=yes SCREEN=yes
Keep in mind that the settings between the # ALWAYS NEEDED lines cannot be changed. These applications and libraries are always needed, and without them other applications simply cannot be built. Now you can compile the applications. To do this, just run the build.sh script without arguments:

$./build.sh
If all the necessary packages were installed and the compiler did not generate any errors during the build, as a result of the build two archives will appear in the current directory: cs-sysroot.tar.bz2 and android-mysysroot.tar.bz2. The first is the environment needed to run applications, created by the cross-compiler, and the second is the set of applications itself. Both of these archives must be transferred to the smartphone’s memory card, and then, running a terminal emulator on it or connecting via ADB, execute two commands:

$ tar xjf /sdcard/cs-sysroot.tar.bz2 $ tar xjf /sdcard/android-mysysroot.tar.bz2
As a result, the /data/sysroot directory will appear in the internal memory of the smartphone, in which applications will be located. They should be launched from the same terminal, indicating the full path. For example:

$ /data/sysroot/usr/bin/bash
Well, or after starting the terminal, add /data/sysroot/usr/bin to PATH:

$ export PATH="$PATH:/data/sysroot/usr/bin"

conclusions

Despite the rather serious differences between Android and a typical Linux distribution, installing Linux console applications on a smartphone is not that difficult. Unfortunately, o graphics applications there is no talk yet, but there are already projects for porting the Qt library and the Wayland graphic server to Android, and soon, I hope, we will get a working solution.


First published in Hacker magazine dated 08/2013.

November 12, 2011 at 03:17

Transmigration of the soul: linux on android tablet

  • *nix

Good day everyone.

My story begins with reading, after which I decided to purchase a miracle of Chinese tablet manufacturing: a superpad. This tablet was taken as a toy for “digging a little”, part-time, a reader, a game for pairs and a watch on a long journey... I’ll immediately note that I have two USB hard drives of 500 GB and 1TB, on which everything that is most important for a fun life is stored , and they are split into ntfs and ext4. And, naturally, the tablet does not see them.

Here's my volunteer

This is the first reason to dig deeper. After viewing 200 forum pages on xda-developers.com, certain

On at this stage All attempts to open this tablet were shelved. Until the glorious time for the student - the session. And since during the session students do absolutely everything, as long as they are not in the subject, the fun night gatherings on the Internet on obviously bourgeois sites have resumed. And the brilliant idea came to put on this tablet Orthodox linux, in my case - ubuntu.
What came out of this, see below.

It’s clear that you can’t just pick it up and install it... well, where did ours go...

We will need:

Let's look at the main stages android downloads and linux
1.Power on and boot ROM code execution Power on and boot ROM code execution
2. The boot loader The boot loader
3. The Linux kernel The Linux kernel
4. The init process The init process
5. Zygote and Dalvik console(bash, zsh...) / wm(kde, gnome...)
6. The system server Boot completed
7. Boot completed

As you can see, the differences start from the init execution stage.
It's the easiest thing to change.

I’ll write honestly, I thought that you could only use the Android init and that it was tightly screwed to the kernel. And even after receiving an example of a working ramdisk from another tablet, I didn’t think it would start...

ramdiska contents
bin dev etc home init init.rc lib linuxrc mnt newroot opt ​​proc root sbin sys tmp usr var
In /bin there is busybox, in /sbin there is switch_root with a link to it.
Init code from ramdisk from zt-180

#!/bin/sh echo Starting from initram image. Echo Waiting for SD-CARD wake up... sleep 3 echo "Mounting new rootfs" mount -t ext2 /dev/mmcblk0p2 /newroot && echo OK echo Hold on, switching root... exec switch_root /newroot /sbin/init echo hrm, have a shell instead exec /bin/ash

All that remains is to flash the ramdisk into memory (I used burntool under xp) and - voila, the boot stage. Yes, I flashed it instead of recovery, so for launch Linux You have to press the keys when starting.

So, the loading stage has been completed and you should be patient, since the console shows no signs of life, and everything loads quite slowly.

Setting up autologin for the first console
In /etc/init/tty1.conf, replace the last line with exec /bin/login -f Yor_Login< /dev/tty1 >/dev/tty1 2>&1 then in your ~/.bashrc you can write commands that will start during automatic login.
We are fighting the X-server
For me it definitely didn’t work well with the touchscreen, xorg.conf and xterm... I removed the synaptic driver and put the following in ~/.xinitrc:
#!/bin/bash # $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $ # /etc/X11/xinit/xinitrc # # global xinitrc file, used by all X sessions started by xinit (startx) # invoke global X session script #. /etc/X11/Xsession xclock -geometry 50x50-1+1 & exec xterm -geometry 80x66+0+0 -name login
Fighting the work environment
I wanted to install kde because I really like the graphics rendering with the qt library. I’ll say right away: yes, it installed and started, but HOW...
First, I immediately set up autologin:
in /etc/kde4/kdm/kdmrc we find and change the following to suit ourselves
AutoLoginEnable=true # If true, auto-login after logout. If false, auto-login is performed only # when a display session starts up. # Default is false #AutoLoginAgain=true # The delay in seconds before automatic login kicks in. # Default is 0 AutoLoginDelay=3 # The user to log in automatically. NEVER specify root! # Default is "" AutoLoginUser=Login # The password for the user to log in automatically. This is NOT required # unless the user is logged into a NIS or Kerberos domain. If you use this # option, you should "chmod 600 kdmrc" for obvious reasons. # Default is "" AutoLoginPass=Password
and, as written, we do chmod 600 kdmrc in the console under root, so that bad people don’t spy on our password.
Secondly, at the entrance the screen saver hung for a suspiciously long time, and I, having doubts, called startkde from the console. After a long and tedious display of all sorts of errors, the plasma finally loaded in netbook mode. Graphic effects turned off, since we are sitting under a framebuffer, and in some places there are wild slowdowns, but still this is kde and it has loaded!
Fine-tuning everything to suit you
Each has its own, I haven’t optimized it yet, but there is a lot to be done: speed up loading, optimize the workspace. I’m looking towards a more lightweight wm – e16 – but haven’t made it my main one yet. you also need to calibrate the touchscreen, fortunately virtual keyboard already available in kde.
I'm looking towards openbox +

Running Linux on Android is possible! And you don’t need a device with root rights for this: all the necessary software is available in the official Google Play store. In just 10–15 minutes you can get an operating system that differs from Android in advanced functionality.

Note: if you follow our instructions, Linux OS will be running in a virtual environment. Android will still be running in the background. To call such a system complete would be incorrect. Nevertheless, it copes well with a list of standard tasks.

Before installation, close all unnecessary applications and clear the RAM of your Android device.

1. From the Google Play Store, install GNURoot Debian and XServer XSDL.

2. Before you start installing Linux, make sure your device is connected to a stable Wi-Fi network. Launch GNURoot. The required environment packages will begin downloading.

Installation takes from 30 seconds to several minutes depending on the speed of your Internet connection. Ignore the tickers until the following message appears:

root@localhost:/#

For those familiar with the concept of “”, don’t let this line scare you: the application will not cause any harm to the device, since it works in a “sandbox”.

3. Enter the following command:

apt-get update

Wait until the packages are downloaded. This will be indicated by the line Reading package lists…Done.

4. Now enter another line:

apt-get upgrade

To the question “Do you want to continue?” enter the English letter Y and press Enter. The installation of packages will begin.

This time the installation procedure will take a little longer. Wait patiently for the installation to complete until the coveted line appears:

root@localhost:/#

The Debian Linux environment is installed, and now you can proceed to deploy the graphical shell.

5. Installation of all Linux distribution packages is performed with the following command:

apt-get install lxde

There is also an option to install the system kernel using the line:

apt-get install lxde-core

Confirm the installation by re-entering Y and pressing Enter. The package download process will begin.

During installation, make sure that all files have successfully downloaded, and that when unpacking, your device does not run out of free space. Otherwise, the system startup will fail.

6. To complete the installation of the operating system, you must download three additional utilities:

  • XTerm - to access the terminal from the Linux graphical shell;
  • Synaptic Package Manager - for managing apt packages and downloading applications;
  • Pulseaudio - for installing sound drivers.

All three utilities are installed using one GNURoot terminal command:

apt-get install xterm synaptic pulseaudio

About 260 MB of data will be downloaded to the device.

7. Now minimize the GNURoot application and open the previously installed XServer XSDL. Agree to download additional fonts. After the installation is complete, tap on the screen several times (the application will ask you to select the resolution and font size - it all depends on your preferences) until you see a splash screen with a blue background and white text.

Re-launch GNURoot and enter the following two commands one after the other:

export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712
startlxde &

The sequence for further restarting the system (when you want to open Linux again) looks like this: start XServer XSDL and wait for the blue screen to appear, open GNURoot and enter the two commands above, return to XServer XSDL.

If the terminal complains about an invalid command, return to step 5 of these instructions and try installing a bare kernel. Check the memory status of your Android device.

8. Now open XServer XSDL, wait a few seconds, and you'll have Linux ready to go.

To install applications, in the lower left corner, open the Start menu and select Run. Type Synaptic and press Enter.

In the window that opens, use the search and install the necessary applications. This could be the Firefox browser, the GIMP image editor, the Libre office suite, and other Linux-compatible programs.

Of course, this option for installing Linux cannot be called a full-fledged launch of the operating system on Android. Virtual Linux has several limitations, but if you use a wireless mouse and keyboard (possibly connecting with an OTG adapter and a USB hub), you can turn your smartphone or tablet into a laptop with the functionality of an adult OS.