How to flash Meizu MX4, bq E4.5 and Nexus 4 with Ubuntu Phone

My tutos about how to flash bq E4.5, Meizu MX4 and Nexus 4.

Why? You can change to stable or RC proposed images. Replace any ‘stable’ by ‘rc-proposed’ in this tuto if you want to try the proposed images.

You'll erase any data in your phones.

What will you need in your Ubuntu Desktop?

These packages:
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-device-flash
sudo apt-get install phablet-tools

What will you need in your phone?

Unlock the bootloader. Any Ubuntu Phone has that boot unlocked.

USB in developer mode. Then, you should see your phone from PC:
costales@dev:~$ adb devices
List of devices attached 
0065f7f61916b80b    device
costales@dev:~$

Then, reboot the phone into that bootloader:
costales@dev:~$ adb reboot bootloader
costales@dev:~$

Flash Nexus 4

I flashed my Nexus 4 from Android to Ubuntu Touch.
Do you see the device into the bootloader mode?

Unlock OEM:
costales@dev:~$ sudo fastboot oem unlock
[sudo] password for costales: 

OKAY [ 14.160s]
finished. total time: 14.160s
costales@dev:~$

Flash phone:
ubuntu-device-flash touch –channel=ubuntu-touch/stable/ubuntu –bootstrap

Flash bq E4.5

You'll need a recovery image (source):

cd ~

wget https://people.canonical.com/~jhm/barajas/recovery.img

Flash phone:

ubuntu-device-flash touch –channel=ubuntu-touch/stable/bq-aquaris.en –bootstrap –recovery-image ~/recovery.img

Flash Meizu MX4

You'll need a recovery image (source):

cd ~

wget https://people.canonical.com/~alextu/tangxi/recovery/recovery.img

Flash phone:

ubuntu-device-flash touch --channel=ubuntu-touch/stable/meizu.en –bootstrap –recovery-image ~/recovery.img