Android OTA and firmware packages now come with a Payload.bin file that contains the individual image files of different partitions. In this tutorial, we will show you how to extract the Android OTA Payload.bin using the Payload Dumper tool to get the partition image files.
What is a Payload.bin File?
Google introduced the concept of A/B (Seamless) System Updates back with Android Oreo. Of course, the new update mechanism offers several benefits. For one, the updates are installed seamlessly without rebooting the phone into the recovery mode. Also, it drastically reduces post-OTA failures that could make the device unusable. XDA posted a detailed write-up on A/B partitions and how it affects the custom development scene.
But it also introduced a new format for the Android OTA/Firmware update files. Earlier, these update files or packages came with partition images, which could easily be extracted and flashed manually, such as in case of devices like the Google Pixel and Razer Phone. And now, the update packages come with a single Payload.bin file that contains the individual partition images.
So, if you’d ever need to get the stock boot image or any other partition image from a specific OTA/Firmware package, you will need to extract the Android OTA Payload.bin file. And this could be easily done using the Payload Dumper tool developed by Gregory Montoir. The tool is pretty simple and supports any Windows, macOS, or Linux PC. It could be used for OTA packages for various A/B devices including but not limited to OnePlus 7/7 Pro, OnePlus 6/6T, Xiaomi Mi A2/A2 Lite, Xiaomi Mi A1 and more.
Important Note: Payload Dumper tool can only be used to extract the Payload.bin file from full OTA packages. It will not work for incremental OTA packages.
The only requirement to use the Payload Dumper Tool is that you must have Python v3.6 or above installed on your PC. For your convenience, we have provided a download link for that as well.
Instructions to Extract Android OTA Payload.bin File
- Download the full OTA package for your Android device.
- Extract the OTA package using an archive tool (WinRAR, 7Zip, etc) to get the Payload.bin file.
- Now, download the Payload Dumper Tool (payload_dumper.zip) and extract it to a suitable location on your PC.
- Copy the Payload.bin file to the previously extracted ‘payload_dumper’ folder.
- Hold the SHIFT key and right-click on an empty space inside the folder.
- Select the ‘Open PowerShell window here’ option.
- Enter the following command to install the required dependencies for the tool to work properly:
python -m pip install -r requirements.txt
- Finally, enter the following command to extract the Android OTA Payload.bin file:
python payload_dumper.py payload.bin
The tool will start extracting the individual partition images from the Payload.bin file as soon as the command is executed. Once the process finishes, the extracted image files would be found inside the ‘output’ folder.
You can now copy these files and flash them manually on your device using fastboot. You can even grab the stock boot image and patch it to install Magisk and root your Android device.
So there you go! This was out detailed tutorial on how to extract the Android OTA Payload.bin file using the Payload Dumper tool. We couldn’t end this post without thanking Gregory Montoir for creating this simple tool. If you have any questions regarding the procedure, let us know through the comments.
Source: Gregory Montoir’s Github