You might want to root your Nexus 5 (and other Nexus devices) after Android 5.0 Lollipop update. Chainfire, developer of the popular one click “CF Auto Root” tool has already released rooting solution for Nexus 5, Nexus 7 and Nexus 10 on Android 5.0 Lollipop.
For your information, Google just began pushing out Android 5.0 Lollipop update to select Nexus devices. Lollipop is now live for Nexus 5, Nexus 7 (2013), Nexus 7 (2012), and Nexus 10 devices. The over-the-air (OTA) update might take a few days to reach your device, so if you just cannot wait, head over to Google’s Factory Images page to download and install it yourself.
Chainfire’s CF Auto Root is one of the easiest root methods for Android devices. It will keep as close to stock firmware as possible. This root package will install the SuperSU binary and APK, as well as the stock recovery on your phone.
Note: Before you get start with rooting process, make a backup of your device’s data. This guide is for advanced users only. We will not take responsibility for anything that goes wrong.
Instruction to root Nexus 5 on Lollipop:
1. Download [HERE] CF Auto Root file for Nexus 5, unzip the CF-Auto-Root-xxx-xxx-nexusxx.zip file on your computer and then connect your Nexus 5 to your computer with a USB cable.
2. Boot Nexus 5 into bootloader mode via adb. To do so, start adb and execute the command ‘adb reboot boot loader‘.
3. If your boot loader is locked, execute the command ‘fastboot oem unlock‘