[Nexus 4 General] mattybaby:
5.0.1 (LRX22C) factory to 5.1.0 (LMY47O) factory

My bootloader was already un-locked. Hold the volume down key and hit the power button to power on the phone into fastboot mode.

Windows 7

Front USB 2.0 ports

7-zip

[TOOL]Updated ADB (version 1.0.32) and Fastboot [16-OCT-14]

http://xdaforums.com/htc-one/general/tool-updated-adb-version-1-0-32-fastboot-t2932160

extract - fastboot_adb(1.0.32)_071114_r21.rar

extract - occam-lmy47o-factory-cae68e81.tgz

extract - occam-lmy47o-factory-cae68e81.tar

Move all of the files into the fastboot_adb(1.0.32)_071114_r21 folder.

Open the folder. Hold down the shift key and right click. Click on "open command windows here"

type in: flash-all.bat or fl and hit the tab key.

:(

FAIL:

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>flash-all.bat

< waiting for device >

sending 'bootloader' (2264 KB)...

OKAY [ 0.094s]

writing 'bootloader'...

OKAY [ 0.281s]

finished. total time: 0.374s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.000s

< waiting for device >

sending 'radio' (45537 KB)...

OKAY [ 1.560s]

writing 'radio'...

OKAY [ 2.480s]

finished. total time: 4.040s

rebooting into bootloader...

OKAY [ 0.000s]

finished. total time: 0.000s

< waiting for device >

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 854497332 bytes

error: update package missing system.img

Press any key to exit...

:)

Extract image-occam-lmy47o.zip into the fastboot_adb(1.0.32)_071114_r21 folder.

Run the following commands.

There is no need to update the bootloader and modem. You can see on the screen the current bootloader and modem build were updates from the last step.

Commands found via http://xdaforums.com/nexus-4/general/how-to-how-to-flash-factory-image-t2010312

fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot flash system system.img ***took apx 8 mins before seeing anything being written to the screen and phone.***

fastboot flash boot boot.img

fastboot flash recovery recovery.img *** don't do this if you have TWRP installed ***

fastboot format cache

fastboot reboot

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot flash recovery recovery.img

sending 'recovery' (6956 KB)...

OKAY [ 0.234s]

writing 'recovery'...

OKAY [ 0.390s]

finished. total time: 0.624s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot flash boot boot.img

sending 'boot' (6394 KB)...

OKAY [ 0.250s]

writing 'boot'...

OKAY [ 0.374s]

finished. total time: 0.624s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot flash system system.img

erasing 'system'...

OKAY [ 0.827s]

sending 'system' (834470 KB)...

OKAY [ 50.747s]

writing 'system'...

OKAY [ 46.519s]

finished. total time: 98.140s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot flash boot boot.img

sending 'boot' (6394 KB)...

OKAY [ 0.250s]

writing 'boot'...

OKAY [ 0.374s]

finished. total time: 0.624s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot flash recovery recovery.img

sending 'recovery' (6956 KB)...

OKAY [ 0.265s]

writing 'recovery'...

OKAY [ 0.374s]

finished. total time: 0.640s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot format cache

Creating filesystem with parameters:

Size: 587202560

Block size: 4096

Blocks per group: 32768

Inodes per group: 7168

Inode size: 256

Journal blocks: 2240

Label:

Blocks: 143360

Block groups: 5

Reserved block group size: 39

Created filesystem with 11/35840 inodes and 4616/143360 blocks

erasing 'cache'...

OKAY [ 0.078s]

sending 'cache' (10984 KB)...

OKAY [ 0.437s]

writing 'cache'...

OKAY [ 0.608s]

finished. total time: 1.139s

C:\Users\test\Desktop\fastboot_adb(1.0.32)_071114_r21>fastboot reboot

rebooting...

finished. total time: -0.000s

It took apx 11 mins to boot up. It was optimizing the 100+ apps. All my apps and config settings were there.

Optional....

I powered off and when back into fastboot mode to flash TWRP so I can create a backup image.

http://dl.twrp.me/mako/

fastboot flash recovery twrp-2.8.6.0-mako.img

Use the arrow keys to reboot into recovery mode to boot into TWRP. Do not boot into the system.