Ubuntu – How to wipe /data on nexus 4 to install ubuntu-touch

ubuntu-touch

I'm trying to replace my current Ubuntu Touch Developer Preview with the next daily build.

I'm following the directions here https://wiki.ubuntu.com/Touch/Install

After entering 'phablet-flash -l' I get the following error. Not enough space in /data, found 3.9G. The directions say to "try wiping the /data partition on your device and redeploy". How do you do that?

When I plug in the device it always says "Unable to mount Nexus 4 Unable to open MTP device '[usb:002,010]'". Do I need to use adb or ssh to wipe /data?

Best Answer

You have several methods at your disposal to wipe your /data partition:

Through Android

  • Boot into Android normally.
  • Go into Settings > Backup & reset > Factory data reset
  • This will perform a Factory Reset which basically wipes /data and cache partitions, but keeps /system in tact.

Through Fastboot

  • Boot your device into bootloader mode: power-down your device, and reboot into the bootloader by holding the power button and the volume down button together for several seconds.

  • You can also reboot into bootloader mode via adb by executing the following command (while your device is booted into Android, with USB Debugging turned on):

    adb reboot-bootloader

  • Once you're in the bootloader, run the following fastboot command:

    fastboot erase data

Through Recovery

  • Boot your device into bootloader mode (follow instructions above).

  • Once you're in the bootloader, use the volume buttons to select Recovery, and press the power button to reboot into recovery.

  • You can also reboot into recovery mode via adb by executing the following command (while your device is booted into Android, with USB Debugging turned on):

    adb reboot recovery

  • If you have the stock <3e> recovery or ClockworkMod, select wipe data/factory reset option. Use the volume buttons to navigate to it, and the power button to select it and start the wipe.

  • If you have TWRP, tap on Wipe, and select Factory Reset.

Good luck!

Related Question