...
https://docs.ubuntu.com/phone/en/devices/installing-ubuntu-for-devices#unlock-the-android-device
H2S Media article - Install Ubuntu Server on Android Phone without Root privileges
https://www.how2shout.com/how-to/how-to-install-ubuntu-linux-on-android-without-root.html
Are you looking for a way to install and run Ubuntu 18.04 Linux server on your Android Smartphone or tablet without rooting the phone? Then try UserLAnd.
Android, being a very popular operating system users are keep looking for a way to easily install different Linux distros on it. Hitherto, it was very tedious work to run Linux OS on Android but not anymore. With the help of UserLand, we can install Kali, Ubuntu, Arch Linux, Debian like distros on Android in a minimal form. It provides built-in Shell and VNC sessions for a graphical experience. UserLand developed by the team of GNURoot Debian App which was very popular before, as a replacement.
Here we will show the way to install and run Ubuntu 18.04 minimal server on Android phone without any kind of rooting process. It helps you to learn Linux directly on your phone without voiding the warranty.
Note: The below-given steps also work for Debian and Kali Linux available in UserLAnd App.
Install Ubuntu Linux on android without root
Step 1: Download UserLAnd App
This app is available on Google Play store, here is the link to download it. There is no complications in its installation just like any other, open Play store on phone either use the here given link or search for UserLAnd and when appears, tap to install it.
Step 2: Run UserLAnd to install Linux OS on Android
The moment, the app opens, you will see multiple Linux distros options along with their logos such as KALI Linux, Ubuntu, Alpine, Arch Linux, Debian along with lightweight Debian based Desktops with Xfce and Lxde desktop environment. It also has some Linux development, games and productivity apps. Well! here we are only about to focus on the process to run Ubuntu on Android. Tap on the Ubuntu icon.
Image Added
Step 3: Setup Username and Password for user and VNC
When you tap on the Ubuntu or any other Linux distros have given in UserLAnd, the first it will ask you to setup username, password and VNC password.
Type whatever you want and remember this will set as a standard user of your Android’s Ubuntu operating system. Once done, tap on the Continue option.
Image Added
Step 4: Download Ubuntu for Android
The next thing which we need to select that how we would like to connect installed Linux OS Ubuntu on Android with SSH or VNC. I would like to use SSh which is simple and from the inbuilt terminal of UserLAnd, I can easily control my Linux operating system. We will also show later in this article how to use RealVNC to connect the existing Ubuntu, KALI or any other OS available on this Android application.
After that, it will say the files of Ubuntu to download on Android are of 80MB and would like to download it without Wifi, tap continue if you want to download them on mobile data. It will take a few minutes to set up all depend upon your internet connection speed.
Image Added
Step 5: Login to Android running Ubuntu
After the installation, as we have selected the SSH in the beginning, a terminal window will open. Now here just like regular Ubuntu server enter the password you have created above for your Ubuntu image running on Android.
Image Added
Step 6: Update and Upgrade Ubuntu running on Android
Apart from the small screen and no init boot it is just like Windows 10 WSL, you will not feel any other differences on this Ubuntu Linux image, emulated on Android phone.
Thus, now we can use the keyboard to enter the command to our Linux. Let’s first update and upgrade all the packages of it. Run the following command
sudo apt-get update
sudo apt-get upgrade
Image Added
Step 7: Set the root password for Ubuntu
As we know by default there is no password for the root user, so to set that use the following command:
sudo passwd root
Enter Unix Password two times that you want to set and it will be done…
Step 8: Install Linux Desktop Environment LXDE
By default, the OS will have only a command line interface and to give it some Graphical user interface, we need to install it manually. Here we are installing lightwieght LXDE for Ubuntu Linux to run GUI on Android phone.
sudo apt-get install lxde
Step 9: Setup VNC to access Ubuntu via GUI interface
Note: Running Linux GUI for Ubuntu on Android is not recommended unless you have high-end smartphone becuase it is laggy and also crash sometimes.
Well! still for the sake of tutorial I am telling you how to access and view installed LXDE Desktop on Ubuntu on Android.
On UserLAnd Ubuntu command line shell execute the following commands:
We can use XSDL Android app to access GUI desktop for Ubuntu but that is laggy and that’s why decided not to use, instead RealVNC viewer.
sudo apt install tightvncserver
Note: While installing it will ask you to set up an authentication password.
sudo vncserver :1 -geometry 1920x1080
Note: I am installing it on OnePlus5 and it has Full HD resolution and in the above command use your resolution.
sudo export DISPLAY=:1
startlxde &
Step 10: Install the RealVNC Android App
In the above step, we already have set up the Linux VNC server on Ubuntu and now its time to download Android app here called RealVNC Viewer- Remote Desktop.
Step 11: Connect VNC to Ubuntu LXDE Desktop
On VNC viewer tap on the + icon to create a new connection. Enter 127.0.01:5901 and Name of your installed OS, in my case it was raj. Then tap on the Create option.
As our connection is not encrypted it will warn that; here ignore this and simply tap on OK.
Now in Authentication enter the password that you have created while installing TightVNC server above.
Image Added
Finally, you will see the LXDE Linux Desktop environment on Android for the Ubuntu which further installed UserLAnd app on Android.
Image Added Image Added
If you want to kill or stop the vncservice then use the below command:
sudo vncserver -kill
In this way, we can use this app to have Ubuntu for fun and experiment Linux on an Android phone or tablet.
DONE!!
Technorms article - Install Ubuntu on Android with Complete Linux Installer tool
...