[Nexus 5 General] bitdomo:
Requirements:

Bricked Nexus 5

EMMC should not be fried

Image files: 16GB (mirror) and 32GB (mirror)

BoardDiag (mirror) tool for Nexus 5

Windows XP - 7 - 8 - 8.1 (Virutal Box or VMware good too)

Let's start!

Connect the phone to your PC

Open Device Manager

1: Find Qualcomm HS-USB QDLoader 9008 device under Ports (COM & LPT) and note the COMxy port (in my case it is COM3).

If you dont see Qualcomm HS-USB QDLoader 9008 click on the CLICK TO SHOW CONTENT button bellow, otherwise don't and follow the guide.

1: If you see LG Android USB Device under Other devices or LGE AndroidNet USB Serial Port under Ports (COM & LPT), then press VOLUME_UP+VOLUME_DOWN+POWER keys until you see QHSUSB_BULK under Other devices or Qualcomm HS-USB QDLoader 9008 device under Ports (COM & LPT).

1: If you see QHSUSB_BULK under Other devices, then you have to install drivers (mirror). Just click on Next, Next... and Finish.

You have to turn off driver signature enforcement if you are using Windows 8 or Windows 8.1 to make the drivers work.

Extract the downloaded images 16GB.rar or 32GB.rar to get the image files

Start BoardDiag

1: Select Nexus5 (MSM8974_HammerHead).

2: Select the Com Port you see in Device manager (in my case it is COM3).

3: Select the 16GB or 32GB folder.

4: Select AP check.

5: Select RESTORE BOOT IMG.

1: Click on START.

If you were successful you should see Boot images download completed.

Your phone should turn on, but it may stuck at Google logo. If it is stucked at Google logo you have to reflash a stock rom. You can use either LG FlashTool or fastboot method. You can also flash custom rom from custom recovery if it didn't get replaced by the stock recovery, otherwise flash custom recovery from fastboot.

Extra fun

Old OP

Requirements:

Bricked Nexus 5

EMMC should not be fried

Firmware file: D820 and D821

BoardDiag tool for Nexus 5

Windows XP - 7 - 8 - 8.1 (Virutal Box or VMware good too)

Let's start!

Connect the phone to your PC

Open Device Manager

1: Find Qualcomm HS-USB QDLoader 9008 device under Ports (COM & LPT) and note the COMxy port (in my case it is COM3).

If you dont see Qualcomm HS-USB QDLoader 9008 click on the CLICK TO SHOW CONTENT button bellow, otherwise don't and follow the guide.

1: If you see LG Android USB Device under Other devices or LGE AndroidNet USB Serial Port under Ports (COM & LPT), then press VOLUME_UP+VOLUME_DOWN+POWER keys until you see QHSUSB_BULK under Other devices or Qualcomm HS-USB QDLoader 9008 device under Ports (COM & LPT).

1: If you see QHSUSB_BULK under Other devices, then you have to install drivers. Just click on Next, Next... and Finish.

You have to turn off driver signature enforcement if you are using Windows 8 or Windows 8.1 to make the drivers work.

Extract the downloaded firmware .zip to get the .tot file

Start BoardDiag

1: Select .tot file.

2: Select a directory where to extract .tot file.

3: Click on Extract.

It may hangs on extracting system and cache. Just let it finish.

1: Click OK.

1: Select Nexus5 (MSM8974_HammerHead).

2: Select the Com Port you see in Device manager (in my case it is COM3).

3: Select the directory where you extracted the .tot file.

4: Select AP check.

5: Select RESTORE BOOT IMG.

1: Click on START.

If you were successful you should see Boot images download completed.

Your phone should turn on, but it may stuck at Google logo. If it is stucked at Google logo you have to reflash a stock rom. You can use either LG FlashTool or fastboot method. You can also flash custom rom from custom recovery if it didn't get replaced by the stock recovery, otherwise flash custom recovery from fastboot.

Thanks [MENTION=4858937]jd1639[/MENTION] once again for the GPT partition table of the 32GB variant.