Rooting any Android device brings a lot of advantages. You will be able to install custom ROM, Custom Kernel, Remove Bloatware, Overclock your phone's processor and last but not the least is Mods. Keep in mind that unlocking Bootloader and Rooting your device voids the warranty and it may even brick your device.
Rooting your phone is very easy, but it all depends on your phone manufacturers and your carrier. Sometimes, your carrier and your phone manufacturer can make it difficult for you to unlock bootloader/root your phone. Nexus phones are easy to unlock bootloader and root your device. And that is what I am going to be using here as well.
What you need is...
SuperSu Zip file
TWRP recovery "https://twrp.me/"
How to root your phone
The resources that might help you in rooting your device is XDA Forums and YouTube.
Step 1. Back up your device. (Note: unlocking bootloader will erase everything from your device).
Step 2. Turn on USB Debugging and OEM Unlocking. (See Picture 1).
Open Settings on your device. If you do not see Developer Options toward the bottom of the Settings screen on your device, follow these steps to activate them.
Step 3. Installing ADB and Fastboot
Step 4. Connect your device to your windows machine over USB. Allow USB Debugging on your Windows Machine. See the following image below
Step 5. Move the SuperSu.zip file to your phone's root directory. Basically Move SuperSu file to your phone, like you normally do to transfer songs to the music folder, this time to directory.
Step 6. Make sure ADB recognize your device by running the following command "adb devices" in Command Prompt. See the following image.
Step 7. Start the device in bootloader mode.
Turn the device off, then turn it on and immediately hold down the relevant key combination for your device. For example, to put a Nexus 5 ("hammerhead") into fastboot mode, press and hold Volume Up + Volume Down + Power as the device begins booting up. You will be seeing the following screen. If you got so far, you are doing good.
Step 8. Unlock the Nexus device using the following command
Nexus 6 and older the command to unlock the bootloader is "fastboot oem unlock"
Nexus 5x/6p and newer the command is "fastboot flashing unlock"
Step 9. Your device bootloader is unlocked.
Step 10. Flash TWRP recovery or CM Recovery (Find the appropriate recovery for your devices here "https://twrp.me/"
Step 11. I suggest changing the recovery file name to just "recovery," it will be easier to flash. Flash recovery using the following command "fastboot flash recovery recovery.img"
Step 12. You can now get into recovery by navigating to it in the bootloader using the volume buttons and select Recovery option and press the power button. You will be greeted by the following screen
Step 13. The last step is to Install SuperSu, which allows you to root your device. Navigate the SuperSu file, which we put earlier in the root directory. Go to Install and search for SuperSu file and click on the file to select and Swipe to the Right to install the SuperSu. Now your phone is rooted.
Step 14. Once the installation is done, Revert back to main Recovery page and Hit the Reboot button and then Click on System
Note: No one will be held responsible, if you mess up while unlocking bootloader or rooting a device. Please proceed with caution. Please follow tutorials on YouTube and also follow XDA for specific model. Thanks for checking out the Content.