[GUIDE] How to * Unlock * Flash TWRP * Root * OnePlus X [Including Oxygen 3.1.3]

Search This thread

the Doctor

Retired Senior Moderator
Dec 15, 2011
4,588
4,526
In the TARDIS
Notice: Rooting your device will break OTAs because they require an unmodified system, so you might want to check for updates before rooting your X. However, there is a workaround:
  1. Boot into TWRP via step 5E below, but DO NOT flash it (step 5D)!!
  2. Do a backup of your completely stock, unrooted ROM
  3. Root the device by flashing SuperSU...zip
When an OTA hits, you can get it by doing this:
  1. Boot into TWRP again without flashing it (same as step 1 above)
  2. Restore your stock, unrooted ROM (from step 2 above)
  3. Apply the update from stock recovery
  4. Backup the unmodified ROM with the update if you want, then re-root as above.

Note: You will lose any changes, mods or app data since you did the backup, but hey, at least the OTA is applied.

If you get stuck with an update that won't flash and you haven't backed-up your unrooted ROM as above, look here:

[Guide] How to Install OTA's with TWRP, and please hit thanks for @SpiritBreak3r :good:


_____________________​


Disclaimer: Rooting does not void the OnePlus X’s warranty, though damaging your hardware (i.e., burning up your CPU by overclocking, hardbricking the device) will. You proceed at your own risk! I accept no responsibility for what you do with your phone. Follow the directions closely, and the odds are you will succeed without any trouble. If you are not sure what you are doing, do some more research before you try. If you get confused with terminology, try looking here for answers or Google it. If you get stuck, post a question in the thread—we're here to help you.


Preliminary steps

1. Make sure that your phone is always charged above 50%!!!
Running out of battery in the middle of flashing something could brick your phone.

2. Make sure that your computer can properly communicate with the device:
We will be issuing commands to the phone from your PC via the USB cable using Android’s SDK tools, in particular ADB and fastboot. If you have not done so already, you must install the following on your Windows computer for this to work:
  1. Java runtime
  2. The Universal Android ADB Driver for Windows.
  3. SDK tools for Android (alternately just ADB & fastboot). Remember where this is installed on your harddrive for later!
You can verify the connection between your PC and phone by running the following procedure:
A. With the phone booted normally, connect it to your computer with the USB cable.
B. Enable Android debugging by going to Settings > About phone and tapping on “Build number” 7 times.
C. Go to Settings > Developer options and check “Android debugging”. A dialogue box will appear asking you to authorize your computer’s RSA fingerprint. Click “Always allow...”
nexusae0_Screenshot_2013-02-12-11-47-41.png

D. Open a command prompt in Windows and navigate to the folder where you put SDK tools for Android (ADB & fastboot) above.
E. Type the following command:
Code:
adb devices
You should get a return like this:
adb-finding-kindle-fire.png

If you cannot get the connection to work:
1. Check your USB connection, then verify that Android debugging is enabled in settings and that your computer’s RSA fingerprint has been authorized.
2. Still not working? Open Device Manager in Windows and make sure that you don’t have a yellow exclamation point next to something like “Android Device” or “One.” This would indicate a driver problem that must be resolved. Try re-installing the Universal Android ADB Driver for Windows, and make sure to restart your computer. Once you’ve rebooted, if you still have a yellow triangle, right-click on the device and select “Update Driver Software,” then “Search automatically for updated driver software.”
3. If you still have a yellow exclamation point, then try forcing the driver to install:
  • In Device Manager, right-click on the device and select “Update Driver Software.”
  • Select “Browse my computer for driver software”
  • Select “Let me pick from a list of device drivers on my computer”
  • Select “ADB Interface” from the list
  • Select manufacturer “Google”
  • Select “Android Testing Interface Version xxx”
  • Click “Next.” If you get a warning, select “Yes” to continue and wait for the driver to install properly.
3. Know how to enter “fastboot mode” on the OnePlus X
To root the device, you must be competent at booting it into fastboot mode. There are two ways to accomplish this:
  1. Power off the phone. Then simultaneously hold down the volume up & power buttons until it vibrates. When done correctly, you will see the words “Fastboot Mode” on a black screen. If not, you dumb-thumbed it, and the device will boot normally into Android. Power off the device and try again.
  2. With the phone running Android normally and Android debugging enabled (see above), open a command prompt in Windows, navigate to the folder where you installed SDK tools (ADB & fastboot) and type:
Code:
adb reboot bootloader


Rooting the OnePlus X

There are three essential steps to rooting the device:
  1. Unlock the bootloader
  2. Flash or boot into TWRP custom recovery [For OxygenOS 3.1.3 use TWRP blu_sp★rk r175]
  3. Flash SuperSU...zip from recovery [For OxygenOS 3.1.3 use SuperSU v2.78 SR1 beta]
However, we're going to add a few more to protect your data and device in case something gets borked.

1. Backup your phone’s data
Unlocking the bootloader will involve doing a factory reset resulting in the loss of all accounts, emails, texts, apps and app data, pictures, music, etc. on the device. Move anything you need to keep onto your PC or a cloud service like DropBox.


2. Unlock the bootloader
2A.Go into Developer Options and enable bootloader unlocking
2B. Boot the device into fastboot mode. (Simultaneously hold down the volume up & power buttons until it vibrates.) You should see a black screen with the words “Fastboot Mode”.
2C. Plug in the USB cable.
2D. Verify that your device is connected with this command:
Code:
fastboot devices
You should get a return like the image above under Preliminary Steps
2E. Unlock the bootloader using the following commands:
Code:
fastboot oem unlock
The device will unlock the bootloader, erase all user data and reboot itself into Android. You will have to set up everything from scratch.


3. Re-enable Android debugging
3A. Re-enable Developer options by going to Settings > About phone and tapping on “Build number” 7 times.
3B. Go to Settings > Developer options. Check “Android debugging” and re-authorize your computer’s RSA fingerprint.


4. Download SuperSU zip
4A. Head over to Chainfire’s CF-Root thread and download the SuperSU access management tool from the “CWM / TWRP / MobileODIN installable ZIP” link. It will probably called something like UPDATE-SuperSU-v2.XX.zip. This zip file will root your device and install the SuperSU access management app in one smooth motion. Hit the thanks button for Chainfire or donate to his Paypal account and buy him a Coke. ;)
NOTE: For OxygenOS 3.1.3 use SuperSU v2.78 SR1 beta
4B. Copy UPDATE-SuperSU-v2.XX.zip to your phone’s SD card.


5. Flash TWRP custom recovery
5A. Download TWRP recovery.
NOTE: For OxygenOS 3.1.3 use TWRP blu_sp★rk r175
5B. Place file you downloaded above to the location where you installed SDK tools (ADB & fastboot).
5C. Boot the device into fastboot mode and connect it to your computer with the USB cable.
5D. In this step, we will replace your stock recovery with TWRP recovery.
Note: This step is optional. If you want to root but preserve stock recovery, skip straight ahead to step 5E below. Thanks @rockuppl for the reminder. :good:

Open a command prompt in Windows and navigate to the folder where you installed SDK tools (ADB & fastboot). Type the following commands:
Code:
fastboot flash recovery twrp-3.0.0-0-onyx.img
5E. Reboot into TWRP recovery with the following command.
Code:
fastboot boot twrp-3.0.0-0-onyx.img
You should now see the custom recovery you just flashed, not the stock recovery.


6. Backup your stock ROM before making any changes
In TWRP press “Backup.” <--- See how simple this is??? ;)

Don’t be a noob—backup your device!!! Right now we don't have stock boot debuggable image files for the OnePlus X, so borking your device could leave you with a nice paperweight until we do. :crying: Restoring from a backup in recovery is easy, and only works if you've backed-up first ;)


7. Root the device
7A. The device should still be in recovery from step 6 above. Go back to the main menu and press “Install,” find UPDATE-SuperSU-v2.XX.zip on the SD card, then flash it.
7B. Reboot the phone. It is now rooted!
7C. Go to the app drawer and open SuperSU. Update the binary if prompted. Its icon looks like this:
supersu-android.png

7D. Download and install Root Checker from the Play Store to verify that you have root access.
 
Last edited:

Savya

Senior Member
Dec 28, 2013
172
81
Bangalore
Yes I already own the phone and I see the bootloader unlock switch in dev options. I also checked the stock recovery which gives options to flash files from phone memory or otg. So it must be fairly easy. But I still don't want to risk it without it being tried and tested. If there were a custom recovery I could have also backed up the factory image. Only choice is to wait and see I guess :(
 
  • Like
Reactions: the Doctor

mjose

Senior Member
Jan 5, 2008
94
11
Earth
@CafeKampuchia
Is it ok to flash supersu.zip with stock recovery.
Before flashing supersu.zip, will unlock bootloader . Will follow the guide from oneplue two procedure to unlock..
 

Knockys

Member
Sep 17, 2015
22
8
Paris
OnePlus 8T
I tried the OnePlus One tutorial to unlock bootloader and root it thanks to this guide.

When it comes to install TWRP, adb tells me it's ok but when I boot into recovery, it's the "official" one that show up.

Even from this recovery, I tried to install the SuperSU.zip, but it keeps telling me it failed, so I think I'll just wait for someone to do it correctly :p
 
  • Like
Reactions: the Doctor

the Doctor

Retired Senior Moderator
Dec 15, 2011
4,588
4,526
In the TARDIS
I tried the OnePlus One tutorial to unlock bootloader and root it thanks to this guide.

When it comes to install TWRP, adb tells me it's ok but when I boot into recovery, it's the "official" one that show up.

Even from this recovery, I tried to install the SuperSU.zip, but it keeps telling me it failed, so I think I'll just wait for someone to do it correctly :p

I wouldn't try flashing a recovery for another device, especially if the stock recovery isn't available.

I'm surprised that supersu wouldn't flash from stock, though.
 

Knockys

Member
Sep 17, 2015
22
8
Paris
OnePlus 8T
I wouldn't try flashing a recovery for another device, especially if the stock recovery isn't available.

I'm surprised that supersu wouldn't flash from stock, though.

Well I thought that TWRP was for all devices and I already went to the stock one before installing TWRP without success to flash SuperSU.

But apprently, installing TWRP the way I did wasn't the right way because I still boot to the stock recovery :/
 

mjose

Senior Member
Jan 5, 2008
94
11
Earth
I tried the OnePlus One tutorial to unlock bootloader and root it thanks to this guide.

When it comes to install TWRP, adb tells me it's ok but when I boot into recovery, it's the "official" one that show up.

Even from this recovery, I tried to install the SuperSU.zip, but it keeps telling me it failed, so I think I'll just wait for someone to do it correctly :p

Hi, after unlocking bootloader, you are not able to update/flash supersu.zip from stock recovery? right?
if it so, then we need to wait for custom recovery to flash root.

Thanks.
 

the Doctor

Retired Senior Moderator
Dec 15, 2011
4,588
4,526
In the TARDIS
Well I thought that TWRP was for all devices and I already went to the stock one before installing TWRP without success to flash SuperSU.

But apprently, installing TWRP the way I did wasn't the right way because I still boot to the stock recovery :/

No, TWRP is definitely not for every device. You have to use the version made for your specific device.
 

Knockys

Member
Sep 17, 2015
22
8
Paris
OnePlus 8T
  • Like
Reactions: mjose

PoloB49

Senior Member
May 9, 2013
74
23
Angers
THIS WORKS! But beware using the recovery imagine provided there as in is in Mandarin, not English. Other than that it works fine! Already rooted :D

Hey i need your help, i installed the custom recovery in Mandarin but i don't understand anything! Could you please tell me where i should go in this recovery to wipe dalvik cache and flash super su? Step by step? Thanks! :D
 

Knockys

Member
Sep 17, 2015
22
8
Paris
OnePlus 8T
Works for me too ! I'll try to install Xposed now ahah !

Hope they'll release TWRP in English soon !

EDIT : Xposed installed and working ! For those who don't know how to do, see here :)
 
Last edited:
  • Like
Reactions: primemonitor

the Doctor

Retired Senior Moderator
Dec 15, 2011
4,588
4,526
In the TARDIS
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    Notice: Rooting your device will break OTAs because they require an unmodified system, so you might want to check for updates before rooting your X. However, there is a workaround:
    1. Boot into TWRP via step 5E below, but DO NOT flash it (step 5D)!!
    2. Do a backup of your completely stock, unrooted ROM
    3. Root the device by flashing SuperSU...zip
    When an OTA hits, you can get it by doing this:
    1. Boot into TWRP again without flashing it (same as step 1 above)
    2. Restore your stock, unrooted ROM (from step 2 above)
    3. Apply the update from stock recovery
    4. Backup the unmodified ROM with the update if you want, then re-root as above.

    Note: You will lose any changes, mods or app data since you did the backup, but hey, at least the OTA is applied.

    If you get stuck with an update that won't flash and you haven't backed-up your unrooted ROM as above, look here:

    [Guide] How to Install OTA's with TWRP, and please hit thanks for @SpiritBreak3r :good:


    _____________________​


    Disclaimer: Rooting does not void the OnePlus X’s warranty, though damaging your hardware (i.e., burning up your CPU by overclocking, hardbricking the device) will. You proceed at your own risk! I accept no responsibility for what you do with your phone. Follow the directions closely, and the odds are you will succeed without any trouble. If you are not sure what you are doing, do some more research before you try. If you get confused with terminology, try looking here for answers or Google it. If you get stuck, post a question in the thread—we're here to help you.


    Preliminary steps

    1. Make sure that your phone is always charged above 50%!!!
    Running out of battery in the middle of flashing something could brick your phone.

    2. Make sure that your computer can properly communicate with the device:
    We will be issuing commands to the phone from your PC via the USB cable using Android’s SDK tools, in particular ADB and fastboot. If you have not done so already, you must install the following on your Windows computer for this to work:
    1. Java runtime
    2. The Universal Android ADB Driver for Windows.
    3. SDK tools for Android (alternately just ADB & fastboot). Remember where this is installed on your harddrive for later!
    You can verify the connection between your PC and phone by running the following procedure:
    A. With the phone booted normally, connect it to your computer with the USB cable.
    B. Enable Android debugging by going to Settings > About phone and tapping on “Build number” 7 times.
    C. Go to Settings > Developer options and check “Android debugging”. A dialogue box will appear asking you to authorize your computer’s RSA fingerprint. Click “Always allow...”
    nexusae0_Screenshot_2013-02-12-11-47-41.png

    D. Open a command prompt in Windows and navigate to the folder where you put SDK tools for Android (ADB & fastboot) above.
    E. Type the following command:
    Code:
    adb devices
    You should get a return like this:
    adb-finding-kindle-fire.png

    If you cannot get the connection to work:
    1. Check your USB connection, then verify that Android debugging is enabled in settings and that your computer’s RSA fingerprint has been authorized.
    2. Still not working? Open Device Manager in Windows and make sure that you don’t have a yellow exclamation point next to something like “Android Device” or “One.” This would indicate a driver problem that must be resolved. Try re-installing the Universal Android ADB Driver for Windows, and make sure to restart your computer. Once you’ve rebooted, if you still have a yellow triangle, right-click on the device and select “Update Driver Software,” then “Search automatically for updated driver software.”
    3. If you still have a yellow exclamation point, then try forcing the driver to install:
    • In Device Manager, right-click on the device and select “Update Driver Software.”
    • Select “Browse my computer for driver software”
    • Select “Let me pick from a list of device drivers on my computer”
    • Select “ADB Interface” from the list
    • Select manufacturer “Google”
    • Select “Android Testing Interface Version xxx”
    • Click “Next.” If you get a warning, select “Yes” to continue and wait for the driver to install properly.
    3. Know how to enter “fastboot mode” on the OnePlus X
    To root the device, you must be competent at booting it into fastboot mode. There are two ways to accomplish this:
    1. Power off the phone. Then simultaneously hold down the volume up & power buttons until it vibrates. When done correctly, you will see the words “Fastboot Mode” on a black screen. If not, you dumb-thumbed it, and the device will boot normally into Android. Power off the device and try again.
    2. With the phone running Android normally and Android debugging enabled (see above), open a command prompt in Windows, navigate to the folder where you installed SDK tools (ADB & fastboot) and type:
    Code:
    adb reboot bootloader


    Rooting the OnePlus X

    There are three essential steps to rooting the device:
    1. Unlock the bootloader
    2. Flash or boot into TWRP custom recovery [For OxygenOS 3.1.3 use TWRP blu_sp★rk r175]
    3. Flash SuperSU...zip from recovery [For OxygenOS 3.1.3 use SuperSU v2.78 SR1 beta]
    However, we're going to add a few more to protect your data and device in case something gets borked.

    1. Backup your phone’s data
    Unlocking the bootloader will involve doing a factory reset resulting in the loss of all accounts, emails, texts, apps and app data, pictures, music, etc. on the device. Move anything you need to keep onto your PC or a cloud service like DropBox.


    2. Unlock the bootloader
    2A.Go into Developer Options and enable bootloader unlocking
    2B. Boot the device into fastboot mode. (Simultaneously hold down the volume up & power buttons until it vibrates.) You should see a black screen with the words “Fastboot Mode”.
    2C. Plug in the USB cable.
    2D. Verify that your device is connected with this command:
    Code:
    fastboot devices
    You should get a return like the image above under Preliminary Steps
    2E. Unlock the bootloader using the following commands:
    Code:
    fastboot oem unlock
    The device will unlock the bootloader, erase all user data and reboot itself into Android. You will have to set up everything from scratch.


    3. Re-enable Android debugging
    3A. Re-enable Developer options by going to Settings > About phone and tapping on “Build number” 7 times.
    3B. Go to Settings > Developer options. Check “Android debugging” and re-authorize your computer’s RSA fingerprint.


    4. Download SuperSU zip
    4A. Head over to Chainfire’s CF-Root thread and download the SuperSU access management tool from the “CWM / TWRP / MobileODIN installable ZIP” link. It will probably called something like UPDATE-SuperSU-v2.XX.zip. This zip file will root your device and install the SuperSU access management app in one smooth motion. Hit the thanks button for Chainfire or donate to his Paypal account and buy him a Coke. ;)
    NOTE: For OxygenOS 3.1.3 use SuperSU v2.78 SR1 beta
    4B. Copy UPDATE-SuperSU-v2.XX.zip to your phone’s SD card.


    5. Flash TWRP custom recovery
    5A. Download TWRP recovery.
    NOTE: For OxygenOS 3.1.3 use TWRP blu_sp★rk r175
    5B. Place file you downloaded above to the location where you installed SDK tools (ADB & fastboot).
    5C. Boot the device into fastboot mode and connect it to your computer with the USB cable.
    5D. In this step, we will replace your stock recovery with TWRP recovery.
    Note: This step is optional. If you want to root but preserve stock recovery, skip straight ahead to step 5E below. Thanks @rockuppl for the reminder. :good:

    Open a command prompt in Windows and navigate to the folder where you installed SDK tools (ADB & fastboot). Type the following commands:
    Code:
    fastboot flash recovery twrp-3.0.0-0-onyx.img
    5E. Reboot into TWRP recovery with the following command.
    Code:
    fastboot boot twrp-3.0.0-0-onyx.img
    You should now see the custom recovery you just flashed, not the stock recovery.


    6. Backup your stock ROM before making any changes
    In TWRP press “Backup.” <--- See how simple this is??? ;)

    Don’t be a noob—backup your device!!! Right now we don't have stock boot debuggable image files for the OnePlus X, so borking your device could leave you with a nice paperweight until we do. :crying: Restoring from a backup in recovery is easy, and only works if you've backed-up first ;)


    7. Root the device
    7A. The device should still be in recovery from step 6 above. Go back to the main menu and press “Install,” find UPDATE-SuperSU-v2.XX.zip on the SD card, then flash it.
    7B. Reboot the phone. It is now rooted!
    7C. Go to the app drawer and open SuperSU. Update the binary if prompted. Its icon looks like this:
    supersu-android.png

    7D. Download and install Root Checker from the Play Store to verify that you have root access.
    8
    I've requested the OP for an English version and hopefully he'll post a link soon.
    And that's okay you can thank me later xD
    I have english version repacked from original source

    https://www.dropbox.com/s/zypo7b41lvj0r2h/en-recovery-twrp-onyx-.img?dl=0
    6
    Thanks, If you could share only the recovery backup that would be helpful :)

    Uploaded 2 Stock recovery backups. One is from TWRP and the other is taken from Flashify.
    5
    Does this support oxygen OS 3.1.4

    I've just rooted my OPX running oxygen 3.1.4 following the protocol from the Doctor (first post of this thread)
    I've used :
    - 15 seconds ADB Installer v1.4.3 http://xdaforums.com/showthread.php?t=2588979
    IMPORTANT (I first missed these steps and lost a lot of time :eek: ) :
    * Go to Settings > About phone, and then tap ‘Build number’ 7 times or until you get the message ‘You’re now a developer!’.
    * Go back to Settings, choose ‘Developer options’. Find the ‘USB debugging’ option and use this toggle button to enable it. Accept warning by tapping on OK button.
    * Also in the ‘Developer options’. Find the ‘OEM Unlocking’ option and use its toggle button to enable it. It asks for your PIN/Screen unlock code, type it. Then accept the warning by tapping on OK button.

    - Flash this twrp recovery by blu_spark for the new bootloader found here: http://xdaforums.com/devd...t/dl/?id=20236

    - Flash SR4-SuperSU-v2.78-SR4-20161115184928-SYSTEMLESS.zip from recovery (found here : http://xdaforums.com/attachment.php?attachmentid=3939651&d=1479393635 )

    Enjoy :)

    Cheers from France