Right out of the box, there are a plethora of interesting and useful customization features for the Nexus 5X. However, what happens when you give the LG wrapped marshmallow, even more, freedom? Since you’re still here, I’m sure you know that I’m talking about rooting. You’ll be happy to hear there are two methods available to get this process done.
With any device, there are risks you need to be aware of before rooting. The precautions you need to take before attempting a root can make the difference between a working phone and a paperweight. However, even being aware of problems that could occur, doesn’t stop them from happening. Before rooting, familiarize yourself with most problems that could crop up, and how to fix them if necessary.
Method 1: Rooting without System Modifications
You may have heard of this method before, often referred to as a systemless root, this method roots your device without the need for rewriting any system files. It does not have as much tenure as the tried and true method I’ll be mentioning after this, but it’s easy to use, and in theory, won’t interfere with OTA updates.
For this method, you’ll need:
- A PC enabled with ADB Fastboot
- Proper SDK tools and drivers
- A way to connect your device to your PC
- (The most recent version of Chainfire’s SuperSU beta
- Your bootloader unlocked
- The most recent version of TWRP
- Twenty minutes of your time
Before you begin this method, please download the most recent SuperSU beta zip file, and place it in your phone’s directory.
This can also be done after unlocking the bootloader, or installing a custom recovery, but I recommend you do it beforehand.
For this first step we’re going to be unlocking the bootloader with the help of ADB fastboot commands. If you’ve already unlocked the bootloader of your Nexus 5X, you can skip this step and instead start from the Step 2, which describes how you need to install TWRP recovery for the systemless root.
- If Developer Options are not already unlocked on your phone, navigate to About Phone from your Settings. Furiously, yet gently, tap on your Build number until you receive a notification that tells you that you are now a developer.
- With Developer Options enabled, enable OEM Unlock under the Developer Options menu in your Settings. There should be a check box for you to tick.
- With that done, you should now power down your device.
- Once a few seconds have passed, hold down the Power and Volume Down buttons to enter the bootloader.
- Now connect your device to your PC using whatever means you have on hand.
- Once connected, open the command prompt on your PC, where your fastboot folder is located. To do this, hit shift + right click within the borders of the folder, and then navigate to open command prompt in the newly opened window.
Now that the command prompt is open, enter this command to see if everything is in place so far:
- fastboot devices
If done correctly, you should see your device’s serial number displayed in the command prompt. This is the OK for you to continue. This next command will erase all user data on your device, so make sure you have backups ready to go.
Enter the command:
- fastboot oem unlock
You now have the opportunity to confirm this action on your phone using the volume keys to scroll, and the power key to select.
- Once you’ve made your peace, select the option to confirm your decision.
This process shouldn’t take long, and once it’s finished, enter the command:
- fastboot reboot
Wait for the reboot to finish taking place, and you can now safely disconnect your device from the PC. However, you’ll want to keep it connected for the next step.
Next you’ll need to install TWRP recovery onto your device, and making sure that it’s set to read-only. If your custom recovery is not set to read-only, the systemless root will not work properly.
- First download the most recent version of TWRP for your device from their website.
- After you’ve downloaded the file, place it in the same fastboot folder you had opened for Step 1 on your PC.
- With the file in place, open your command prompt in the same folder.
- Connect your device to your PC, and boot into the bootloader if you are not currently.
For this next part, you’ll be using the name of the file in the command prompt in place of the text: In the command prompt, with everything in place, and your phone set up properly, enter the command:
- fastboot flash recovery .img
After this is done, using the volume buttons to scroll, and the power button to confirm, navigate to the Reboot Bootloader option. You can now enter your custom recovery, and will most likely be asked if you would like to keep TWRP as read-only. Say yes to this, as keeping it read-only is important for the systemless root to work properly.
Additionally, if TWRP asks you to flash a certain version of SuperSU, don’t do it.
Flashing this version could potentially brick your device, or cause other issues. TWRP may offer to root for you, claiming your device is not rooted, but ignore this and skip this message.
Now we can start the actual root after all of the requirements have been met. For this, you’ll need to be booted into TWRP, which you can do from the bootloader, if you aren’t there already.
- Navigate to the Install menu.
- Once there, find the SuperSU file you had downloaded previously, and select it.
- To install the file, swipe according to the directions.
- After the installation you will be presented with the option to wipe the cache, or dalvik. Whichever you are presented with, confirm to wipe it.
After you’ve wiped cache, hit the back button and then navigate to Reboot System. Once you’ve done that, you’ve performed the systemless root. While this method doesn’t root the Nexus 5X without a wipe, it is easy enough to complete in a short amount of time, especially if you have several qualifiers complete already.
(This step is optional)
If the root without modifying systems is causing you problems, you can switch to a more traditional root with the use of an app and a few commands.
The first thing you’ll need is an app called, Terminal Emulator, which you can download by clicking the button below.
In the app, you’ll need to enter a short series of codes that will change the systemless root, into something a little more traditional.
Enter these codes one after the other:
This will grant SuperSU the access it needs.
- mount -o remount,rw /system
- touch /system/bin/su /system/xbin/su
- mount -o remount,ro /system
If you were having any issues with your device after rooting with this method, this last step should clear up any problems with the root itself.
Method 2: Flashing a Modified Boot Image with Fastboot
This method makes use of a modified boot image, which is a fairly common way of rooting a device, and should not take long to complete. However, much like the first method, this has more or less the same requirements to advance.
The similar requirements that both methods share is the need for:
- A way to connect your device to your PC
- A SuperSU zip downloaded onto your phone.
- A custom recovery like TWRP (not read-only)
- The bootloader of your device being unlocked
For unlocking the bootloader, and installing TWRP, you can consult Step 1 and Step 2 of Method 1 if you have not done either prior to reading this method.
As a few additional requirements to those above, you should:
- Download the most recent version of SuperSU and place it on your phone in an easy to find directory.
- Locate the fastboot folder on your PC that contains your fastboot files, as you’ll be entering commands there, as well as placing files inside of it.
With all of that out of the way, you can start the rooting process.
According to your build, you should have downloaded the appropriate modified image in reddv1’s post above. Once you have it, you’ll need to extract it before using the img file for its intended purpose.
- After extracting the img, move the file to your open fastboot folder.
- If needed, rename the file to “boot.img” for the sake of simplifying the command, and increasing accuracy.
Now you need to boot your phone into the bootloader, and connect it to your PC.
- After your device is in the bootloader and connected, open a command prompt window in your fastboot folder.
Once you’ve opened the command prompt, input the following command:
- fastboot flash boot boot.img
Give your device a few moments, and when the process is finished, you can use the volume buttons and the power key to confirm the Reboot Bootloader option.
Once the bootloader has been rebooted, you’ll need to boot into TWRP recovery for the next step.
After you’ve entered the TWRP menu:
- Navigate to the Install menu.
- Locate the SuperSU zip placed on your phone, and select it.
- Start the install process with a swipe.
After installation has finished, wipe the cache or dalvik when prompted. Then hit back, and tap the reboot system button. If you’ve made it this far, then congratulations, your root should have gone through.
As one more additional note, just like in the first method, if TWRP prompts you to flash a version or SuperSU, or claims you don’t have root and will root for, skip this message and ignore it to continue as normal.
If you’re looking to root your Nexus 5X without unlocking the bootloader, you’re out of luck, but thankfully the methods available are easy enough to get through. Once rooted, the Nexus 5X can make even more use out of it marshmallow center.
With your Nexus 5X rooted, what’s something that you can’t wait to do with it? Please share your plans and thoughts in the comments below, as well as any questions that could be on your mind.