Welcome back, buddies! Today ai brought you another tutorial in the extraction series. The title is how to extract the stock boot.img from the OnePlus OxygenOS stock ROM. And you can proceed according to this guide if your OnePlus device has its stock firmware in payload.bin format. As almost all OnePlus devices have the same format, you are lucky!
There is another thing you need to keep in mind. That is the firmware will be in a ZIP format soon after downloading. But you won't get files like boot.img, vendor.img, system.img like files after extracting. Instead, you will get a compatibility ZIP file, a META-INF folder, a text file, the payload.bin file, and a PB file. So, where would be the IMG files? They are in the payload.bin file. But you cannot extract them using WinZip or WinRAR. That's where Python and Decrypt Tool come into play. And I am going to teach you how.
Why Extract OnePlus OxygenOS Stock Firmware Payload.bin?
As you are already aware, the open-source nature of Android Devices facilitates a wide range of tweaks and experiments. You can customize the device as you wish. And if you are a tech expert, you can even try unlocking the bootloader of the phone and then flash custom ROMs even. Similarly, you can install custom recoveries like TWRP, gain access to system partitions by rooting the device.
When we are talking about rooting a device, there are two main methods of doing that. Either using TWRP and without TWRP. If you are using TWRP, you must flash the Magisk Installer ZIP. On the other hand, if you are not using TWRP Recovery, the process requires the extraction of the stock boot.img file and some lengthy steps. So, why can't you use the first method? Without TWRP? Sadly, that is not possible all the time. Because only some android devices have built-in TWRP.
And OnePlus devices still don't have a built-in TWRP. Therefore you should use the method without TWRP. As we are teaching you how to extract the stock boot.img from the OnePlus OxygenOS stock ROM, you need to patch the stock boot.img file via Magisk and then flash it using fastboot commands.
How to Extract Stock Boot.img from OnePlus OxygensOS Stock ROM
Before proceeding with the steps, there are some prerequisites you have to fulfill. Just complete them beforehand.
- Firstly you need to download the Payload Dumper Tool created by Gregory Montoir.
- You can download it from here.
- Then you have to install Python on your PC. Don't forget to install the latest version. You can download the v3.8.5 from here.
Install Python on your PC
- Initially launch the Python EXE setup file. Then you will be asked for the installation directory.
- Then you can select Install Now or Customize Installation. I recommendyou to select the Inst all Now option so that it will be easier to follow this guide.
- Before proceeding with the nextstep please make a note about the directory you selected. You will need it later. And wait untill the process is completed and click the Close button.
Install Payload Dumper file
- As the next step, you can extract the stock boot.img file using the Payload Dumper Tool like this.
- First extract the contents of the Payload Dumper Tool to the same folder where you extracted Python.
- The contents will be extracted to the following location if you chose default directory when installing Python.
C:\Users\USER-NAME\AppData\Local\Programs\Python\Python <version number>
- Firstly extract the downloaded OnePlus Stock ROM. As it is in the ZIP format, you can easily extract using WinZip or WinRAR.
- When the extraction is complete, you will get several files including the payload.bin file.
- Just copy the payload.bin file and paste to the folder where you installed Python.
- Thereafter the directory will contain the Payload Dumper Tool, the payload.bin file and the Python software.
- Type CMD in the address bar in that particular folder and press Enter to launch the command prompt.
- Now execute the following command to install the required dependencies.
python -m pip install -r requirements.txt
- As the last step execute this command to extract the contents of payload.bin file. And it will take some time.
python payload_dumper.py payload.bin
- I got three files upon extraction: boot, system and vendor. You might get dtbo, and other files as well.
- When the process is completed, all the files will be placed in side a folder named as Output. The location will be this, if you installed Python on the default directory.
That'll be the end of the tutorial. Now you can use the boot.img file to root your device.
Do you think this is helpful? If so, please share this article on Facebook, LinkedIn, etc. And we warmly welcome your queries, comments, and suggestions. Feel free to contact us.
It's totally free! And, please don't forget to like our Facebook page. Thank you very much! Have a nice day! 😊