# How to get Ubuntu Touch recovery to boot into Ubuntu Touch on Nexus 4?

The device is a Nexus 4, currently running Android 4.4.4, though I have tried with 5.0.1. I am using the instructions at http://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/ to install Ubuntu Touch (devel channel) on a Nexus 4, single-boot. Everything works as expected up to the point where I run

\$ ubuntu-device-flash --channel=devel --bootstrap
DEPRECATED: Implicit 'touch' subcommand assumed
2015/02/06 15:14:06 Expecting the device to be in the bootloader... waiting
2015/02/06 15:14:06 Device is |mako|
2015/02/06 15:14:06 Flashing version 1 from devel channel and server https://system-image.ubuntu.com to device mako
3.67 MB / 3.67 MB [=======================================================] 100.00 % 1.34 MB/s
44.77 MB / 44.77 MB [=====================================================] 100.00 % 1.83 MB/s
321.82 MB / 321.82 MB [===================================================] 100.00 % 1.15 MB/s
/home/scottwh2/.cache/ubuntuimages/gpg/image-master.tar.xz
/home/scottwh2/.cache/ubuntuimages/ubuntu-touch/devel/mako/version-1.tar.xz
/home/scottwh2/.cache/ubuntuimages/gpg/image-signing.tar.xz
/home/scottwh2/.cache/ubuntuimages/pool/custom-0cd62f8fd0eeb9e14b0e8196976713c9412aaec7681983c0026b03fb22634427.tar.xz
/home/scottwh2/.cache/ubuntuimages/pool/device-ebfaafbb87bfe818c544d95293182a10a0c33c89794e74ccbfd66c8168e8a7ff.tar.xz
Failed to enter Recovery


Rather than rebooting as the instructions say it should, the device stays on a Recovery screen. At the top of the screen I have:

Ubuntu Touch (CWM-based) Recovery v6.0.4.6

• reboot system now
• wipe date/factory reset
• wipe cache partition
• backup and restore

• reboot recovery
• power off
• +++++Go Back+++++

It's not frozen - the up and down volume keys and the power button work to select from the menu. The problem is that no menu item leads it to boot in to Ubuntu. It will boot back in to Android, to the bootloader screen or to this recovery screen, but there's nothing I can select to load Ubuntu.

Any hints as to how to get around this blocker?

After a first initial run with the --bootstrap parameter, you need to run again without that parameter.

(using the option reboot recovery may do the same, the ubuntu partition is flashed to the device by booting into the recovery that is created with the first run of the command)

Select reboot system now. It should boot into ubuntu as you installed only ubuntu. CWM recovery is used by ubuntu touch for installing ubuntu touch.

• As I mentioned, it will only boot back to Android if I use "reboot system now". – scottwh2 Mar 16 '15 at 22:57
• @scottwh2 i am stuck in the same situation, were you able to get around this blocker? – null pointer Feb 17 '16 at 10:36
• No - eventually I gave up and just bought a phone with Ubuntu on it. – scottwh2 Feb 18 '16 at 17:55

Are you using a virtual machine. I had this issue last night trying to push Ubuntu, and am posting this answer here in case anyone else runs into this issue.

I was using virtualbox to install Ubuntu to Nexus 4 mako. If you follow all of the instructions, you should be connecting USB to your virtual machine. Whenever you first push Ubuntu with the --bootloader parameter it actually changes how windows recognizes the phone. Once it gets to the menu where you can select restart and has the Ubuntu background, simply reconnect the device to the virtual machine, it will work.

I did have a very similar problem (on Nexus 4) getting stuck at

2017/01/17 19:29:02 Waiting for device to enter recovery mode ...


while the phone was actually displaying the very recovery dialog with the above mentioned options, eventually resulting in

Failed to enter Recovery


I was trying for several days on and off to manually get it to boot further using one of the options on the phone or "randomly" entering flash and reboot commands on the ubuntu pc.

I also did apt-get upgrade to make sure my system wasn't the cause of the troubles.

Then two things happened: The last time I tried I did switch to the "advanced" part of the menu fast enough while the command line on the pc was still "waiting for ... recovery mode". As soon as I entered that part of the menu, apparently ubuntu-device-flash did recognize my phone was actually already in recovery mode and started pushing files:

2017/01/17 20:22:12 Waiting for device to enter recovery mode ...
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/gpg/image-master.tar.xz to device
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/ubuntu-touch/stable/ubuntu/mako/version-34.tar.xz to device
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/pool/custom-bbb7857059393182b31ee0885e425c20ccac5f66ab9e68ffc6a7178b046f104a.tar.xz to device
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/pool/device-ed6a4ed78cc7b5bd78815514cd3bb93c852f6593e0df66304f6e720684e11dc3.tar.xz to device
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/pool/ubuntu-312c862adc434562d47089b8a6c9991f6774e6665cf4b303afbce77724d5cd75.tar.xz to device
2017/01/17 20:22:22 Start pushing /home/[...]/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
2017/01/17 20:22:23 Done pushing /home/[...]/.cache/ubuntuimages/gpg/image-master.tar.xz to device
...


Then I was at a point when the pushing seemed to stall - something that has been mentioned in several posts here, so I waited a little bit, happy that finally the recovery mode had been recognized. After 3 and another 3 minutes two of the larger files were done pushing.

I became curious and checked the file sized of the .tar.xz-files stored in my pc's .cache directory: the two "3-minute files" were 23 and 55 MB in size. The last remaining file in that directory, however, was > 300 MB! So I knew a little more patience was required.... and rewarded:

2017/01/17 20:25:28 Done pushing /home/[...]/.cache/ubuntuimages/pool/custom-bbb7857059393182b31ee0885e425c20ccac5f66ab9e68ffc6a7178b046f104a.tar.xz to device
2017/01/17 20:28:12 Done pushing /home/[...]/.cache/ubuntuimages/pool/device-ed6a4ed78cc7b5bd78815514cd3bb93c852f6593e0df66304f6e720684e11dc3.tar.xz to device
2017/01/17 20:40:01 Done pushing /home/[...]/.cache/ubuntuimages/pool/ubuntu-312c862adc434562d47089b8a6c9991f6774e6665cf4b303afbce77724d5cd75.tar.xz to device
2017/01/17 20:40:01 Created ubuntu_command: /home/[...]/.cache/ubuntuimages/ubuntu_commands261026399
2017/01/17 20:40:01 Rebooting into recovery to flash


So the file pushing wasn't "hanging" or anything, after all, it just took its time until all the data was pushed to the phone.

Hope this helps - and will renew hopes to those who have given up in frustration after seeing the recovery dialog on the phone, but watching the tool on ubuntu (pc) fail nonetheless.

In short: just be fast with those buttons on your phone, navigating to "advanced" (using volume-down) and pressing the power button to select that option while ubuntu-device-flash is still Waiting for device to enter recovery mode ...

I had the same problem, because i started the adb server without root priviliges. I used the following steps to fix it:

1. Start your phone in bootloader mode and make sure it is unlocked
2. Kill the existing adb server