How to Root Nexus 5, 5X, 6, and 6P
Rooting gives apps and system tools elevated access to Android, but it does not install a newer Android version or automatically improve performance. The Nexus 5, 5X, 6, and 6P use different factory images, so first identify your exact model and Android build; the general process is to unlock the bootloader, install a compatible recovery or patched boot image, and verify root.
What You’ll Need
- The phone, its USB cable, and a computer with Android Platform Tools (ADB and Fastboot) installed from the Android developer site.
- A full backup: unlocking the bootloader erases the phone. Copy photos, files, authenticator recovery information, and anything else important off the device.
- At least 60% battery, a reliable USB port, and the correct USB driver if using Windows.
- The exact model identifier and build number, plus files made for that model and Android version. The Nexus 5 is hammerhead, 5X is bullhead, 6 is shamu, and 6P is angler; do not rely on the product name alone.
- A root method that explicitly supports your device and Android build. A commonly used approach on supported older builds is a compatible custom recovery and a matching root package, or a patched boot image. These files are not interchangeable.
Step-by-Step
- Confirm the model and software. On the phone, open Settings > About phone and note the model and build number. Check the bootloader or device information too if available. Download only files whose device and Android version match. These Nexus models are old, and current root tools may no longer support every build; stop if the instructions do not name your exact combination.
- Back up everything and prepare the phone. Save important data elsewhere and make sure you can restore access to your accounts. Charge the phone. In Settings > About phone, tap Build number seven times to enable Developer options, then open Settings > Developer options and enable OEM unlocking if the option exists. Also enable USB debugging. Menu wording can differ by Android version.
- Install and check Platform Tools. Install ADB and Fastboot on the computer, extract the downloaded files, and open a terminal or command prompt in that folder. Connect the unlocked, booted phone and accept the USB debugging prompt. Run
adb devices; the device should appear as authorized. If it says unauthorized, unlock the phone and accept the prompt. On Windows, install an appropriate USB driver if no device appears. - Enter the bootloader and verify the connection. Run
adb reboot bootloader. Alternatively, power off and use the device’s hardware button combination for bootloader mode; combinations differ by model. The bootloader screen should identify the device. Runfastboot deviceson the computer. Do not continue unless it lists a serial number. - Unlock the bootloader. Read the on-screen warning and confirm that you accept a complete data wipe. Depending on the bootloader and tool version, the command is commonly
fastboot flashing unlock; older devices may usefastboot oem unlock. Use the command specified for your device, not both by guesswork. Confirm the unlock on the phone’s screen. It will erase user data and may show an unlocked warning at startup. - Boot or install the matching recovery or boot image. Follow the chosen root method’s device-specific instructions. Some methods temporarily start recovery with
fastboot boot recovery.img; others install it using a command documented for that recovery and device. Replace the example filename with the exact downloaded filename. If using a patched boot image, patch the image from the matching factory build and flash it only as its instructions specify. Never flash a file simply because it is labelled “Nexus.” - Apply the root method. For a recovery-based method, transfer the compatible root package to the phone or use recovery’s sideload option, then select the package and confirm. For a patched-image method, follow its documented patch and flash sequence. Do not combine methods or install an outdated package from an unverified mirror. If the instructions require formatting data or wiping a partition, understand that consequence before confirming.
- Restart and verify. Reboot Android, allow the first start to finish, and install the root manager only from the method’s trusted source. Use its status check or a reputable root-checking tool to confirm access. Grant root only to apps you trust. Restore your backed-up files after confirming the phone starts and works normally.
Common Mistakes
- Using a factory image, recovery, or boot image for a different Nexus model or build. A close-looking filename is not proof of compatibility.
- Unlocking before backing up. The wipe is expected, not a recoverable glitch.
- Skipping OEM unlocking, USB debugging authorization, or the Fastboot connection check.
- Following commands written for a different Android generation. Fastboot command support varies, so follow device-specific instructions.
- Assuming an unlocked bootloader means the phone is rooted. Unlocking permits flashing; root must be installed separately.
Tips
- Keep a copy of the matching factory image and the exact files used, along with the steps needed to restore stock software.
- Read the entire method before running commands. Confirm the current folder and filename before flashing anything.
- Root reduces Android’s normal protection when an app receives elevated access. Deny requests you cannot explain, and remove root if you no longer need it.
- Rooting can affect security updates, app compatibility, and device support. These Nexus models no longer receive routine current Android updates, so rooting does not make them current or secure by itself.
Troubleshooting
adb devices shows nothing: Try another data-capable cable and USB port, unlock the screen, accept the debugging prompt, and check the computer’s USB driver. Restart ADB with adb kill-server followed by adb start-server.
fastboot devices is blank: Confirm the phone is on its bootloader screen, not in Android or recovery. Try another port, avoid hubs, and check the Fastboot driver on Windows. Do not flash until the device is detected.
Unlock is rejected or OEM unlocking is unavailable: Check whether the bootloader is already unlocked and whether the device permits unlocking. Some carrier or region variants may restrict it. Do not try to bypass a restriction; use the manufacturer’s documented options, if available.
The phone boot-loops or recovery says the package is incompatible: Stop repeating the flash. Recheck the model codename and build, then use the matching stock image or recovery instructions to restore the phone. A factory restore can erase data; only proceed if you have the right image and understand the documented procedure.
Root does not verify: An unlocked bootloader alone is not root. Check that the correct method completed, that Android fully restarted, and that the root manager matches the installed method. Avoid installing several root packages over one another.
Frequently Asked Questions
Does rooting erase my data?
Unlocking the bootloader normally performs a factory reset. Back up anything important before unlocking; later steps can also cause data loss if the wrong image or wipe option is used.
Are the steps the same for all four Nexus phones?
No. The broad sequence is similar, but images, recovery files, commands, and supported Android builds differ. Use instructions for the exact model: Nexus 5, 5X, 6, or 6P.
Will rooting install a newer Android version?
No. Root changes access permissions. A custom ROM is a separate installation with its own device support and risks.
Can I undo root?
Often, but the method depends on how the phone was rooted. You may need to restore the matching stock boot image or factory image. Restoring stock software can wipe the phone, so follow model-specific recovery instructions.
Is rooting risk-free?
No. An incorrect flash can prevent Android from starting, and root can weaken security or break apps. Verify every file and command before proceeding.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.