Soft Bricked Nexus 4 A long time ago my Nexus 4 was doing an OTA update and crashed midway through. Now when I try to power it on it shows the google symbol then a standing Android with its chest open and a progress bar under it. The progress bar says "Installing System Update...". Then when about 25% through (A few seconds) the Android is laying down with its chest open and a red triangle with a exclamation mark over the Andriod. The screen says "Error!". If I wait a few minutes then it repeats this process.

I have searched the internet for long hours without finding any solution. I sadly don't have USB de-bugging on or my problem would have been solved long ago.

I currently have Ubuntu 16.04 and Windows 7 and I can't seem to mount the Nexus on either one. When I enter recovery mode it has the same dead Andriod and it says "No Command". I have factory-reset it and wiped the cache partition but neither helped in anyway.

I am not sure but I believe to update from ADB I need USB de-bugging activated and the Nexus needs to be connected to my computer. (Both things I can't do) All of the solutions I find need USB de-bugging enabled and I can't find any way of activating it while it is in it's current state. When I load fastboot mode this is what it says in the bottom.


FASTBOOT MODE 
PRODUCT NAME - mako
VARIANT - mako 16GB
HW VERSION - rev_11
BOOTLOADER VERSION - MAKOZ30d
BASEBAND VERSION - M9615A-CEFWMAZM-2.0.1700.84
CARRIER INFO - None
SERIAL NUMBER - 029965911c4e2725
SIGNING - production
SECURE BOOT - enabled
LOCK STATE - locked


I don't know if that will help but I'll put it here anyway. I think that is all and I greatly appreciate any help given.
USB Debugging is not relevant, it doesn't come into play here, but you must be able to connect it to your computer via USB.

The first thing you have to do is unlock the bootloader, luckily the Nexus 4 does not require anything special to unlock the bootloader. From the fasboot screen, on your computer use the command:

sudo fastboot oem unlock

And follow the instructions on the screen to confirm the unlock and wipe process. 

If this fixes it, your done... But to flash the latest firmware, you can go to: https://developers.google.com/android/nexus/images which has the images and instructions to flash the device from the bootloader (fastboot). It is literally as simple as downloading the appropriate image, expand the archive, and run ./flash-all.sh script

If you need adb and fastboot, they are available in the normal Ubuntu software repositories. 

Nexus devices are wonderfully simple to work with, and are virtually unbrickable.