The first phones with Ubuntu Phone will finally be a reality today, but precisely because many of us have just arrived we will not have a device that runs the standard operating system like the ones presented today. However, what we can do as long as we have a compatible Android terminal is install a ROM of the system in them.
With this guide that we are going to offer you today you will be able to install Ubuntu Phone on your Android, but before doing so we recommend several things: Consult the list of officially supported devicesThat of community supported devices, follow the steps that we are going to indicate you well, have backup copies of everything and be very clear about what you are doing.
First of all, it should be clear that the guide that we are going to give you is designed specifically to install the ROM in devices that have official support. If you do not have one of those devices, the corresponding guide for it should appear in the list of terminals that are supported by the community.
Another thing you should know is that installing Ubuntu Phone will entail the loss of data from your terminal, but for that later we will give you the tools to make backup copies of everything you have in the terminal using ADB commands.
Table of Contents
Prepare the desktop
First of all we have to make sure that we have the Universe repository activated, since the package that we will have to install is contained in it. Once we have done it, we will first have to add the Ubuntu SDK PPA. We open a terminal and add the following:
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
Now, update the list of repositories:
sudo apt-get update
The next thing we have to do is install the package
ubuntu-device-flash. To do this in a terminal we execute this command:
sudo apt-get install ubuntu-device-flash
To know better what we can do with this package we can always go to the man page, by typing the following in the terminal:
The next is install the package
phablet-tools. For this we resort again to the terminal:
sudo apt-get install phablet-tools
We can get a list of included tools in it with this command:
dpkg -L phablet-tools | grep bin
We can get tool help from this package with the modifier
-h, for example:
phablet-config -h usage: phablet-config [-h] [-s SERIAL] ... Set up different configuration options on a device [...]
ADB and Fastboot considerations
When installing the package
ubuntu-device-flash two tools are added which we are going to use a lot in this guide: ADB and Fastboot. ADB is a bridge between the terminal and the computer that allows us to act on it through a terminal when it is fully booted, and Fastboot offers a USB connection when the device is booted from the bootloader.
We recommend take a look at the help pages of these two elements using these two commands to get out of doubt as much as possible:
adb help 2>&1 | less fastboot help 2>&1 | less
Saving Android backups
Esto it can be done in two ways: If you already have the bootloader unlocked and a custom recovery installed you can always make a backup via the recovery which you could later restore in the same way. If you don't have any recovery tool installed, you will first have to go to Android Settings to activate development mode.
For this and if you have never done it, you will have to go to section About of the phone and press the build number repeatedly until a message similar to !! Congratulations!! You are already a developer!. Then the development options will appear, and there you can activate the USB debugging mode.
When you have it activated you can connect via USB cable that will help us to build the ADB bridge. You can check that the connection was successful using a command in the terminal that should return something like this:
adb devices List of devices attached 025d138e2f521413 device
Once we have done this, then we can proceed to save a backup copy on our desktop of everything that is included in our Android terminal, which we can then use to restore our terminal in case Ubuntu Phone does not convince us. Here you have a method to restore Android provided by Canonical, but we will try to dedicate another guide to it at a later time.
To create the backup we have to run the following command In the terminal:
adb backup -apk -shared -all
A message as the backup is going to be created on our phone and it will ask us if we want to authorize it. We say yes.
Unlocking the bootloader
To install any ROM, be it this one from Ubuntu or a custom one from Android like CyanogenMod, it is this item needs to be unlocked. To do this from the terminal we first have to restart the device in the bootloader. For this we use the following command:
adb reboot bootloader
We will know that we are in the bootloader when we see an image of a android lying on its back with its front panel open. After this we check again that the device is well connected, and if everything goes well we should see an output like this:
fastboot devices 025d138e2f521413 fastboot
The next thing is to use a command to unlock the bootloader per se:
sudo fastboot oem unlock
A screen of terms and conditions will appear that we must accept to continue. It is important to know that if we unlock the bootloader we will lose the warranty of the phone. After this we will restart again in Android, we will have lost our data and we will have to enter the minimum information so that the first boot is completed, since when we install Ubuntu all that data will be lost again.
Installing Ubuntu Phone
To install Ubuntu Phone first we will have to turn off the device. Once we have done it, we will have to restart by pressing the correct key combination to do it in mode fastboot. Since we are using the method for officially supported devices, we can fall back on the guide published by Google to do it the right way.
The next thing is to install the ROM, for what you have to choose a channel. Assuming, for example, we are using a Nexus 7 for our installation, we can use the channel devel. For this we would have to enter the command in the terminal
ubuntu-device-flash, and the output that we would have to obtain would be something like this:
ubuntu-device-flash --channel=devel --bootstrap 2014/04/16 10:19:26 Device is |flo| 2014/04/16 10:19:27 Flashing version 296 from devel channel and server https://system-image.ubuntu.com to device flo 2014/04/16 10:19:27 ubuntu-touch/trusty is a channel alias to devel [...]
As for which channel to choose, Canonical has posted a channel choice guide according to our device, since it is the way we have to identify the images. This guide can be consulted through the Ubuntu developer website.
When the installation is finished the phone will restart, and before doing anything you must wait for reboot is complete. In most cases, no user interaction is required, and we note that it may take a few minutes. As for system updates, notifications of their availability should arrive automatically.
And so far our guide to install Ubuntu Phone on an Android phone. We take this opportunity to emphasize that with this installation method we will remove the Android ROM completely; it is not a dual boot. To perform an installation with dual boot we will develop another guide that we will also publish in Ubunlog.
For, get extended information Regarding the installation of the system you can go to the guide published by Canonical.