How to Unroot the Google Pixel & Pixel XL

Need to unroot your Pixel or Pixel XL? Maybe you’ve taken rooting too far and now need a clean slate? Maybe you need to sell the phone? Either way, it’s pretty easy to get it all back to stock.

Thanks to Google providing us with the firmware on their own site (since it is a Google built device), it comes down to just flashing that and relocking the bootloader using some commands in ADB.

If you’re ready, here’s how to unroot the Pixel or Pixel XL.

Before You Begin

  1. You should’ve rooted your device using our how to root the Google Pixel & Pixel XL procedure.
  2. This procedure has been written keeping Windows as the host OS.
  3. This will get your device back to the stock firmware so please backup everything that you wish to keep.
  4. This will also re-lock the bootloader on your device.
  5. You should have set up ADB on your PC before you can do this procedure.

Unrooting the Google Pixel & Pixel XL

Unroot-PIxel-XL

To unroot the device, you’ll flash the stock system image on the phone and then re-lock the bootloader using the standard bootloader re-locking method. Here’s how to do that.

Downloading Required Files

download-factory-image

  1. Download the Factory Image for your device and save it to your desktop.
    Factory Image for Pixel & Pixel XL (Download the one that is for your device)

Unrooting the Google Pixel & Pixel XL

    1. Extract files from Factory Image over to the ADB folder located in the C:/ drive of your PC.
      copy-image
    2. Head to Menu > Settings > About phone on your device and tap on Build number for 7 times to unlock the developer menu.
      build-number
    3. Head to Menu > Settings > Developer options and turn on USB debugging.
      usb-debugging
    4. Plug in your device to your PC using a USB cable.
      plug-in-device
    5. Open the ADB folder on your PC and hold down Shift on your keyboard and right-click anywhere on your screen and select Open command window here.
      cmd
    6. Type in the following command into the command prompt window and hit Enter (your device will reboot into bootloader mode after that):
      adb reboot bootloader
      reboot-bootloader

 

  1. Next up, type in the following command into the command prompt window and press Enter:
    flash-all.bat
    flash-all
  2. It will launch the file that will flash all of the factory image files on your device. Wait for it to finish flashing all the files.
    finished

Your device will reboot when the firmware has been fully flashed.

You may now wish to re-lock the bootloader on your device. Here’s how to do that:

Re-locking the Bootloader on the Google Pixel & Pixel XL

  1. Turn off your device.
    turn-off
  2. Hold down Volume DOWN and Power buttons together for a few seconds.
    volume-down-power
  3. Your device will reboot into the bootloader mode.
    bootloader-mode
  4. Plug in your device to your PC using a USB cable.
    connect-usb
  5. Open the ADB folder on your PC and hold down Shift on your keyboard and right-click anywhere on the screen and select Open command window here.
    cmd
  6. Type in the following command into the command prompt window and press Enter:
    fastboot oem lock
    oem-lock
  7. Follow the on-screen instructions to re-lock the bootloader on your device.
    relocking-bootloader

The bootloader on your Google Pixel or Pixel XL should now be re-locked.

Done! Let me know in the comments below how it went for you or if you need help!

Related Items: , , ,

Join 90k others & subscribe to my weekly, not annoying newsletter for more tech!

* indicates required
  • Marlon Drake

    im getting an error when running fash-all.bat saying there not enough space for image-marlin zip file. Do you have a fix?

    • Means you need to clear some storage on the phone.

      • Josh Raven

        Hey I am having the same problem, I am running the rom resurrection remix and i have deleted as much storage and memory as possible and still getting the same error, I am new to the pixel xl and in need of your help please!

        • It simply means what it says. You might want to check your file explorer on the device and look for larger files like backups that might not show up normally in the system settings but are taking up space and delete them.

          • Josh Raven

            Thanks, I was able to return it to stock by using the unified toolkit.

          • So glad to hear that worked!

          • Tyler Clinger

            hey david, I have a question for you. I could really use your help. sorry for the trouble

          • Go for it, Tyler.

          • Brendan Grant Jones

            I too get this same error, however, I have 100 gb of free space, and ive tried again after erasing all the phone data and trying from fresh. Any ideas?

          • You have 100 gbs where? On an SD card or the internal storage?

          • Brendan Grant Jones

            internal, I have the 128 GB Pixel XL

          • Confused

            I have the same issue with Pixel. Can’t get this to work. More, when I check internal memory with file explorer, all folders have gibberish names as well as their contents. There’s nothing of the standard folders like Download, Music, DCIM, etc. How am I supposed to flash back original stock when I keep on getting this no memory message?

          • Brendan Grant Jones

            I received this phone already rooted. I’ll try to give you as much info as I possibly can to see if it helps
            Android Version: 7.1.1
            Android Security Patch: March 5 2017
            Baseband Version 8996-012511-1611190200
            Kernel Version: 3.18.31-PureKernel-Pixel-1.0.3
            nate@buildMachine-Z170S #1
            Fri Mar 17 20:43blahblahblah
            PureNexus Version: 7.1.1-20170317-OFFICIAL
            Vendor Version: NOF26V
            Build Number: NOF27C

          • Brendan Grant Jones
  • Sarim Ahmad

    When I do it, at the end it says
    archive does not contain boot.sig
    archive does not contail recovery.img
    please help i can not unroot

    • Not sure what model you have, but sometimes it doesn’t contain those things and it just continues. Otherwise if it won’t continue, you need to redownload the firmware as it could have been corrupted.

      • Sarim Ahmad

        Yeah i unrooted it, thanks alot

        • OK, glad to hear!

        • Aamir Ashraf

          How did you fix it? I’m getting the same error

  • Aamir Ashraf

    When I do “flash-all.bat” it says permission denied.
    I’m doing this on a mac. Can someone help?

iPhone Screens and Light Kits on sale for a limited time! Head to the shop to check it out! Dismiss