Now I would like to tell you how to unroot your nexus 4 device.as it seems very important sometimes to unroot due to the fact that if we send our device to Google due to some technical support.at that time it is very important that our phone is unrooted otherwise they will not give us any technical support.
so lets start::::::
STEPS IN ORDER YOU HAVE TO FOLLOW::::::
Step 1:
BACKUP your phone data because it will reset ur phone.
Step 2 : turn off ur device.
Step 3 : first off all you have to go into bootloader mode.This is done with the help of pressing power button + volume up and volume down simultaneously at the same time.
Step 4 : connect ur phone to the computer via usb.
step 5 :
Download link just go to this link and download the reqd. file named as 4.2unrootnexus.zip. extract on desktop this file
Step 6 : download and install usb drivers.if you already have then directly follow step 7
Step 7 : go to control panel<hardware and sound<device manager
and find android bootloader interface
Step 8 :
Open Command Prompt and type:
cd Desktop
cd 4.2UnrootNexus4.zip
fastboot flash bootloader bootloader-mako-makoz10l.img
fastboot reboot-bootloader
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.33.img
fastboot reboot-bootloader
fastboot -w update image-occam-jop40c.zip
step 9 : After that 5 minute process your phone will automatically reboot, but it might get stuck on the "X" boot animation.
step 10: Unplug your phone and keep holding the power button until your phone turns off. Right after, press the volume up, volume down, and power button all at the same time. When your phone vibrates let go of the power button, but keep holding onto the volume up and down button.
step 11 : Press the volume up 2x and power button to enter into stock Recovery
step 12 : . You will now see a "dead Android". Keep pressing the volume up, volume down, and power button all at the same time until you see stock "Recovery", shown in the image below
step 13 : Once you entered into stock "Recovery" select "wipe data/factory reset" and choose "yes".
step 14 : choose reboot system
step 15 : 14. Your phone will now boot up and you are unrooted. But, if you are planning on sending your phone back to Google we need to lock the bootloader.
step 16 : Make sure your phone is unplugged then, enter your phone into Bootloader Mode. Press the volume up, volume down, and power button all at the same time. When your phone vibrates let go of the power button, but keep holding onto the volume up and down button.
step 17 : Plug your phone back in via microUSB
Go back to Command Prompt and type:
fastboot oem lock
step 18 : Now your bootloader is lock and safe to send back to Google. Just press the power button to boot your phone back into normal phone state