A tool for extracting or patching images from Android OTA payloads.
This project was a originally a fork of payload-dumper-go - it has now been reimplemented in C(++).
- Incredibly fast decompression. All decompression progresses are executed in parallel.
- Payload checksum verification.
- Support original zip package that contains payload.bin.
- Incremental OTA (delta) payloads can be applied to old images.
- Working on a SSD is highly recommended for performance reasons, a HDD could be a bottle-neck.
- Download the latest binary for your platform from here and extract the contents of the downloaded file to a directory on your system.
- Make sure the extracted binary file has executable permissions. You can use the following command to set the permissions if necessary:
chmod +x ota-tool
- Run the following command to add the directory path to your system's PATH environment variable:
export PATH=$PATH:/path/to/ota-tool
Note: This command sets the PATH environment variable only for the current terminal session. To make it permanent, you need to add the command to your system's profile file (e.g. .bashrc or .zshrc for Linux/Unix systems).
- Open the Start menu and search for "Environment Variables".
- Click on "Edit the system environment variables".
- Click on the "Environment Variables" button at the bottom right corner of the "System Properties" window.
- Under "System Variables", scroll down and click on the "Path" variable, then click on "Edit".
- Click "New" and add the path to the directory where the extracted binary is located.
- Click "OK" on all the windows to save the changes.
Run the following command in your terminal:
Usage: ./ota-tool [options] [inputfile]
--concurrency int
Number of multiple workers to extract (default 4)
--input string
Set directory for existing partitions
--list
Show list of partitions in payload.bin and exit
--output string
Set output directory for partitions
--partitions string
Only work with selected partitions (comma-separated)
Inputfile can either be a payload.bin
or an uncompressed zip file containing a payload.bin
.
https://android.googlesource.com/platform/system/update_engine/+/master/update_metadata.proto
git submodule update --init --recursive
make
- liblzma-devel
- libopenssl-devel
- make
- cmake
- gcc (or another C compiler)
- g++ (or another C++ compiler)
protoc
is not required on the host machine as it will be built as part
of this project. If you want, you can force it to use a host protoc by
specifying PROTOC=protoc or PROTOC=/path/to/protoc when calling make.
make PROTOC=protoc
NB: This can speed up compilation slightly, however it is not recommended as protobuf is very picky about protoc versions.
This source code is licensed under the Apache License 2.0 as described in the LICENSE file.