To please the likes of our mod and rooted androids, OnePlus has made OnePlus 5 and 5T relatively easy to customize - so much so that 5T tops our list for best phones for rooting. Unfortunately, opening the bootloader and using root to modify the firmware on OnePlus 5 or 5T you create a new firmware update like Oreo when compared to stock.
Returning OnePlus 5 or 5T to stock to update it to the latest version of Android OxygenOS can end up bricking your phone if done incorrectly. Because of this, we've covered each step of the process below to help you through this hurdle. As long as you read and follow the steps carefully, you will enjoy all that Android Oreo has to offer on your OnePlus 5 or 5T in no time!
Requirements
- OnePlus 5 or 5T with unlocked bootloader
- Windows, Mac, or Linux computer
- USB data cable
Find Your Current Firmware Version
First, first you should find your phone's firmware version. This is a very important step, as downloading the latest OxygenOS may fail to install correctly no matter how many times you try. In other words, you want to reinstall your current firmware from scratch to overwrite any changes you make with root or custom recovery, then you can receive OTA updates.
To find the current firmware version of your phone, just go to Settings and tap "About Phone" at the bottom of the menu. From there, note the number under "OxygenOS version."
Download Your Stock Firmware
Once you find the right OxygenOS and Android version for your OnePlus 5 0r 5T, head to one of the links below on your phone.
From there, scroll down and look through available firmware versions (you may have to put your phone in landscape mode to view it). Find the one that matches your current version of OxygenOS (you may have to return multiple pages), then select it. Finally, tap "Continue to Download", then scroll down to the bottom of the next page and press "Download". The firmware file is rather large (1-2 GB), so it will take at least a few minutes to download.
Download a Stock Recovery Image for your Device
This step is very important if you have special recovery like TWRP installation, because OnePlus's Firmware does not have a stock recovery image. If you are already using your OnePlus 5 or 5T stock recovery, you can skip this section and move on to the next step.
That said, here's the stock image recovery file for OnePlus 5 and 5T. Download the file from your computer, then move it to your desktop, because you want to easily access it later.
Install ADB & Fastboot on your Computer
This step can be a bit intimidating if you are new to ADB and Fastboot, but if you are already familiar with the process, you can go directly to Step 5.
You do not need ADB during this process, but you need Fastboot, and two utilities are combined together. So, go to the following guides for detailed guidance on installing ADB and Fastboot, then come back here and return to Step 5.
Open the Fastboot Command Window
Next, you have to open a command window on your computer, that's how you send the fastboot command to restore the stock recovery image and lock your bootloader on your device. The tricky part is ensuring that the command window opens to the right directory.
If you're using Windows, hold down the Windows key on your keyboard, then hit the "R" button. From there, type "cmd" into the prompt and hit enter.
If you're using a Mac or Linux machine, you just have to open the Terminal app. Tip for Mac users: Press command and space simultaneously, then type "Terminal" into Spotlight search and hit enter.
With the command window open, it's time to change the directory - here's the hard part. You must run this command from the platform-tools folder in your ADB installation directory, which will vary depending on how you install ADB.
So locate your hard drive for the platform-tools folder - most built-in file browsers (like Windows Explorer) will have a search bar in the top right corner, so just type "platform tools". Once you find the folder, copy its full location, which should look like this, depending on your operating system:
C:\Program Files (x86)\Android\android-sdk\platform-tools
Once you find the complete location of the platform-tools folder, type "cd" into the command prompt, then add a space. Finally, paste the full folder location to the prompt and press enter. The end result will look like this:
cd C:\Program Files (x86)\Android\android-sdk\platform-tools
Put Your Phone into Bootloader Mode
With Fastboot and running on your computer you now need to put your OnePlus 5 or 5T into bootloader mode, which is the mode that accepts the Fastboot command and allows you to filter the image.
To do so, turn off your device, then press both the power button and the volume key down simultaneously and hold it until your phone boots. From there, use the volume buttons to highlight the "Fastboot" option, then press the power button to select it. Once you get to the Fastboot screen, connect your phone to your Mac or PC using a USB data cable.
Check Fastboot Connection
You should now ensure that you have established a relationship between OnePlus 5 or 5T and your Mac or PC. So in your computer terminal, type fastboot device and hit enter. The command prompt must now show a series of numbers and letters followed by the word "fastboot." If so, you can move on to the next step. If not, go back to Step 4 and check again to make sure your installation runs without a hitch.
Note: Mac, Linux, and Windows PowerShell users may need to add a period and a slash (./) to the beginning of any commands listed here (e.g., ./fastboot devices).
Flash Stock Recovery Image
If you installed TWRP after opening your OnePlus 5 or 5T bootloader, it is now time to take a picture of the original stock recovery that you downloaded earlier in Step 3.
With your device in Fastboot mode and connected to your Mac or PC, open an open terminal on your computer and type fastboot flash recovery - but do not go in first.
Instead, add a space after what you just typed, then grab the recovery.img file you downloaded earlier from the desktop, and drag and drop it into the terminal window to add the full file location and complete the command.
With full command entered correctly now, hit enter to flash recovery, then type fastboot reboot-bootloader and press enter once again to complete flashing.
Note: Mac, Linux, and Windows PowerShell users may need to add a period and a slash (./) to the beginning of each command listed here (for example, ./fastboot flash recovery).
Boot into Recovery Mode
After stock recovery is released to your OnePlus 5 or 5T, you now need to make preparations to reinstall the stock firmware to bring your device back to its factory state.
To get started, turn off your device, then press the power and volume down buttons simultaneously, and release once you see the OnePlus boot screen appear. You should now be taken to the boot menu of your device, so press "English" or choose the volume and power buttons to select and confirm to get into recovery.
Reinstall Stock Firmware
Once inside the recovery screen select "Install from Internal Storage," then select the stock firmware file you downloaded back in step 2. You will now be taken to the page to confirm the installation of the package, so choose "Yes" to flash the firmware. to your OnePlus 5 or 5T. The process is automatic, so sit back and wait until the installation is complete, then proceed to the final step once it's done.
Re-Lock your Bootloader
Before starting with the last step, it is very important to record bootloader lock on Oneplus 5 or 5T You will delete all data in your device, so if you have important file you want to save, do before doing this step.
That said, to lock your bootloader on OnePlus 5 or 5T, turn off your device and go back to Bootloader mode as described in Step 6, and reconnect it to your Mac or PC. Now, type fastboot oem key in terminal window (or ./fastboot oem key for some computers) and hit enter. OnePlus 5 or 5T You will now try you want to lock your bootloader, so use the volume buttons to select "Yes" and press the button to confirm. After that, reboot your phone and you will be ready!
With OnePlus 5 or 5T returning to 100% factory state, you can now successfully update your device to Android Oreo by using the standard "Check for updates" button in Settings. If you are experiencing any issues at this time, please let us know in the comments below and we will point you in the right direction.