| Crates.io | payload_dumper |
| lib.rs | payload_dumper |
| version | 0.8.2 |
| created_at | 2025-05-16 09:24:26.930286+00 |
| updated_at | 2025-12-20 10:51:24.430206+00 |
| description | A fast and efficient Android OTA payload dumper library and CLI |
| homepage | https://github.com/rhythmcache/payload-dumper-rust |
| repository | https://github.com/rhythmcache/payload-dumper-rust |
| max_upload_size | |
| id | 1676256 |
| size | 384,459 |
A fast and efficient Android OTA payload dumper.
Extracts partition images (boot, system, vendor, etc.) from Android OTA payload.bin files.
Linux / macOS / Termux:
bash <(curl -sSL "https://raw.githubusercontent.com/rhythmcache/payload-dumper-rust/main/scripts/install.sh")
Windows (PowerShell):
powershell -NoExit -ExecutionPolicy Bypass -Command "Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/rhythmcache/payload-dumper-rust/main/scripts/install.ps1' | Invoke-Expression"
Download from releases.
cargo install payload_dumper
Or:
git clone https://github.com/rhythmcache/payload-dumper-rust
cd payload-dumper-rust
cargo build --release
Extract from payload.bin:
payload_dumper payload.bin -o output
Extract from ROM ZIP (no unzipping required):
payload_dumper rom.zip -o output
Extract from URL (downloads only required data):
payload_dumper https://example.com/ota.zip -o output
Extract specific partitions:
payload_dumper payload.bin -i boot,vendor_boot -o output
Extract Incremental OTA:
old in the current working directory and copy all images from the previous build into it.--source-dir <PATH> argument.List partitions without extracting:
payload_dumper payload.bin --list
URL extraction with prefetch (better for slow connections):
payload_dumper https://example.com/ota.zip --prefetch -o output
Custom thread count:
payload_dumper payload.bin -t 8 -o output
Export metadata as JSON:
payload_dumper payload.bin --metadata -o output
# Creates output/payload_metadata.json
Full metadata with operation details:
payload_dumper payload.bin --metadata=full -o output
Skip verification (faster but not recommended):
payload_dumper payload.bin --no-verify -o output
Usage: payload_dumper [OPTIONS] <PAYLOAD_PATH>
Arguments:
<PAYLOAD_PATH> Path to payload.bin, ROM ZIP, or URL
Options:
-o, --out <OUT> Output directory [default: output]
-U, --user-agent <AGENT> Custom User-Agent for HTTP requests
-C, --cookies <COOKIES> Custom HTTP Cookie header value for remote requests
-i, --images <IMAGES> Comma-separated partition names to extract
-t, --threads <THREADS> Number of threads for parallel processing
-l, --list List available partitions
-m, --metadata[=<MODE>] Save metadata as JSON (compact or full)
-P, --no-parallel Disable parallel extraction
-n, --no-verify Skip hash verification
--prefetch Download all data first (for remote URLs)
-q, --quiet Suppress all non-essential output (errors will still be shown)
-h, --help Show help
-V, --version Show version
Instead of downloading a 3GB OTA file to extract a 50MB boot image, this tool downloads only ~50-100MB of required data.
Useful for:
To build manually, you will need:
git clone --depth 1 https://github.com/rhythmcache/payload-dumper-rust.git
cd payload-dumper-rust
cargo build --release
This builds the binary with:
.bin and .zip supportPayload Dumper is modular. You can disable features you do not need to:
If you only need local payload files and no network support:
cargo build --release --no-default-features
This:
reqwest, DNS, and TLS dependenciesTo work with remote URLs:
cargo build --release --features remote_zip
When building a fully static binary (for example with musl), DNS resolution may fail
because system libc DNS resolvers are unavailable.
cargo build --release --features hickory_dns
This enables:
hickory-resolverBy default, the resolver uses Cloudflare DNS (1.1.1.1).
The DNS server is selected at runtime
To use a custom DNS server, set the environment variable when running the binary:
export PAYLOAD_DUMPER_CUSTOM_DNS=8.8.8.8,4.4.4.4
./payload_dumper
If you are unsure, use the default build.
It also provides a few high level apis.
project using this library:
payload-dumper-gui
https://github.com/rhythmcache/payload-dumper-gui.git
See
For API documentation and function behavior, refer directly to the headers.
You can regenerate C/C++ headers using cargo-c or cbindgen.
"Server doesn't support range requests"
Download the file first, then extract locally.
Out of memory errors
Use --no-parallel or reduce thread count with -t.
Slow extraction
Remove --no-parallel if set. For remote extraction, try --prefetch.
Inspired by vm03/payload_dumper