[Nexus 4 General] mc704:
*I'm not responsible for anything you do with this. I'm just trying to contribute back to the community*

Prerequisites

1. YOU MUST BE ON THE FACTORY IMAGE (NO MODIFICATIONS that means no custom recovery, kernels, radios, etc)

**User Impo5sible says its possible with custom recovery and kernels I'm not 100% sure so YMMV*** *ANOTHER EDIT - USERS REPORT GETTING STUCK ON NEXUS LOGO if you have a custom rom/kernel and not using the -w command to wipe DATA)

2. YOU MUST HAVE ADB & USB Driver for the device (I used the SDK file from google and PDAnet)

SDK /w adb & fastboot Link: http://developer.android.com/sdk/index.html

PDAnet Link:http://pdanet.co/

3. ENABLE USB Debugging via Developer settings

(press the build button 7 times to activate it the "settings --> about phone --> Build Number --> go back --> Developer Settings --> Check USB Debugging)

4. Android 4.3 Image can be obtained from Google

Image Link: https://developers.google.com/android/nexus/images

When you have all of this installed... you may proceed

Step 1: Use 7zip or compression program equivalent to extract the

stock image file that is .TGZ

Step 2: You should see a

stock image file that is .TAR

...extract this once again with any compression program (you should see a butt load of flash files)

Step 3: Plug your device in the computer (USB debugging should be enabled & I recommend switching the transfer type to PTP/Camera)

Step 4: Launch command prompt (start --> run --> "cmd")

Step 5: type in command prompt "cd directory where you have the adb & fast boot"

for example here is mine "cd C:\Users\MC704\Desktop\adt-bundle-windows-x86_64-20130717\adt-bundle-windows-x86_64-20130717\sdk\platform-tools"

Step 6: Verify that it is detecting your device by typing in command prompt "adb devices" (

YOU SHOULD SEE YOUR DEVICE HERE

) if not recheck usb debugging & camera ptp... unplug and replug the phone back into your comp

**take a breather we are almost done**

Step 7: Turn your device off and go into fastboot mode (Hold Power Button + Volume Up & Down)

Step 8: Unlock your bootloader by typing in command prompt "fastboot oem unlock"

[THIS WILL DELETE ALL YOUR DATA]

It will prompt you to unlock the Device

Step 9: Remember all those files you extracted from the ".TAR"? Copy them to the same folder where your adb and fastboot files are

Step 10: ****************VERY IMPORTANT************* DO THIS IN ORDER

I got these commands from the flash-all.sh file

Type in the command prompt each step one at a time and wait for it to complete

"fastboot flash bootloader bootloader-mako-makoz20i.img"

"fastboot reboot-bootloader"

"fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img"

"fastboot reboot-bootloader"

"fastboot -w update image-occam-jwr66v.zip"

***NOTES FOR THIS STEP***

*REMOVE the -w from the last step if you want to keep your data (assuming your bootloader was already unlocked)*

***User chrisjcks noted you can use the flash-all.bat file that was in the zip to make life easier***

Step 11: Enjoy! If you do not plan on putting any custom roms or rooting etc. I recommend rebooting into fastboot mode (Hold Power Button + Volume Up & Down) when the phone is unlocked and type in the command prompt "fastboot oem lock" (you have to have USB debugging & PTP camera enabled)

If I missed out on any steps, please do let me know I will update the OP.

MISC info.

1.

People who are using custom recoveries & root & would like to

KEEP ROOT

... Check this post out it should help you fellars

http://xdaforums.com/showpost.php?p=43917716&postcount=56

2.

STUCK ON BOOT LOGO?

Check this post out for the fix

http://xdaforums.com/showpost.php?p=43920888&postcount=85

3.

NEW ROOT BY CHAINFIRE

http://xdaforums.com/showthread.php?t=2025274