# Install Ubuntu Touch

{% hint style="danger" %} <sub><mark style="color:red;">Disclaimer — Educational Use Only and Liability Limits<mark style="color:red;"></sub>

<sub><mark style="color:red;">The procedures and information in this article are for<mark style="color:red;"></sub> <sub><mark style="color:red;"> </sub><sub><mark style="color:red;">**educational purposes only**<mark style="color:red;"></sub><sub><mark style="color:red;">. They focus on personal study, experimentation, and improving technical skills. You<mark style="color:red;"></sub> <sub><mark style="color:red;"> </sub><sub><mark style="color:red;">**must not**<mark style="color:red;"></sub> <sub><mark style="color:red;"> </sub><sub><mark style="color:red;">use them for illegal, unauthorized, or harmful activities.<mark style="color:red;"></sub>

<sub><mark style="color:red;">Perform these operations only on devices you own, and make sure to back up all data first. Some steps, like unlocking the bootloader or flashing firmware, can void your warranty, lead to data loss, or make your device unusable.<mark style="color:red;"></sub>\ <sub><mark style="color:red;">I do not accept responsibility for any direct or indirect damages, data loss, security issues, or legal problems that result from following the instructions in this article.<mark style="color:red;"></sub>
{% endhint %}

<mark style="color:blue;">What is Ubuntu Touch?</mark>

**Ubuntu Touch** is an open-source mobile operating system created by **UBports**. Unlike Android, it emphasizes **privacy**, **security**, and **convergence**. This means the same device can work as a smartphone or a small Linux PC when connected to other equipment.\
When I first found out about Ubuntu Touch, I wanted to try it on my Redmi Note 7. I was curious to see if I could turn a basic smartphone into a portable Linux machine. I hoped to install tools like <kbd>nmap</kbd> or <kbd>metasploit</kbd> and carry a mini hacking and administration device in my pocket.

<mark style="color:blue;">**Checking Device Compatibility**</mark>

The first step was to check if my phone was supported. UBports maintains an official list of compatible devices:

<https://devices.ubuntu-touch.io/>

It’s always important to check compatibility. Every phone has different requirements. Not all Android devices can run Ubuntu Touch.

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2F6eYLxfQcBCgEyKYxUqUG%2Fimage.png?alt=media&#x26;token=c08778bf-4ac1-4327-9a07-0d483e27abab" alt="" width="231"><figcaption></figcaption></figure>

<mark style="color:blue;">**Unlocking the Bootloader**</mark>

Since my phone was originally running **MIUI**, I had to **unlock the bootloader**. Without this step, I cannot flash a custom system image. For Xiaomi devices, you can download the official unlock tool here:

For Xiaomi devices, the official unlock tool can be downloaded here:\
<https://en.miui.com/unlock/download_en.html>

After downloading and installing the tool, I followed the instructions, logged into my **Mi account**, and waited for approval. Once I received it, I connected my phone via USB and completed the unlock.

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2FI9Q9PuiwA3V3ymT27JNB%2Fimage.png?alt=media&#x26;token=b1a3a9dd-dd0e-4d68-9c40-af73dea33ee5" alt="" width="375"><figcaption></figcaption></figure>

<mark style="color:blue;">**Enabling Developer Options and USB Debugging**</mark>

Before using **fastboot**, I had to enable Developer Options:

1. Go to *Settings* → *About phone*
2. Tap **MIUI version** seven times to enable Developer Mode
3. In *Settings* → *Additional settings* → *Developer options*, enable both **USB debugging** and **OEM unlocking**

<mark style="color:blue;">**Entering Fastboot Mode**</mark>

To interact with the phone at a low level, I had to boot it into **Fastboot mode**:

1. Turn off the phone completely
2. Press and hold **Volume Down + Power** until the Fastboot screen appeared

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2F6efR2PWGozuMSiax3fA5%2Fimage.png?alt=media&#x26;token=a6a2474e-8661-468c-8582-1d2f52fb0a91" alt=""><figcaption></figcaption></figure>

The phone is now ready to communicate with your computer via `fastboot`. On the PC, open the command line and run:

```bash
fastboot devices
```

You should see your phone listed

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2F0rZt1DSXLjOyryFdM7jn%2Fimage.png?alt=media&#x26;token=f2d9bfe2-64fa-4c54-831b-3aa9a1ba2f29" alt=""><figcaption></figcaption></figure>

<mark style="color:blue;">**Installing Ubuntu Touch**</mark>

With everything ready, I used the **UBports Installer**, a desktop application that simplifies the flashing process.

1. Downloaded the installer from the UBports website
2. Connected my Redmi Note 7 via USB
3. The installer automatically detected the device
4. Confirmed the prompts and let it flash the required images

The process was mostly automated. I just had to keep the phone connected until it was complete.

![](https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2FYOTCrU0T0HpS9ykEHbXc%2Fimage.png?alt=media\&token=4418b0da-566f-4fa1-ad0d-2521c09721e2)

<mark style="color:blue;">**Becoming sudo on Ubuntu Touch**</mark>

Ubuntu Touch commonly mounts the root filesystem as **read-only**. Before making any changes that require elevated privileges, it helps to describe the default state and behavior of the system.

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2FTkiMtr1KupKpCCWNzv9D%2Fimage.png?alt=media&#x26;token=657856b3-6d6a-40fc-97b3-cdb82f0e611e" alt="" width="179"><figcaption></figcaption></figure>

If we want to install an application on Ubuntu Touch, we can use OpenStore (for example, I used it to install VNC Server and YouTube). However, for tools like Python, we need to use Libertine, which allows running Linux desktop applications in an isolated container on Ubuntu Touch

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2FsBDvXEVWv5izp3JknAnH%2Fimage.png?alt=media&#x26;token=42426d5e-8e98-40ba-a293-0585584eb259" alt=""><figcaption></figcaption></figure>

By default:

* The system runs a mobile-focused user interface with scoped apps and limited access to low-level system paths.
* The root filesystem is mounted `ro` (read-only), which prevents package installation and direct modification of system files.

Now that you know what Ubuntu Touch is in broad terms, we can proceed to mount the file system as rw (read-write).

```
# remount root as writable
sudo mount -o remount,rw /

# verify the change
mount | grep ' / '

# or
findmnt /
```

After this command, the root filesystem should show `rw` in the mount options.

**Install packages (examples)**

With the filesystem writable, update the package lists and install required tools. Availability depends on the specific Ubuntu Touch build and its repositories:

```
sudo apt update
sudo apt install nmap
```

Verify the installed tools:

```
nmap --version
```

<figure><img src="https://2833470610-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxEQmpwmdm3I8FZ925fn8%2Fuploads%2F8hUCAnWJnTpB6fcsej1i%2Fimage.png?alt=media&#x26;token=ae0f1685-9e1a-4b06-ba29-641f7e09faaf" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Warning: Modifying the root filesystem and installing packages can affect system stability and may not be supported on all Ubuntu Touch builds. Reverting these changes may require re-flashing the device.
{% endhint %}

<mark style="color:blue;">**My Experience**</mark>

The installation had some challenges, but I was able to get Ubuntu Touch running on my Redmi Note 7.

Having a full Linux environment on a smartphone is very practical. This project was useful to understand more about:

* Android internals
* Bootloaders
* Fastboot
* Linux mobile development

For anyone interested, I recommend trying it carefully. Make sure your device is supported, follow the instructions step by step, and always keep a backup.
