I have a Nexus 4 with Android 4.3 installed and I want to flash it to Ubuntu Touch. My system is Ubuntu 12.04, running inside a virtual machine on Mac OS 10.5.8. To use the VM, I opened an NAT bridge and forwarded port 5037 for adb, I can see the Nexus with adb and e.g. use the adb shell into it. USB ports are also forwarded to the VM.

I follow these instructions to the letter. My bootloader is unlocked, just as it was described in the instructions. Now I encounter different issues, when executing sudo phablet-flash ubuntu-system --no-backup.

On the first run, it got stuck in this state:

INFO:phablet-flash:Decompressing partitions/recovery.img from /home/till/Downloads/phablet-flash/imageupdates/pool/device-5ba3031cb0d6fc624848266edba781e3e821b6e1e8dd21105725f0ab26077d0a.tar.xz
INFO:phablet-flash:Restarting device... wait
INFO:phablet-flash:Restarting device... wait complete
INFO:phablet-flash:Booting /tmp/tmpMSN8bm/partitions/recovery.img
< waiting for device >
downloading 'boot.img'...
OKAY [  1.772s]
OKAY [  0.005s]
finished. total time: 1.779s
INFO:phablet-flash:Waiting for recovery image to boot

The following happened: around the line "INFO:phablet-flash: Restarting...", it rebooted into the bootloader. The bootloader shows only for two seconds, then the screen goes off and the phone stays off. But I do notice, that the screen is not off - it is just black, but the background light is on. If I wait long enough, phablet-flash aborts with ERROR:phablet-flash:Wait for recovery expired

On the second try, I wanted to manually start the bootloader and choose "Recovery mode". Pressing "volume down+power" at first did nothing. Releasing the buttons and then pressing them again brought me into the bootloder. After choosing "Recovery mode", phablet-flash continued and after a while aborted with the following output:

INFO:phablet-flash:Wait for recovery image to boot complete
INFO:phablet-flash:Clearing /data and /cache
INFO:phablet-flash:Pushing /home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz to /cache/recovery/
failed to copy '/home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz' to '/cache/recovery/': Permission denied
ERROR:phablet-flash:Command 'adb push /home/till/Downloads/phablet-flash/imageupdates/pool/ubuntu-2b5345658b58e55207c4a4e7b6b3d8cd4f3d9a3187d2448fc9020c884234bac0.tar.xz /cache/recovery/' returned non-zero exit status 1
Removing directory /tmp/tmpDnbz6N
Removing directory /tmp/tmpth4L6w

What can I do to properly flash my phone with Ubuntu Touch? I noticed that adb does not show the phone in recovery mode: Typing adb devices, when the Nexus 4 is in recovery mode, shows the serial number and the state device, where it should show recovery.

Should the phone be rooted? This is not mentioned in the instructions.

1 Answer 1


OK, I found the issue. I will post the answer for reference for everyone, who tries the same: Installing Ubuntu Touch on a phone, when you use a virtual machine for the Ubuntu that you are using.

The primary issue: To be able to access the Nexus from inside the VM, I had to activate a "device filter" so that Ubuntu inside the VM can see the phone. The device filter has to be different for the phone, when it is in Recovery mode!

In detail:

I first flashed the phone to Android 4.2.2. This way I was able to at least see the Recovery mode that comes with the Ubuntu Touch installation (NB: It seems that stock Android on the Nexus 4 does not ship with Recovery mode [citation needed]). The problem remained, that phablet-flash remained at INFO:phablet-flash:Waiting for recovery image to boot.

After I installed the CWM Recovery image, I found out that adb cannot see the device in Recovery mode. Hence I checked the VirtualBox settings and added the Nexus 4 as a device filter again in the USB settings. It turned out that in Recovery mode, the product ID of the phone is different, hence it was not forwarded to the guest OS in the VM and phablet-flash could not continue, as soon as the phone was in R-mode.

I hope this helps, if someone happens to try the same.

  • Ubuntu Touch is currently designed for Android 4.2.x ROM code, and may not work correctly with 4.3 (or later). But you have identified that ..
    – david6
    Commented Oct 21, 2013 at 6:44
  • Yes, I found that out the hard way. But they never say it does not support 4.3, they just provide installation directions up to 4.2.2
    – Till B
    Commented Oct 22, 2013 at 7:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .