In this guide, we will show you the steps to extract or decrypt the OnePlus OPS firmware file. Different OEMs pack their firmware files in different formats. When it comes to the smartphone giants OnePlus, they have it encapsulated under the payload.bin file. So if you wish to flash the stock firmware via Fastboot Commands or are looking to get hold of the stock boot.img file to patch it via Magisk for rooting purposes, then you would have to decrypt this BIN file.
However, that isn’t the only firmware that OnePlus has. It also comes with an OPF Firmware that is flashed via the MSM Download Tool, when your device is booted to the Emergency Download Mode. And as of now, there are many users who are looking to get hold of the contents of this firmware, mainly because of the prog_firehose_lite.elf or prog_firehose_ddr.elf files that it beholds.
Along the same lines, you will also be getting all the required partitions files for your device in MBN, IMG, BIN, and ELF formats. You could then flash it via their associated fastboot commands and bring your device back to life. Well, there could be a plethora of reasons why you might need to extract or decrypt the OnePlus OPS firmware file. So without any further ado, let’s check out how it could be carried out.
How to Extract/Decrypt OnePlus OPS Firmware
The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned.
STEP 1: Install Python
First and foremost, you will have to install Python onto your PC. Here’s how it could be done:
- Head over to Python’s official site and download its latest version
- Then double click on its EXE file to launch the setup.
- Make sure to check-mark the Add Python to Path option situated at the end.
- Then click on the Install Now button and follow the on-screen instructions to proceed with the installation.
- Once the installation is done, click on Disable Path Lenght Limit as well.
That’s it. Python is now successfully installed onto your PC. You may now move over to the next step of this guide to extract or decrypt the OnePlus OPS firmware file.
STEP 2: Download OnePlus OPS Firmware
- Next up, you will have to get hold of your device’s OPS firmware. For that, you may refer to the XDA Developer site.
- You might not be able to get just the individual OPS file, rather you would have to download the entire MSM Download Tool. Make sure to download the one that corresponds to your region.
- Once downloaded, extract the tool to any convenient location on your PC. Doing so shall give you a few files, including the required OPS firmware.
- Rename this firmware file to ‘oneplus’, so that the complete name becomes oneplus.ops.
- Once the rename is done, transfer it to the folder where you have installed Python [default directory: C:\Users\UserName\AppData\Local\Programs\Python\Python version number].
STEP 3: Download OPS Decrypt Tool
- Now, download the OPS Decrypt Tool from GitHub, whose direct link has been shared as well: Direct Download Link.
- Do note that the name of the tool is Oppo Decrypt Master, but it works for the OnePlus OFP file as well.
- Moving on, once you have downloaded the tool, extract it inside the same location where you have installed Python.
STEP 4: Extract/Decrypt OnePlus OPS Firmware
- To begin with, make sure that the Python installation directory has the extracted OPS Decrypt Tool and the OPS firmware file.
- If that’s well and good, then head over to this folder’s address bar, type in CMD in its address bar, and hit Enter.
- This shall launch the Command Prompt. Now type in the below command to install the required dependencies:
python -m pip install -r requirements.txt
- If the above command doesn’t work out, then you may also try the below one:
pip3 install -r requirements.txt
- Finally, execute the below command to extract the OnePlus OPS firmware:
python opscrypto.py decrypt oneplus.ops
- The process will now begin and could take a couple of minutes. Once done, you shall be notified of the same.
- You may then head over to the extract folder present inside the Python installation directory and get all the extracted OPS firmware files.
So with this, we round off the guide on how to extract or decrypt the OnePlus OPS firmware file. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.
2 thoughts on “How to Extract/Decrypt OnePlus OPS Firmware”
having trouble extracting with python as the mmap error tells me that the c int file too long to parse. im only on a chromebook currently and the internals arent upgradeable to enhance memory. any advice? i get some files but sitting stuck with the super.img
Extract error. Reinstalled different versions of Python, same result. It is necessary to review the opscrypto.ry file for matching errors……
Traceback (most recent call last):
File “opscrypto.py”, line 736, in
File “opscrypto.py”, line 563, in main
xml = extractxml(filename, key)
File “opscrypto.py”, line 404, in extractxml
with mmap_io(filename, ‘rb’) as rf:
File “opscrypto.py”, line 40, in mmap_io
return mmap.mmap(file_obj.fileno(), length=0, access=mmap.ACCESS_READ)
ValueError: mmap length is too large