- TWRP --- Recovery
Install TWRP
adb reboot bootloader
fastboot flash recovery twrp-3.2.3-0-hammerhead.img
fastboot reboot
Install it
extract CF-Auto-Root-hammerhead-hammerhead-nexus5.zip to folder
go into folder
adb reboot bootloader
chmod 755 root-mac.sh
sh root-mac.sh
Download the zip package based your device.
Put the zip file to device's sdcard.
Then use the TWRP recovery to install it.
// load to recovery mode
adb reboot recovery