Previously, I published a tutorial on the best way to install Android 5.0 on Nexus 4 Smart phones, I also published a guide on how to install Android 5.0 on Nexus 5 and Nexus7. Today's stroll, I would brief you guys on how to root Nexus 4 and Nexus 5 on android 5.0 Lollipop.
Best Guide on How to Root Nexus 4 and Nexus 5 on Android 5.0 Lollipop
Step 1: First off- Download USBdriver of Nexus 4 or Nexus 5 via here and install the USB driver for Nexus 4 on your Windows PC
Step 2: After you have successfully performed the above step, then remember to unlock the boot loader of your Nexus 4 or Nexus 5 Smartphone, if you have unlocked it before, then skip this step and move to the next step.
Step 3: Then download CF Root file for Nexus 4 here, it also works on Nexus 5, and make sure you extract the folder to your desktop screen.
Step 4: Once you have extracted the files to your desktop screen, you would find these files, and folder image (folder), and tools (folder), root-mac.sh, root-windows.bat and root-linux.sh.
Step 5: Then switch off your Nexus 4 or Nexus 5 Smartphone and turn it on to boot loader mode by pressing Volume Down + Volume Up and then press the power button.
Step 6: Immediately, your device would be in fastboot mode, then connect your device to the computer and from your computer, double click the windows.bat file and then follow the on screen instruction to proceed.
Final Step: Wait for the process to be completed, then you would be notified with a prompt on your Nexus 4 or Nexus 5 Smart phone, then click it and your device would automatically reboot.
Once your device is rebooted successfully, you would find the SuperSU app in your app drawer, and that's it. Your Nexus 4 or Nexus 5 Smart phone is successfully rooted on Android 5.0 Lollipop.