Video: How to Unroot the OnePlus X

You’ve rooted your phone maybe you’ve been tinkering a bit too much with your OnePlus X? Maybe you need to send it to OnePlus for warranty reasons but with root access you’re worried they’ll refuse to do the warranty repairs? If you find yourself in either of these situations, it’s probably best to unroot the OnePlus X before you do anything else.

Unrooting the phone is the process of flashing the device’s stock firmware and getting it back to the way it was when you first received it. Besides reinstating your warranty in most cases, this will also solve any weird issues you are having with the phone (whether self-inflicted or not).

If you need to get it back to the way it was when you first bought it, here’s how to unroot the OnePlus X.

Before You Begin

  1. This is going to erase the phone so make sure to backup anything you think you need to keep.

Unroot the OnePlus X

  1. First up we need to download the necessary files including the stock ROM that contains the ColorOS version of Android that normally comes on the phone and the stock recovery image (that we will use to flash the stock ROM). Download each and save them to the desktop of your computer.

Stock Recovery

Stock ROM

Installing ADB Drivers on Your PC

If you haven’t rooted the phone or haven’t done my tutorial on it, please do the following to get the drivers installed as well as ADB/Fastboot so we can use them to flash the recovery.

  1. Download the OnePlus ABD Drivers and then run the exe to install the drivers.
  2. To get ADB and Fastboot working (things we need to be able to communicate with the phone from our computer), head to my new How To Setup ADB/Fastboot Tutorial. This will show you how to set it all up on Windows or Mac (don’t worry it’s quick and easy). Once done with that, return here to this tutorial to continue.

Flash the Stock Recovery

Stock Recovery on OnePlus X

  1. On the phone, head to Menu > Settings > About phone and tap on Build number for 7-8 times and it’ll say you’re a developer. The developer options menu should now be unlocked on your device (if it wasn’t already there from rooting).
  2. Head to Menu > Settings > Developer options on your device and turn on USB debugging.
  3. Plug the phone in via USB.
  4. In the command prompt from before on the computer, type in the following command and hit enter:
    adb push recovery.img /sdcard/recovery.img
    adb push update.zip /sdcard/update.zip
  5. adb reboot bootloader
  6. Once it reboots into bootloader mode, type in the following command and hit enter:
    fastboot flash recovery recovery.img
  7. Wait for it to flash the stock recovery on your device then type the following command into command prompt and hit enter:
    fastboot reboot

Flash the Stock ROM

Stock ROM on OnePlus X

Those keen eyed readers might have noticed that we sent the stock ROM to the phone’s storage when we sent the recovery (adb push stockrom.zip /sdcard/stockrom.zip) so now we need to flash it.

  1. Turn off the phone.
  2. Turn it back on by holding down Volume Down and Power and keep holding them until we get to the Android with his stomach open screen.
  3. Tap power a few times to get the menu to come up.
  4. Using the volume buttons to navigate and power to select choose Update and wait for it to flash.
  5. When it’s done it should reboot and you’re now all stock. Go through the normal setup process to get back to the home screen. Lastly, we can relock the bootloader to make sure that we are completely back to the way the phone was when we took it out of the box.

Relock the Bootloader

  1. Turn the phone off.
  2. Turn it back on by holding down Volume Up and Power at the same time until it boots into bootloader mode.
  3. Plug it in via USB to the computer.
  4. In command prompt, type the following with hitting enter at the end of the line:
    fastboot oem lock
  5. After that the phone will relock the bootloader and to reboot it type the following with hitting enter at the end of the line:
    fastboot reboot
  6. All done!

Let me know if this worked for you in the comments below!

Related Items: , ,

55 thoughts on “Video: How to Unroot the OnePlus X”

  1. I’m trying this on my OPX that I recently received used. I cant update the phone because it recognizes the phone as being “rooted”

    upon trying this, I get to the “fastboot flash recovery recovery.img” and the command prompt says “device not unlocked, cannot flash or erase”
    whats my issue here?

      1. I ended up finding my answer after a few minutes of investigating online, thank you though. This video made my life a lot easier and helped save this phone!

      2. i unlocked my bootloader, but it still says “device not unlocked, cannot flash or erase” after the command “fastboot flash recovery recovery.img” – can anyone help?

  2. My OPX is stuck in bootloop. In think it’s softbricked. I was successful at root, idk what happened I tapped power to reboot be the screen hung a bit and now it won’t boot up, help!!!

  3. Béla Guttmann

    I’m stuck in the “device not unlocked, cannot flash or erase” . I tried the command “fastboot oem unlock” but nothing. Maybe i’m doing something wrong but i’m not sure what it is. Can you help me please?

      1. Béla Guttmann

        I’m trying to flash the stock recovery. And the command i’m putting in is : fastboot flash recovery recovery.img.

        1. Ok, get back to the normal home screen and go to Settings > Developer Options and check that OEM Unlocking is Enabled. Once it is, with the phone plugged in to the computer, type the followign with hitting enter at the end of each line:

          adb reboot bootloader
          fastboot oem unlock

          Then select yes on the phone when prompted, it’ll reboot and erase itself at this point.

          Then, with it still plugged in, continue from step 4 under Flash the Stock Recovery.

          1. Béla Guttmann

            When i type fastboot oem unlock and then i hit enter the phone restarts in to the custom recovery.

          2. So your bootloader is not unlocked but you have a custom recovery? You relocked it after you flashed the recovery originally when you rooted the phone? Why would you do that?

            The only thing you can do is do fastboot oem unlock and get it to bring up the fastboot unlocking screen so you can unlock the fastboot then continue. Sorry I can’t help you further than this, you’ll have to look around and see if anyone else has had this unique issue.

            Sorry, good luck!

  4. when i am installing paranoid android using twrp, the screen freezs. the log stucks at “patching system image unconditionally”

    1. Did you wipe data in recovery before flashing it? You need to as well as wipe cache too. Honestly though this has nothing to do with this tutorial and has everything to do with the specific ROM you are flashing so you’d really need to ask that specific ROM developer for help with his ROM. Make sense?

  5. on my phone recovery mode i am installing the update.zip file, but after i clicked the power button to install it its only displaying the one plus logo on the screen. how much time it usually takes to install the update.zip fle

  6. I made the mistake of attempting to install an OTA update with my rooted OnePlusX and the phone went to the custom recovery. So from there I tapped on ‘Install’ and then the ‘SuperSU.zip’ as in the ‘How to Root the OnePlus X’ video. The phone then booted normally but seems to have lost the root according ‘Root Checker’ app. Would it be okay to use the tutorial above to unroot the phone assuming it’s still rooted?

  7. Should i again flash the stock rom even if i am already on the stock rom ??? and if not then after flashing recovery should i wipe my user data?

  8. i did the rooting as shown in your video but now iwant to unroot and when i flash the recovery it says failed coz bootloader is locked. i tried fastboot oem unlock bt it opens twrp only and does not erase the data…. How should i unlock the bootloader again

    1. Not sure how you relocked your bootloader after being rooted… You can go do the how to root tutorial and get to the point where the bootloader is unlocked again then come back here and do this from the beginning.

  9. Alexander Müllender

    I follow your guides for rooting and unroot the OnePlusX, but when I try the “flashboot flash recovery recovery.img”, I get “FAILED (remote: Device not unlocked cannot flash or erase).

  10. hey dav,
    im unrooting my phn and im getting dis error, when im booting recovery.img in fastboot
    error ” FAILED (remote: dtb not found)

    can u plz help me wit dis thnaks

  11. hey dave, if i try to do the fastboot to recover the stock recovery, i always get this (i tried multiple times, so that’s why the push isnt there)

      1. My opx had oxygen os 2.2.1 when it came out of the box . I tried flashing Oxygen os 3.1.3 using TWRP but it showed an error saying your device model is ONE instead of the expected OnePlus . So planning to use your method to unroot phone

  12. Everything works great, however, you need to use the latest version of OPX stock recovery from the Oneplus site to have the recovery work. Thanks a lot.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.