Hey!! Heres the factory images of Android 4.4 Kitkat for Nexus 4 and other Nexus are available.
Video Guide to DOWNLOAD : https://www.youtube.com/watch?v=zPFDMYQXqMc
Nexus Images : https://developers.google.com/android/nexus/images
Nexus Drivers : https://developers.google.com/android/nexus/drivers
Short Instructions :
- Download the full factory image corresponding to your exact model (for example, 2013 Nexus 7 Wi-Fi is razor), which includes the full system, bootloader, recovery, kernel (boot.img), and radio (radio not included for Wi-Fi-only variants). It’s a clean slate for these components – they’ll flash cleanly over anything you have now.
- Unpack the tgz (tar/gz) archive into its own directory. I use Total Commander, but you can use any tool that reads gz and tar, like 7-Zip.
- Proceed with this step if you want to keep your data intact. If you skip this step, your data will be wiped. With your favorite text editor, edit (be careful not to run it by accident instead of editing) flash-all.bat (if you’re on Windows) or flash-all.sh (Mac, Linux) and remove “-w” from the fastboot update command. For example, if the line reads fastboot -w update image-razor-jss15j.zip, it should now read fastboot update image-razor-jss15j.zip. The -w option instructs fastboot to wipe data.
- Reboot into the bootloader and run the appropriate flash-all script.
How to flash a stock ROM
1) For the n00bs: read the entire post before proceeding;
2) MacOS-specific instructions: a) no drivers needed, and b) replace fastboot in the steps below with ./fastboot-mac
A. Install the drivers
1) Do not install LG drivers or the PDAnet drivers, or any other driver you come across. If you have, and you are SURE they are working properly, fine, leave them. Otherwise uninstall them if you are unsure;
2) Download the drivers from here or from here;
3) Install the drivers. See here on how to install them. Note that the driver has to install twice: once when your device is booted normally (not required for this tutorial) with USB Debugging enabled in Settings, and once when your device is booted in fastboot (i.e., bootloader) mode (which is required for this tutorial). (To enable USB Debugging, you first need to enable Developer options by going to Settings->About phone and tapping 7 times on the build number.) If you are using Windows 8, you will need to do this before installing the drivers.
B. Backup your data
1) Backup all your personal data (e.g., photos, music, etc.) OFF of your device and onto your computer by using whatever method you want that works for you, e.g., MTP, ADB, email, Dropbox, Box.net, whatever.
2) This method will wipe your entire device, including the /sdcard folder, so once you do this, you will not be able to retreive anything that was on your device previously.
3) See here on how to backup your apps and app data if you don’t have root.
C. Download the required files to your computer and extract them
1) All of the files that are required, need to be in one (i.e., the same) directory. It does not matter what it is called, but all the files need to be in there, with NO subfolders. EVERYTHING needs to be extracted into this one directory;
2) Download the attachment from the end of this post and extract the contents to the directory created in step 1. (Latest version for Windows is here). Note: if all you want to do is unlock your bootloader, skip to step 7 in this section (C).
3) Download the version of Android you want from here. Make sure you are using an occam image which is for the Nexus 4. Most old versions are not usually available on that site; however, there is a mirror on this site: Random Phantasmagoria.
4) Download the appropriate version (for your computer) of 7-zip from here and install it.
5) Extract the files from within the .tgz file which you downloaded in step 3 using 7-zip, not WinZip or WinRAR or whatever.
6) Make sure you have extracted ALL the files (including extracting any files in any archives inside the .tgz file). You should have six (6) files ending with .img in the directory you created in step 1. The other files you extracted from the .tgz are not necessary;
7) Reboot your device into bootloader mode (by turning it off, hold volume down, and press and hold power) and plug it into your computer;
8) Open a command prompt in the same directory (i.e., make sure you are in the same directory as your files are located). You can hold the shift key when you are in the folder in Windows explorer and right-click in a blank spot and it will open a command prompt.
D. Type in the commands into the command prompt
1) Make sure your computer recognizes your device by typing: fastboot devices
2) Unlock your bootloader (if you have not already done so): fastboot oem unlock
3) You will see a prompt on your device. This will wipe your entire device (including the /sdcard folder). Accept. Note: you use the volume keys to change the option and the power button to accept. You cannot use the touch screen.
4) Reboot by typing: fastboot reboot-bootloader
5) Flash the bootloader: fastboot flash bootloader bootloader-mako-makoz10o.img (or whatever the name of the bootloader image that you downloaded).
6) Reboot: fastboot reboot-bootloader
7) Flash the radio: fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.48.img (or whatever the name is of the radio image that you downloaded).
8) Reboot: fastboot reboot-bootloader
9) Flash the system partition: fastboot flash system system.img
10) Flash the data partition: fastboot flash userdata userdata.img Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked. See note 2 below.
11) Flash the kernel/ramdisk: fastboot flash boot boot.img
12) Flash the recovery partition: fastboot flash recovery recovery.img
13) Erase the cache partition: either a) fastboot erase cache OR b) fastboot format cache <<== the second option seems to work better for most people. Thanks joostburg.
14) Reboot: fastboot reboot
15) Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the Dalvik cache.
Now you have a fully stock image on your device. The only thing that is different from out-of-the-box condition is that your bootloader is unlocked. See the notes section at the end of this post for information on re-locking the bootloader.
Note that some users indicate that they can’t get past the X on boot. If this happens to you, reboot into the bootloader and select recovery. Then, when you see the Android with the red exclamation mark, hold power and press volume up to take you to the menu. Wipe cache. If that still doesn’t work, boot back into recovery and do a factory reset (this will obviously delete all your data & files in /sdcard…).
If you have a 16GB device, and it now shows up as 8GB, reboot into recovery (hold power and press volume up when you are at the screen with the android and the red exclamation mark), and wipe cache. If that still doesn’t work, boot back into recovery and do a factory reset (which will obviously delete all your data & files in /sdcard…). Or do this.
Note : Do this flashing on your risk. I am not responsible for any damage to your device.
Source : XDA