The Nexus 5 is a Nexus. Of course I’m sure you figured that out. But what that means is that the device was meant to be easily hackable. This also means that you don’t have to go the OEMs website to basically sign your life away to unlock the bootloader and root the device. It’s actually much simpler than that. In fact it’s almost dead simple, as long as you have the SDK installed. It’s no different from unlocking the bootloader on the Nexus 4, Nexus 7, Nexus 10, or any other Nexus. It’s literally two lines of code, which I have memorized at this point since the Nexus 5 is my fifth Nexus device. We’re going to show you how to do it the old-fashioned way, and that’s manually. Of course there are plenty of root toolkits already available for the Nexus 5 which make it pretty simple.
Once you have the SDK installed, just open up a command window from within the platform-tools folder inside the SDK. Then type these commands:
fastboot oem unlock
What these two commands do is simple. the first one is basically telling your computer to tell your computer to reboot the Nexus 5 to the bootloader. Once it’s done that it’s telling it to unlock the bootloader. Which of course you’ll see the screen shown above. It’s important to note that unlocking the bootloader will erase all your data on your device. So if you want to root your device, it’s a good idea to do it when you first get the device, or back up everything first.
See it’s all quite simple. Now that you’ve got the SDK installed, there are lots of other cool things you can do with ADB and fastboot. Like screen recording, which is new in Android 4.4 and we’ll be covering that a bit later on.