قالب وردپرس درنا توس
Home / Tips and Tricks / How to get Fastboot Flashable Factory images for any OnePlus phone «OnePlus :: Gadget Hacks

How to get Fastboot Flashable Factory images for any OnePlus phone «OnePlus :: Gadget Hacks

OnePlus phones are easy to root, but that also means they're easy to block if you're happy with your superuser privileges. If you are in this situation, you will quickly realize that the OnePlus firmware download page does not contain any files that you can flash in Fastboot mode.

The official OnePlus firmware files are designed to be secure. You flash them in recovery mode and they will overwrite all the data on your phone to restore them to factory settings.

But you usually don't have to start all over again. If you have a faulty root mod installed, it would be good if you only recovered the system and boot partitions. Or if you want to root with Magisk all you need is the boot image to patch, but instead you get the full set of factory images merged into a payload.bin file. Fortunately, you can turn that payload.bin file into something useful.

Step 1
: Download the Factory OTA.zip

To get started, download your phone's factory firmware package (what OnePlus calls an OTA ZIP) from a computer below.

Image via OnePlus

Click on your phone model and you will be taken to the software updates page for your phone. From there, click the "Download" button to save the file to your computer.

Image via OnePlus

Step 2: Extract the Payload.bin file [19659005] Now extract the OTA firmware ZIP and find the "payload .bin "file in it. This file contains all factory image files. Drag and drop this file onto your desktop and then delete the original folder because you don't need anything else in it.

Step 3: Install Python [19659005] The payload.bin file contains all the fastboot flashable factory images you need, but you cannot extract them with a normal archive program. Instead, you have to use the Payload Dumper Tool, which itself runs in the Python programming language.

So, then you need to install Python on your computer. Click one of the links below to download Python for your operating system. After downloading, open the installation file and click "Continue" or "Install now" depending on your operating system. Follow the instructions and click "Next" or "Continue" to complete the installation.

Step 4: Download the Payload Dumper Tool

Now that Python is installed on your computer, the next thing you need to do is the [PayloadDumperToolfrom geminids14. This is what will be used to actually take the "payload.bin" file and break it wide open so that you can view the core system image files. You can download the tool from the link below.

Once the Payload Dumper Tool is downloaded, extract its contents and move it to your newly installed Python folder from the previous step.

You should also take your "payload.bin" file and put it in the same Python folder so that everything is in the same location.

Step 5: Open a command window in the Python folder

Now that you have all the necessary files in the Python folder, you need to open a command window before can start extracting the payload.bin

If you are using Windows, you can click the address bar in the Python folder, then type "cmd" and hit enter to open a command window there. You can also hold down the Shift key and right-click an empty spot in the Python folder and then select "Open PowerShell window here". Now the command window is ready to use! You can proceed to the next step.

If you are using Mac or Linux, you can open the Terminal app, type "cd" and a space then drag the Python folder to the command window itself . Hit enter and it will automatically mount the Python folder to your Terminal app. Now the command window is ready to use! You can proceed to the next step.

Step 6: Extract the Payload.bin file

You are almost there – the last step is to run the correct commands and extract the payload.bin file. From the command window opened in the previous step, you want to copy and paste (or type) the following command and then hit Enter to continue.

  python -m pip install -r requirements.txt 

Note: Mac, Linux and Windows PowerShell users may need to add a period and a slash before entering certain commands (eg ./Python -m pip install -r requirements.txt).

The above command downloads the required dependencies for extracting the payload.bin file. It doesn't take long to finish.

After that, you want to copy and paste (or type) the following command and then hit enter to continue.

  python payload_dumper.py payload.bin 

The above command is where the magic happens – it will now start splitting your payload.bin file into individual system image files. Since this may take some time, be patient here.

Once the whole process is successfully completed, the whole system image files extracted from the payload.bin file will be in the "Output" folder of your Python directory placed.

So yes, it takes a while, but now that you're set up it should be much faster in the future if ever needed. And now that you have factory default image files, you can easily flash them with fastboot! and you get a great deal on some sweet new technology? View all offers for the new Gadget Hacks Shop .

Cover photo and screenshots of Stephen Perkins / Gadget Hacks

Source link