The tool 'ubuntu-device-flash' can be used to update the software on an ubuntu phone manually. It can be used to change the device to a different 'channel' of updates and also perform a reset of the storage.

However, when I tried it with either the BQ Aquaris E4.5 Ubuntu Edition or Aquaris E5 Ubuntu Edition, it didn't seem to work, for example:

ubuntu-device-flash touch --channel ubuntu-touch/stable/bq-aquaris.en --bootstrap

Would be expected to wipe the device to factory state. However, it does not seem to succeed:

2015/03/27 13:58:35 Expecting the device to be in the bootloader... waiting
2015/03/27 13:58:50 Device is |krillin|
2015/03/27 13:58:50 Flashing version 20 from ubuntu-touch/stable/bq-aquaris.en channel and server https://system-image.ubuntu.com to device krillin
Failed to enter Recovery

For production Ubuntu Phone devices, adb has been disabled in recovery, and this affects ubuntu-device-flash operation.

You must supply a recovery image with adb enabled, which ubuntu-device-flash will use temporarily while doing its work:

ubuntu-device-flash can then be supplied with the --recovery-image argument, eg:

ubuntu-device-flash touch --channel ubuntu-touch/stable/bq-aquaris.en --bootstrap --recovery-image path/to/downloaded/recovery.img

Note that when the command prompts you with:

Expecting the device to be in the bootloader... waiting

You can put a Aquaris E4.5 and Aquaris E5 in the 'bootloader' by holding down Power + Volume Up for a few seconds, releasing the Power button when the red LED lights as the machine reboots, and then selecting 'fastboot' from the device's boot menu.

unknown flag `recovery-image'

If you get this error, that means you are still using an older version of ubuntu-device-flash. Please install the latest version using the ppa

sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update; sudo apt-get upgrade
  • Very helpful. How long did the transfer to device after booting recovery take? – Mark Mar 27 '15 at 17:56
  • A few minutes. I'll try to remember to time it someday. – John McAleely Mar 27 '15 at 19:10
  • I learned that it is possible for ADB to hang during the recovery step where files are pushed to the device for installation. If this happens you will be stuck waiting for files to push with no failure indicator. You will also have trouble using adb shell to connect to the device. You can resume the push of downloaded files by booting to recovery again and doing ubuntu-device-flash -v touch --channel=ubuntu-touch/stable/bq-aquaris.en --device=krillin. If you do adb shell and monitor /cache/recovery/ you can watch the progress of the file transfer. – Mark Mar 30 '15 at 8:59
  • Another comment worth noting is that (as this comment is written) the ubuntu-device-flash in the archives is stale, and does not support --recovery-image. the version in the phablet-tools ppa (here: developer.ubuntu.com/en/start/ubuntu-for-devices/…) must be used. – John McAleely Apr 2 '15 at 21:35
  • If your handset works well enough to reboot to recovery, you can also do this from the handset itself: askubuntu.com/questions/609938/… However, you won't reset any changes you've made to the system partition. – John McAleely Apr 16 '15 at 9:57

Another reason for failure to enter recovery might be unsufficient privileges for the usb device of the ubuntu computer.

I tried John's flash command but still got a "Failed to enter Recovery" error. The solution came to me when I booted the device into fastboot mode, flashed the recovery image with the fastboot command and booted this image. Unless I had a file "/etc/udev/rules.d/80-persistent-usb.rules" with the contents:

SUBSYSTEM=="usb", ACTION=="add", SYSFS{idVendor}=="2a47", MODE="0666", SYSFS{idProduct}=="*"

on my ubunutu computer I was not able to access the device running the recovery kernel.

After I added this file, I could "adb shell" and enter the recovery system. And also after that change, John's command worked as expected. My ubuntu computer runs a somewhat modified Linux but based on ubuntu 14.04.

  • This file/rule is created by several packages, so if you get MTP (ie nautilus file browsing) of your device working, then this rule will be in place. Of course, if trying this is the first time you've attempted to use your device with ubuntu, then adding this rule will be needed somehow. – John McAleely Aug 11 '15 at 16:22

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.