I just bought a Nexus 5 today and wanted to root it. I tried running the following script without success. I kept getting the following error:
sudo: unable to execute tools/fastboot-linux: No such file or directory
So, here are some alternative instructions. If you don’t know what Linux is, please STOP reading this RIGHT NOW:
MANDITORY DISCLAIMER: This will wipe your device and I am not responsible if you fuck up your shit.
1. Enable Developer Mode and USB Debugging
- Go to settings on your phone
- Go to “About Phone”
- Tap “Built Number” a bunch of times
- Go back
- Go to “Developer Options”
- Check “USB Debugging”
- Click “OK”
2. Install ADB and Fastboot tools
This is how you install ADB and Fastboot in Ubuntu Linux. I’ll let you figure it out for other Linux operating system.
sudo apt-get install android-tools*
After installing, you should be able to run both
3. Unlock Bootloader
First, make sure
adb can see your device:
Reboot to bootloader:
adb reboot bootloader
Then, unlock the bootloader (this may need “sudo”):
fastboot oem unlock
4. Flash Root
First, download CF-Auto_root
unzip CF-Auto-Root-hammerhead-hammerhead-nexus5.zip cd image/ sudo fastboot boot CF-Auto-Root-hammerhead-hammerhead-nexus5.img
Be patient, this takes about a minute or two. It will reboot on its own…
And that’s it! When your phone reboots, it should walk you through the setup process again. To make sure if this worked, make sure the SuperSU app is intalled.
I hope the instructions helped you out. Let me know if you have any questions.