Installing Linux instead of Android. Launching full OS on Android

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 will suggest a solution - a convenient way to install and run almost any Linux software on Android.

Linux or not Linux?

As you know, Android is based on the 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 of the standard library libc and others in Android, 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.

The Android security system, which cuts off application privileges to the fullest and does not allow them to go beyond their own directory, also seriously impedes 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, to complete the picture, 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 its 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 the Android system to accept applications that are foreign to it. Essentially, the system consists of four components:
  • a repository with precompiled 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 the internal memory of the smartphone or on the 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 the console package manager 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 various 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 have 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 like that. 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 creating additional users and changing their settings, this can be done in the same way as on 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 (you can’t confuse it 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 called BotBrew Basil in the market, which is marked as experimental. In essence, this is still the same BotBrew, but with one very important difference. Instead of its own repositories and 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 - essentially an analogue of installation in the style of regular BotBrew.
  2. Use the dpkg/APT system - installation along with apt-get and Debian repositories. Recommended installation option.
  3. Run Python programs is an analogue of the first option with automatic installation of 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 repositories with ready-made packages are great, but what if the application you need is 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 in this area is a set of SCRIPTSET scripts, developed by user smitna from XDA Developers. It allows you to literally assemble a wide variety of applications in just a couple of commands, including htop, ImageMagick, iptables, ELinks, Screen, mc, node.js, Samba, strace, QEMU, Parted, SANE (it can be used for direct printing to a printer with 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 in a 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 get... 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, there is no talk of graphical applications yet, but there are already projects for porting the Qt library and the Wayland graphical server to Android, and soon, I hope, we will get a working solution.


First published in Hacker magazine, 08/2013.

Ubuntu Touch - also known as Ubuntu for Android devices or Ubuntu Phone - is a mobile operating system that is currently in beta. However, if you have a supported Android device, you can install Ubuntu on Android right now.

You can see the list of supported Android devices for installing Ubuntu at this link.

Preparation

First of all, this guide is not for novice users. You need to know how to use the Ubuntu command line. You should also be prepared to use beta software, which does not guarantee stable operation.

While installing Ubuntu on Android, your device's internal memory will be cleared. Thus, you will lose applications, photos, contacts and other files.

Secondly, we will use the desktop version of Ubuntu to install Ubuntu mobile on Android. Therefore, you will need a laptop or PC running Ubuntu.

How to install Ubuntu on Android

Step 1:

Make sure that you have added it on your Ubuntu computer. repositoryUniverse. This is software that is probably commented out. You need to remove the # at the beginning of the lines in the following file : /etc/apt/sources.list. More details at this link.

Step 2:(you can skip this step if you are running on 14.04 since the tools are already included).

You will need Phablet Tools PPA in order to install Ubuntu for Android.

  1. Click Ctrl + Alt + T on your computer to open a terminal (command prompt).
  2. Add the Phablet Tools PPA by typing the following command: sudo add- apt- repository ppa: phablet- team/ tools
  3. On Ubuntu 12.04, add the Ubuntu SDK Release PPA by typing the following command: sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
  4. Update your system to use the latest packages. To update use the following command: sudo apt-get update
  5. Install the ubuntu-device-flash package by typing the following command: sudo apt- get install ubuntu- device- flash
  6. For help with the ubuntu-device-flash tool, use the following command: man ubuntu- device- flash
  7. Write the letter q, to leave.

Step 3:

  1. Install phablet-tools by typing the command: sudo apt-get install phablet-tools
  2. Sort the tools by typing the command: dpkg -L phablet-tools | grep bin

Step 4:

Next, you need to enable developer mode on your Android device. To do this, go to Settings – About phone, then tap on the “Build number” line seven times. You will see a pop-up message that you have become a developer.

You now have a new section in Settings called “For Developers”. Go to this section and activate the option " Debugging byUSB».

USB debugging allows you to send commands to a mobile device from the command line on your computer via a USB cable.

Step 5:

Connect your Android device using a USB cable to your Ubuntu computer. In order to check the connection with your smartphone, write in the command line: adbdevices

Your device should appear on the screen with a series of numbers and letters. If the device is not displayed, try typing: adb kill- server

Step 6:

To install Ubuntu on Android, you need to unlock the bootloader.


Step 8:

  1. Turn off your device using the Power button.
  2. Reboot into Bootloader mode using a combination of physical buttons. For example, a combination for Nexus 5: Volume Down button, Volume Up button and Power button. Search the Internet for the button combination for your device.
  3. Install Ubuntu by typing the following command: ubuntu-device-flash —channel=devel —bootstrap
  4. The installation should happen automatically without any action on your part. It will take some time.
  5. After rebooting, your mobile device will be running on the Ubuntu operating system.

Step 9:

After installing Ubuntu on Android, you can go to Settings > Updates and choose whether updates will be installed automatically or manually.

As you can see, installing Ubuntu on Android is not that difficult, but it requires some knowledge and a computer running Ubuntu.

Detailed instructions for turning any Android device 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 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:/#

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:/#

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 been 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

Approximately 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.

Linux Deploy. This is an open source application designed to automate the process of installing, configuring and running GNU/Linux distributions on the Android platform inside a chroot container. The application creates a disk image on a memory card or other media, mounts it and installs the selected Linux distribution there. Installation into a file, directly onto a memory card partition, into a directory with the ext2/ext3/ext4 file system and into RAM is supported. Applications from a Linux distribution run in a chroot environment, run in parallel with the main system and are comparable in speed. All changes made to the device are reversible, i.e. The application and the components it created can be completely uninstalled.

Installation of the Linux distribution is carried out over the network from official mirrors on the Internet. Since Linux Deploy is based on a system call to the Linux kernel, only Linux distributions can act as “guest” systems. Through the program interface, you can control the installation process of the Linux distribution, and after installation, you can start and stop the services of the installed system (there is support for launching your own scripts). The installation process is displayed as text reports in the main application window. During installation, the program itself configures the working environment, which includes the base system, SSH server, VNC server and a graphical environment to choose from. You can also manage the parameters of SSH and VNC servers through the program interface.

Installing a Linux distribution takes about 30 minutes. The recommended minimum disk image size without a GUI is 512 MB, and with a GUI - 1024 MB (for LXDE). After the initial installation, the password for access via SSH and VNC is assigned as “changeme”, which can be changed using standard distribution tools, or through application settings.

Characteristics:

  • Supported distributions: Debian, Ubuntu, Kali Linux, Arch Linux, Fedora, CentOS, Gentoo, openSUSE, Slackware, RootFS (tgz, tbz2, txz)
  • Installation type: file, partition, RAM, directory
  • Supported file systems: ext2, ext3, ext4
  • Supported architectures: ARM, ARM64, x86, x86_64, architecture emulation mode (ARM<->x86)
  • Methods of connecting to the container: CLI, SSH, VNC, X server, framebuffer
  • Management interfaces (CLI): Android terminal (or adb), telnet, web interface (terminal via browser)
  • Desktop environment: XTerm, LXDE, Xfce, MATE, other (manual setup)
  • Supported languages: multi-language interface

ATTENTION!

This program comes WITHOUT ANY WARRANTY, and the author is not responsible for any possible consequences of its use. This is free software and you can redistribute it under the terms of the GPLv3 license.

GNU/LINUX INSTALLATION INSTRUCTIONS

  1. Connect WiFi or another network with Internet access. Installation is carried out over a network and will not work without Internet access.
  2. Make sure your device has received superuser rights (root). Install the latest version of Linux Deploy and run it.
  3. When you first launch the application, the update of the working environment is automatically launched, which is a directory containing all the necessary scripts, settings and container profiles. Working environment settings can be viewed in the " Settings -> Working environment". The environment directory should not be changed unless there is a reason to do so. It is useful to leave the option " enabled. Settings -> Keep the screen on" ("Settings -> Screen Lock"), while the application is active, the screen, WiFi and processor will not go into sleep mode.
  4. The program supports working with several profiles, where the parameters of each GNU/Linux instance are stored. You can quickly switch between instances through the profile management window (opens by clicking on the icon in the main window header). By default, a profile is created with the name "linux". Go to the settings of the current profile (the far right button) and configure the necessary options for installing and running the GNU/Linux distribution ( see parameter description).
  5. Linux Deploy 2.x does not require installation on the BusyBox system, but in rare cases you may need to use the system BusyBox. To do this, install ®BusyBox compatible. In the BusyBox parameters, before installation, you must select the option " Replace applets". Then in the settings of the Linux Deploy working environment you need to specify the path to the system BusyBox in the " field Settings -> PATH variable" ("Settings -> PATH variable"), For example, /system/xbin, and start updating the working environment" Settings -> Update environment" ("Settings -> Update ENV").
  6. Run the installation of the selected distribution: " Menu -> Install" ("Menu -> Install"). The installation log is displayed in the main application window. Installation takes about 30 minutes on average. The image creation stage can take a long time (about 15 minutes) if the size is more than 2 GB.
  7. If the installation is completed without errors, you can start the Linux system with the " START" ("START"). This will launch the services specified in the parameters - SSH, VNC and others.
  8. To access the console of a Linux system via SSH, you must install ConnectBot (or another SSH client). To access the Linux desktop, you must install an X server, such as XServer XSDL. In the settings you should specify the IP of the device to connect, for the same device - 127.0.0.1. The password for SSH and VNC is specified in the container parameters. You can change the current user's password from the console using the passwd command. To run programs as root, use the sudo command (for example, sudo synaptic). By default, the root user (unless specified as a username in the settings) does not have a password, but you can set a password for it with the command sudo passwd root.
  9. To stop the Linux system, all services running under it and unmount the disks, just press the button " STOP" ("STOP").
  10. Linux Deploy allows you to manage containers via CLI (Command Line Interface). To access the CLI, you can use telnet or a web browser, having previously activated the appropriate management interfaces in the settings.
  11. To reduce the time for installing the base system or in case of problems with installing the system from official repositories, you can import a container from a pre-prepared archive. For this, there is a repository of containers created using Linux Deploy and available through the application interface in the " Repository" ("Repository"). Just select the desired container in the repository interface and click the " Import" ("Import"). After this, a new profile will be created in the application, the parameters of which can be changed if necessary. Then you just need to run the installation " Menu -> Install" ("Menu -> Install"), the installation path will be prepared (an image for the container will be created), the container archive will be downloaded, unpacked and configured. After completing the procedure, you can start the container with the " START" ("START").

PROGRAM UPDATE

After updating the program, the working environment is automatically updated. If necessary, the update can be started manually: " Settings -> Update environment" ("Settings -> Update ENV"). Program (environment) updates do not affect an already installed GNU/Linux system, i.e. the installed system cannot be damaged or changed in any way due to an update.
To change the settings of an already installed system or to return the settings to the original ones, you need to perform the configuration: " Menu -> Configure" ("Menu -> Configure"). If some components are selected in the parameters, then the configuration will install packages for the selected components.

UNINSTALLING A PROGRAM

Before uninstalling the program, you need to stop the GNU/Linux distribution using the button STOP, if you cannot stop the distribution, it is recommended to reboot the device. After that, run the command " Settings -> Delete environment" ("Settings -> Remove ENV"). After this, you can delete the application. Deleting an application with an unmounted container is dangerous; deleting an application version lower than 1.5.3 also deletes all data from all partitions mounted in the container! There may also be .img files that are created on the memory card when installing distributions , such files can be deleted manually through any file manager.

Download the application to install Linux on Android - Linux Deploy on Android you can follow the link below.

Hello, I have a mini PC ug 802, how can I install Linux on it? teltar

This is a very interesting topic for me, friends, since I professionally administer Linux servers. On servers it’s interesting, but for me it’s already everyday and ordinary. But installing Linux distributions on devices with ARM architecture is an order of magnitude more interesting.

What is the difference between a computer and a smartphone or tablet?

In fact, conceptually, the difference is small - both mobile and desktop devices, or even servers, are made according to the same principles. However, for mobile devices a different processor architecture is used. Desktop CPUs are designed on x86 or amd64 architectures. And most mobile devices have a processor based on ARM architecture. Historically, this is due to the fact that such processors have significantly lower power consumption, which is a vital necessity for mobile devices.

What OS can be installed on mobile devices?

So, all programs, including the operating system, must be developed specifically for this architecture in order to work on this hardware. Therefore, regular versions of Linux installed on desktops or servers will not work here. Fortunately, there are many distributions and versions for this architecture. Starting with the notorious Android, which most smartphones are equipped with, and ending with exotic distributions, like the specialized Backtrack (now Kali Linux). But of greater interest, of course, are some more well-known distributions.

What is Android?

Android is an operating system Linux based, developed by Google for mobile devices. The world's most popular mobile operating system. It should be understood that in fact LInux is just the kernel of the operating system. And many operating systems are built on its basis, and Android is just one of them.

The kernel is the basic functionality that allows you to use all devices and options of the hardware platform - that is, drivers and device management. The kernel also includes some basic programs and command line utilities. The fact is that in the Linux family (this is the meaning most often meant - a family of operating systems based on this kernel, and not the kernel itself) - the graphical shell is a separate part, its own level of abstraction.

And the minimum configuration of these OSs is precisely without a graphical shell, just a text command line interface. This allows these OSes to be embedded in the most unusual places. For example, in network equipment, machine tools, computers and other complex devices, for example in airplanes and cars. Even your washing machine and microwave can have something similar installed :)

This is an Android device. Accordingly, Android should be installed by default. Which, in fact, is Linux. But with some serious restrictions. Installing some other Linux can significantly expand the capabilities of a mobile device. The possibilities of use become virtually limitless. Well, imagine using a mobile phone as a server! Many tools are becoming available. If it's a tablet, by connecting peripheral devices to it via an OTG cable, you can use it as a full-fledged computer! For what? That's another question. I hope our reader will share his ideas in the comments.

How to install Linux on an android device?

So, installation.

There are two options - you can do a full-fledged installation, as they say, on hardware. This is actually a flashing of the device. At the same time, we lose the native functionality of the device provided by the manufacturer. And this may not be at all what we wanted. For example, the UG 802 mini-computer, which our reader is interested in, is a device designed to expand the functionality of televisions. Because it can be inserted directly into the HDMI port of any TV, turning it into Smart.

Luckily, there is a second way to install Linux - right inside the device's main operating system, in this case Android. This allows you to run a so-called chroot environment inside Android. In this case, you will receive two related operating systems running in parallel on one core - Android. And you can switch between them.

This approach is convenient for smartphones and tablets, but may not be suitable for the UG 802. In this case, you may need to flash the required operating system. And this is already some risk that the device can be damaged.

Unfortunately, I have no experience with such experiments. But there is enough information on the Internet about this. Study, try to install.

Therefore, I will provide a few links from which you can begin your acquaintance with the world of mobile device hacking :)

Who are hackers?

Yes, yes, don’t be surprised, this is exactly hacking - non-standard interference in the operation and design of systems and programs, changing them and expanding functionality. This is precisely the original meaning of this word. And a hacker is not a cracker or a virus writer, as most people are used to thinking. This is first and foremost a researcher. Yes, he breaks systems, reveals what was not intended to be opened, but he does this with the goal of learning, not harm.

https://xakep.ru/2012/10/22/android-tablet-linux-install/ - an article about installing Linux on smartphones in the oldest magazine, which is precisely a reflection of the essence of hacking.

https://habrahabr.ru/post/221543/ - Habr, an equally old and even more famous resource. And the article here is fresh, and describes in great detail the experience of installing Arch Linux on top of Android, in the form of a chroot environment.

https://geektimes.ru/post/44220/ - Giktimes - a site from the creators of Habr, and on it there was a detailed manual for installing Debian over Android on a smartphone. The article, although very old, touches on fundamental things that need to be understood before embarking on such an operation. Even if this does not help you establish, it will help you gain knowledge, without which further development of the topic and solution to the problem is impossible. And after studying such articles, you will feel more confident and will be able to search for information on the topic more specifically, on specific issues that will need to be addressed during installation.

For example, these articles on the topic are probably not the only ones on the above-mentioned sites. You can always try to look for more articles about this on such specialized resources. I found and looked at a couple of topics about installing Linux on mobile devices on 4pda.ru like this, For example

That's all for today. But it may always happen that I want to continue the banquet of this topic :)

If problems arise (and they will arise with a 99% probability :)), you can also ask questions here, we will collect information, solve problems together, I am also very interested in this.