Learn how you can easily extract the Android OTA payload (bin) file using the Payload Dumper tool. This would enable you to access various partition image files from the OTA update or Android firmware. Download the Payload Dumper and Python v3.7+ from below and follow the instructions. Learn more about the ways to install OTA updates on Android using ADB sideload or stock recovery.
With the launch of Android 8 (Oreo), Google introduced two new concepts. The first one was regarding A/B Partitions. This made all the devices having two partitions capable of receiving Android updates systemlessly. It also allowed users to continue operating their device on the active slot while the OTA gets installed on the inactive one. Even if the OTA download fails, the Android system won’t be affected.
But this was not the only major change introduced by the Silicon Valley giants. Earlier, you could extract the OTA update package and get your hands on various partitions files. These included the images files of the boot partition, system partition, the modem file, among others. But now, you wouldn’t find these images files as individual files. This is because they all have been bundled under the Payload.bin file.
So, in order to access the images files belonging to any partition, you need to extract the Payload.bin file. Detailed instructions regarding the same are given below.
Download Payload Dumper & Python
- For extracting the Payload.bin file, you need a Payload Dumper Tool. Gregory Montoir has created this tool that supports many A/B Partition devices like Mi A1, Mi A2, OnePlus 7/7Pro, etc. Download the tool from here: payload_dumper.zip
- You also need Python installed on your PC. Download Python v3.7+
- Also, note that this tool could only be used to extract the Payload.bin file from full OTA update packages and not from the incremental ones.
Steps to Extract Android OTA Payload
The Payload Dumper tool will only be able to perform its functionalities when Python is installed on your PC. So follow the instruction given in the below section to install it. Then in the next section, instructions regarding the extraction of the Payload.bin file will be provided.
How to Install Python on your PC
- Download the latest version of Python from the above link.
- Click on python-3.7.x.exe to open the setup wizard.
- The first step asks for the installation directory. If you want to proceed with the given directory, select Install Now or choose Customize Installation if you want to install it at any other location. In any case, make sure to remember the installation directory, as it will be needed later on.
- The installation will be completed within a minute or so. Click Close to exit the wizard.
Extract the OTA Payload.bin file
Now that Python has been successfully installed, you may go ahead with extracting the Payload.bin file with the help of the Payload Dumper. Follow the below instructions:
- Extract the contents of payload_dumper.zip to the exact same location where you installed Python.
- If you had chosen the default directory while installing Python, then extract the contents inside C:\Users\USER-NAME\AppData\Local\Programs\Python\Python37-32
- Also, extract the contents of the Full OTA package of your device. Copy the payload.bin file from the OTA package and move it to the Python directory. So, this directory will now have the Payload Dumper Tool, the payload.bin file, and the Python software.
- Inside the Python37-32 folder, tap on the address bar and enter cmd to open the Command Prompt.
- Copy-paste the below code to install the necessary dependencies:
python -m pip install -r requirements.txt
- Finally, enter the below code to extract the partition images files present inside the Payload.bin file.
python payload_dumper.py payload.bin
- Wait for the process to get over. The time may vary depending on the OTA Package’s size. Once done, go to the output folder. The extracted image files will be present there.
Now you may flash these files on your device using various fastboot commands. Or use the extracted stock boot.img file and patch it via Magisk to get root access.
With this, we come to the end of the guide on how to extract the Android OTA payload.bin file using the Payload Dumper Tool. Drop your queries, if any, in the comments box below.
Read Next: Check MD5 Checksum on Windows, Mac, Linux
Thank you so much for this article!!