• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Guide] How to extract payload.bin from OTA

Search This thread

und3fined

Member
Feb 2, 2015
19
33
This is guide for extract payload.bin from OTA zip file

-----------------

Pre-requirement:
- Python3

-----------------
For extract OTA update
Please flow step by step instruction

Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip --> View attachment payload_dumper.zip
Step 3: Unzip payload_dumper.zip
This is list file
fKqInKw3d7bLFOeFnMGnhLa9HxkHcs4mYYcDNgWOG9Cr1wm5wAHdd1IsHWqYrTOH6lkO-ssPGPYY48YPHEZswlOa6_CebGDVarH3OAzI-Our8npumZHI4midPdWhecNq


Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"

Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py

Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate

Works fine. :good:

Step 5 (Windows):
Code:
pip install virtualenv
virtualenv .py

Step 6 (Windows):
Code:
CMD: call .py\Scripts\activate.bat
PS: .py\Scripts\activate.ps1



Step 7: Install dependencies with command
Code:
pip install -r requirements.txt

Step 8: Extract OTA.zip file

Step 9: Copy payload.bin file to payload_dumper folder

Step 10: Run command

Code:
python3 payload_dumper.py payload.bin

Step 11: Wait extract...

Step 12: File extracted on out folder in payload_dumper

-----------------

Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv
 
Last edited:

Hollilightman

Senior Member
Nov 15, 2011
265
59
Berlin
Help !!!!!!

How do you do?
i want to extract a payload.bin (HTC OTA), i need the boot.img.
Step 1-9 Okay at step 10 I get an error message. :crying:
Do I need other programs?
"python-3.7.0.exe" is installed

Thanks

payload1.JPG
python.JPG
python2.JPG
 
Last edited:

Hollilightman

Senior Member
Nov 15, 2011
265
59
Berlin
Did you follow folktroll advises for windows.
I've just installed it in my computer followed all steps and extracted all images in my payload file.

Thanks,
I know where the mistake is. Step 10 says.
Run command
Code. python3 payload_dumper.py payload.bin
python3 payload_dumper.py payload.bin

with "python3" the "3" must go away, so

python payload_dumper.python payload.bin

---------- Post added at 05:18 PM ---------- Previous post was at 05:00 PM ----------

I doing in Linux, but maybe try python.exe, no python3.exe

have seen too late... lol:D
 
Last edited:
  • Like
Reactions: thedeadfish59

agbadino

Senior Member
Apr 21, 2010
57
4
This is guide for extract payload.bin from OTA zip file

-----------------

Pre-requirement:
- Python3

-----------------
For extract OTA update
Please flow step by step instruction

Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip from here
Step 3: Unzip payload_dumper.zip
This is list file
fKqInKw3d7bLFOeFnMGnhLa9HxkHcs4mYYcDNgWOG9Cr1wm5wAHdd1IsHWqYrTOH6lkO-ssPGPYY48YPHEZswlOa6_CebGDVarH3OAzI-Our8npumZHI4midPdWhecNq


Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"

Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py

Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate





Step 7: Install dependencies with command
Code:
pip install -r requirements.txt

Step 8: Extract OTA.zip file

Step 9: Copy payload.bin file to payload_dumper folder

Step 10: Run command

Code:
python3 payload_dumper.py payload.bin

Step 11: Wait extract...

Step 12: File extracted on out folder in payload_dumper

-----------------

Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv

goodmorning. bro, pls tho i have python3 installed-i dnt know **** bout programming.
is there a walkthrough for noobs to do all this on python3 on windows7.

bcos i have a Mi A2 lite and i need to do all i can to bring it back. thanks
 

EMJI79

Senior Member
Sep 7, 2014
1,943
209
Paris
OnePlus 9 Pro
I have this error in step 10:

(.py) imac-3:payload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'
 

trachyte

Member
Nov 9, 2015
25
130
I have this error in step 10:

(.py) imac-3:payload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'

Try:

Code:
pip3 install -r requirements.txt

instead of:

Code:
pip install -r requirements.txt
 
  • Like
Reactions: 2eno and EMJI79

emol007

New member
May 21, 2018
1
0
Huddersfield
I have this error in step 10:

(.py) imac-3:payload_dumper Eche$ python3 payload_dumper.py payload.bin
Traceback (most recent call last):
File "payload_dumper.py", line 12, in <module>
import update_metadata_pb2 as um
File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
ModuleNotFoundError: No module named 'google'

use
Code:
pip install -r requirements.txt
outside the virutalenv environment
 

2gg1

Senior Member
Mar 15, 2019
261
21
This is guide for extract payload.bin from OTA zip file

-----------------

Pre-requirement:
- Python3

-----------------
For extract OTA update
Please flow step by step instruction

Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip -->
Step 3: Unzip payload_dumper.zip
This is list file


Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command

Step 5: Create a python environment with virtualenv
Command:

Step 6: Active python enviroment
Command:

Works fine. :good:

Step 5 (Windows):


Step 6 (Windows):




Step 7: Install dependencies with command


Step 8: Extract OTA.zip file

Step 9: Copy payload.bin file to payload_dumper folder

Step 10: Run command



Step 11: Wait extract...

Step 12: File extracted on out folder in payload_dumper

-----------------

Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv
for what is payload.bin needed? What is this turtorial for?
 

k3dar7

Senior Member
Apr 14, 2018
829
445
for what is payload.bin needed? What is this turtorial for?

in "ota update".zip is payload.bin, contain many img flashed in ota update proces, if you need change(with unlocked bootloader only) example boot.img then use payload_dumper to extract from payload.bin...
 

thedeadfish59

Senior Member
May 28, 2013
1,225
2,125
Saudi Arabia
web.facebook.com
OnePlus 6T
This is guide for extract payload.bin from OTA zip file

-----------------

Pre-requirement:
- Python3

-----------------
For extract OTA update
Please flow step by step instruction

Step 1: Get a OTA for Nokia 7 plus -> here
Step 2: Download payload_dumper.zip --> View attachment 4760222
Step 3: Unzip payload_dumper.zip
This is list file
fKqInKw3d7bLFOeFnMGnhLa9HxkHcs4mYYcDNgWOG9Cr1wm5wAHdd1IsHWqYrTOH6lkO-ssPGPYY48YPHEZswlOa6_CebGDVarH3OAzI-Our8npumZHI4midPdWhecNq


Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
Go to folder payload_dumper with command
Code:
cd "<Path to folder>"

Step 5: Create a python environment with virtualenv
Command:
Code:
virtualenv .py

Step 6: Active python enviroment
Command:
Code:
source .py/bin/activate





Step 7: Install dependencies with command
Code:
pip install -r requirements.txt

Step 8: Extract OTA.zip file

Step 9: Copy payload.bin file to payload_dumper folder

Step 10: Run command

Code:
python3 payload_dumper.py payload.bin

Step 11: Wait extract...

Step 12: File extracted on out folder in payload_dumper

-----------------

Python 3 can get it here: https://www.python.org/downloads/
Flow step install python 3, please tick to option install pip and virutalenv

A very helpful guide! Tried it with OnePlus 8 OTA
 

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    This is guide for extract payload.bin from OTA zip file

    -----------------

    Pre-requirement:
    - Python3

    -----------------
    For extract OTA update
    Please flow step by step instruction

    Step 1: Get a OTA for Nokia 7 plus -> here
    Step 2: Download payload_dumper.zip --> View attachment payload_dumper.zip
    Step 3: Unzip payload_dumper.zip
    This is list file
    fKqInKw3d7bLFOeFnMGnhLa9HxkHcs4mYYcDNgWOG9Cr1wm5wAHdd1IsHWqYrTOH6lkO-ssPGPYY48YPHEZswlOa6_CebGDVarH3OAzI-Our8npumZHI4midPdWhecNq


    Step 4: Open Power Shell (on Windows) or Terminal (on Linux/macOS).
    Go to folder payload_dumper with command
    Code:
    cd "<Path to folder>"

    Step 5: Create a python environment with virtualenv
    Command:
    Code:
    virtualenv .py

    Step 6: Active python enviroment
    Command:
    Code:
    source .py/bin/activate

    Works fine. :good:

    Step 5 (Windows):
    Code:
    pip install virtualenv
    virtualenv .py

    Step 6 (Windows):
    Code:
    CMD: call .py\Scripts\activate.bat
    PS: .py\Scripts\activate.ps1



    Step 7: Install dependencies with command
    Code:
    pip install -r requirements.txt

    Step 8: Extract OTA.zip file

    Step 9: Copy payload.bin file to payload_dumper folder

    Step 10: Run command

    Code:
    python3 payload_dumper.py payload.bin

    Step 11: Wait extract...

    Step 12: File extracted on out folder in payload_dumper

    -----------------

    Python 3 can get it here: https://www.python.org/downloads/
    Flow step install python 3, please tick to option install pip and virutalenv
    8
    Works fine. :good:

    Step 5 (Windows):
    Code:
    pip install virtualenv
    virtualenv .py

    Step 6 (Windows):
    Code:
    CMD: call .py\Scripts\activate.bat
    PS: .py\Scripts\activate.ps1
    2
    I have this error in step 10:

    (.py) imac-3:payload_dumper Eche$ python3 payload_dumper.py payload.bin
    Traceback (most recent call last):
    File "payload_dumper.py", line 12, in <module>
    import update_metadata_pb2 as um
    File "/Users/Eche/Downloads/payload_dumper/update_metadata_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
    ModuleNotFoundError: No module named 'google'

    Try:

    Code:
    pip3 install -r requirements.txt

    instead of:

    Code:
    pip install -r requirements.txt
    1
    How do you do?
    I doing in Linux, but maybe try python.exe, no python3.exe
    1
    Did you follow folktroll advises for windows.
    I've just installed it in my computer followed all steps and extracted all images in my payload file.

    Thanks,
    I know where the mistake is. Step 10 says.
    Run command
    Code. python3 payload_dumper.py payload.bin
    python3 payload_dumper.py payload.bin

    with "python3" the "3" must go away, so

    python payload_dumper.python payload.bin

    ---------- Post added at 05:18 PM ---------- Previous post was at 05:00 PM ----------

    I doing in Linux, but maybe try python.exe, no python3.exe

    have seen too late... lol:D