Please make sure you read the full instructions before proceeding. Making mistakes can damage your device, but if you follow the instructions carefully, you will be fine. The installation will delete all data stored on your device. Please back up everything you might need in the future before installing. If you need help with the installation, you can ask members of the community on telegram, matrix or the forum.
You will need a PC running Linux, Windows or macOS to install Ubuntu Touch on your phone. Please select your operating system to continue.
You are running Linux.
You will need to install fastboot and adb to follow these instructions. On Ubuntu, this can be done by opening a terminal window and running the following command:
sudo apt install adb fastboot
It is recommended to create a new temporary directory for the installation, so you can easily delete the downloaded files after the installation. This should do the trick:
mkdir /tmp/ubuntutouchinstall
cd /tmp/ubuntutouchinstall
You are running Windows.
You will need to install the universal adb driver and set up adb and fastboot.
Create a new temporary folder for the installation and navigate your console there.
Download wget (a utility to download files from the command-line) and sha256sum (a command-line utility to confirm the integrity of downloaded files) into that directory.
You are running macOS.
Install adb and fastboot.
It is recommended to create a new temporary directory for the installation, so you can easily delete the downloaded files after the installation. Run this in a the terminal:
mkdir /tmp/ubuntutouchinstall
cd /tmp/ubuntutouchinstall
Download Ubuntu Touch
Run these commands to download all the Ubuntu Touch installation files and check their integrity.
wget http://cdimage.ubports.com/devices/recovery-frieza.img -O recovery.img && echo "374f184e2675f53651cf4790ee685ee363f59f2be98ea99a6d9d948bbc168c8b recovery.img" | sha256sum -c
mkdir pool gpg
wget https://system-image.ubports.com//pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz -O pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz && echo "84274fa597150533c8ea26a4a0e6737c2e5810cc752458ab53b596b79c941389 pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz" | sha256sum -c
wget https://system-image.ubports.com//pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc -O pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc && echo OK
wget https://system-image.ubports.com//pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz -O pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz && echo "ececb5be1a4c3f03d21d80c7cfa18807017a0ce4fa68446c93ca358796f196ac pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz" | sha256sum -c
wget https://system-image.ubports.com//pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc -O pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc && echo OK
wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz && echo "5b6e870acf8944330acb2a9dad6f5270bd06c377603a3115f805290e989ab421 pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz" | sha256sum -c
wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc && echo OK
wget https://system-image.ubports.com//ubports-touch/16.04/stable/frieza/version-9.tar.xz -O pool/version-9.tar.xz && echo "c08067c7be6a3b18027fe8ff8524d9460e4748924252b935aba77ce535081631 pool/version-9.tar.xz" | sha256sum -c
wget https://system-image.ubports.com//ubports-touch/16.04/stable/frieza/version-9.tar.xz.asc -O pool/version-9.tar.xz.asc && echo OK
wget https://system-image.ubports.com/gpg/image-signing.tar.xz -O gpg/image-signing.tar.xz && echo OK
wget https://system-image.ubports.com/gpg/image-signing.tar.xz.asc -O gpg/image-signing.tar.xz.asc && echo OK
wget https://system-image.ubports.com/gpg/image-master.tar.xz -O gpg/image-master.tar.xz && echo OK
wget https://system-image.ubports.com/gpg/image-master.tar.xz.asc -O gpg/image-master.tar.xz.asc && echo OK
wget http://cdimage.ubports.com/devices/recovery-frieza.img -O recovery.img && (echo 374f184e2675f53651cf4790ee685ee363f59f2be98ea99a6d9d948bbc168c8b *recovery.img && echo.) | sha256sum -c
mkdir pool gpg
wget https://system-image.ubports.com//pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz -O pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz && (echo "84274fa597150533c8ea26a4a0e6737c2e5810cc752458ab53b596b79c941389 *pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz" && echo.) | sha256sum -c
wget https://system-image.ubports.com//pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc -O pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc && echo OK
wget https://system-image.ubports.com//pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz -O pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz && (echo "ececb5be1a4c3f03d21d80c7cfa18807017a0ce4fa68446c93ca358796f196ac *pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz" && echo.) | sha256sum -c
wget https://system-image.ubports.com//pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc -O pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc && echo OK
wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz && (echo "5b6e870acf8944330acb2a9dad6f5270bd06c377603a3115f805290e989ab421 *pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz" && echo.) | sha256sum -c
wget https://system-image.ubports.com//pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc -O pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc && echo OK
wget https://system-image.ubports.com//ubports-touch/16.04/stable/frieza/version-9.tar.xz -O pool/version-9.tar.xz && (echo "c08067c7be6a3b18027fe8ff8524d9460e4748924252b935aba77ce535081631 *pool/version-9.tar.xz" && echo.) | sha256sum -c
wget https://system-image.ubports.com//ubports-touch/16.04/stable/frieza/version-9.tar.xz.asc -O pool/version-9.tar.xz.asc && echo OK
wget https://system-image.ubports.com/gpg/image-signing.tar.xz -O gpg/image-signing.tar.xz && echo OK
wget https://system-image.ubports.com/gpg/image-signing.tar.xz.asc -O gpg/image-signing.tar.xz.asc && echo OK
wget https://system-image.ubports.com/gpg/image-master.tar.xz -O gpg/image-master.tar.xz && echo OK
wget https://system-image.ubports.com/gpg/image-master.tar.xz.asc -O gpg/image-master.tar.xz.asc && echo OK
If all files downoaded successfully and the checks read "OK", you can continue with the installation.
Enable developer mode
Your device needs to be in developer mode to continue with the installation. What operating system is the device running right now?
Go to the settings menu, scroll down and select "About phone".Scroll down to the bottom again, where you see "Build number."Tap it seven (7) times. After the third tap, you'll see a dialog that says you're four taps away from being a developer. Keep on tapping until you see a dialog saying "You're now a developer"Now go back to the Settings menu and find "developer settings" (sometimes called "developer options"), Tap that.Enable the "USB debugging" option.Enable the "OEM unlock" option, if it's there. If not, that is not a problem.Open System Settings, go to About this Phone, and then Developer Mode.The adb service will be enabled if 'developer mode' is selected. Note that you must have some sort of lock screen security enabled (pin or password), and 'Developer mode' will be greyed out if that's not the case.The 'Lock Security' menu there can be used to set a pin or password.Connect your device to your computer and run the following command to see if the adb connection works:
adb devices
You should see something like this:
List of devices attached
0123456789ABCDEF device
If your device does not show up, disconnect your device and plug it back in again, or run the following command and try again:
adb kill-server
If your device shows up as unauthorized, confirm the authorization dialog on the device and try again.
Unlock the bootloader
First, you need to reboot your device to bootloader mode. Press and hold the volume up and power buttons until the phone reboots. Use the volume keys to select bootloader mode and confirm with the power button. Now, connect your phone to your computer and run the following commands to wipe the internal memory.
fastboot oem unlock
fastboot format cache
fastboot reboot-bootloader
If you want to erase the data on the device, run these commands:
fastboot format userdata
fastboot format system
Installation
fastboot flash recovery recovery.img
Now reboot the device to recovery mode. Press and hold the volume up and power buttons until the phone reboots. Use the volume keys to select recovery mode and confirm with the power button. Create a new text file with LF line-feeds called "commandfile" with the following content:
format system
load_keyring image-master.tar.xz image-master.tar.xz.asc
load_keyring image-signing.tar.xz image-signing.tar.xz.asc
mount system
update ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc
update device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc
update keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc
update version-9.tar.xz version-9.tar.xz.asc
unmount system
We will now send all the installation files to the device.
adb shell "mount -a" # You might see some errors from this command, that's ok.
adb shell "mkdir -p /cache/recovery"
adb push pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz /cache/recovery/
adb push pool/ubports-a1f443971032f2b6a03ed6f83d3340e026d59bfbe1625b259fb77eb05fa2b6a9.tar.xz.asc /cache/recovery/
adb push pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz /cache/recovery/
adb push pool/device-6e23e473ab0b5bd2baa820e442b41d22fe20d76f8ca984e2fb22bf47597a5eb0.tar.xz.asc /cache/recovery/
adb push pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz /cache/recovery/
adb push pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz.asc /cache/recovery/
adb push pool/version-9.tar.xz /cache/recovery/
adb push pool/version-9.tar.xz.asc /cache/recovery/
adb push gpg/image-signing.tar.xz /cache/recovery/
adb push gpg/image-signing.tar.xz.asc /cache/recovery/
adb push gpg/image-master.tar.xz /cache/recovery/
adb push gpg/image-master.tar.xz.asc /cache/recovery/
adb push commandfile /cache/recovery/ubuntu_command
Moment of truth!
Run this to start the installation process:
adb reboot recovery
Your device will now reboot and install the operating system. Enjoy exploring Ubuntu Touch!
If you want to help make Ubuntu Touch better, we would love to welcome you on our team of volunteers. Many different skills are needed, and wokring in a friendly open-source community can be a fun and engaging hobby. If you want, you can also support us financially to help cover the costs of developing Ubuntu Touch.
Thank you for being a part of this awesome journey!