{"id":41959024,"url":"https://github.com/syedinsaf/otaripper","last_synced_at":"2026-05-15T22:03:33.326Z","repository":{"id":264381226,"uuid":"893141023","full_name":"syedinsaf/otaripper","owner":"syedinsaf","description":"Fast, safe, and reliable Android OTA partition extractor ","archived":false,"fork":false,"pushed_at":"2026-04-07T18:19:04.000Z","size":289673,"stargazers_count":50,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-07T20:19:59.057Z","etag":null,"topics":["android","aosp","cli","payload","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syedinsaf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T16:36:35.000Z","updated_at":"2026-04-07T18:19:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"d14d2db9-68b9-428e-b8b7-9201f01a1435","html_url":"https://github.com/syedinsaf/otaripper","commit_stats":null,"previous_names":["syedinsaf/otaripper"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/syedinsaf/otaripper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedinsaf%2Fotaripper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedinsaf%2Fotaripper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedinsaf%2Fotaripper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedinsaf%2Fotaripper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syedinsaf","download_url":"https://codeload.github.com/syedinsaf/otaripper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syedinsaf%2Fotaripper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","aosp","cli","payload","terminal"],"created_at":"2026-01-25T22:50:36.914Z","updated_at":"2026-05-15T22:03:33.316Z","avatar_url":"https://github.com/syedinsaf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-configure-file {\n  \"MD033\": false,\n  \"MD041\": false\n} --\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# otaripper\n\nExtract partitions from Android OTA files with cryptographic verification, strong reliability guarantees, and high-performance execution.\n\n[![Crates.io](https://img.shields.io/crates/v/otaripper?style=for-the-badge\u0026logo=rust\u0026logoColor=white\u0026label=crates.io\u0026color=rust)](https://crates.io/crates/otaripper)\n[![GitHub release](https://img.shields.io/github/v/release/syedinsaf/otaripper?style=for-the-badge\u0026logo=github\u0026logoColor=white\u0026color=rust)](https://github.com/syedinsaf/otaripper/releases)\n[![Downloads](https://img.shields.io/github/downloads/syedinsaf/otaripper/total?style=for-the-badge\u0026logo=github\u0026logoColor=white\u0026color=rust)](https://github.com/syedinsaf/otaripper/releases)\n[![License](https://img.shields.io/github/license/syedinsaf/otaripper?style=for-the-badge\u0026logo=github\u0026logoColor=white\u0026color=rust)](LICENSE)\n\n\n[Download](https://github.com/syedinsaf/otaripper/releases) •\n[Quick Start](#quick-start) •\n[Build Guide](#building-from-source) •\n[Technical Details](TECHNICAL.md)\n\n\u003c/div\u003e\n\n---\n\n## Table of Contents\n\n* [Overview](#overview)\n* [Feature Comparison](#feature-comparison)\n* [Performance](#performance)\n* [Quick Start](#quick-start)\n* [Basic Usage](#basic-usage)\n* [Cleanup](#cleanup)\n* [Command Options](#command-options)\n* [Building from Source](#building-from-source)\n* [Contributing](#contributing)\n* [Acknowledgments](#acknowledgments)\n* [Show Your Support](#show-your-support)\n* [License](#license)\n* [Disclaimer](#disclaimer)\n\nFor in-depth architecture and performance details, see [TECHNICAL.md](TECHNICAL.md)\n\n---\n\n## Overview\n\n**otaripper** extracts partitions from Android OTA packages (`payload.bin` or full OTA `.zip` files).\n\nThe tool is written in Rust and prioritizes:\n\n* Cryptographic correctness and data integrity\n* Predictable, fail-safe behavior\n* High-performance, multi-threaded execution\n* SIMD-accelerated memory operations\n* Guaranteed cleanup on failure or interruption\n\nUnlike many extraction tools, otaripper **verifies output images by default** and refuses to leave behind partially valid or corrupted files.\n\n⚠️ Incremental OTA packages are intentionally **not supported**.\n\n---\n\n## Feature Comparison\n\n|                         | otaripper v3.0 | payload-dumper-go | payload_dumper (Python) |\n| ----------------------- | -------------- | ----------------- | ----------------------- |\n| Output verification     | ✅ SHA-256      | ❌                | ❌                      |\n| Remote HTTP Streaming   | ✅ (Extract URL)| ❌                | ❌                      |\n| SIMD optimization       | ✅ AVX-512 / AVX2 / SSE2 | ❌        | ❌                      |\n| Cache-aware large writes| ✅              | ❌                | ❌                      |\n| Graceful interruption   | ✅              | ❌                | ❌                      |\n| Auto-cleanup on failure | ✅              | ❌                | ❌                      |\n| Performance statistics  | ✅              | ❌                | ❌                      |\n| Selective extraction    | ✅              | ✅                | ✅                      |\n| Direct ZIP Memory Mapping| ✅ (Zero-Copy)  | ❌ (Extracts temp)| ❌                      |\n| Multi-threaded          | ✅              | ✅                | ❌ (single-threaded)    |\n| Cross-platform          | ✅              | ✅                | ⚠️ Requires Python     |\n| Standalone binary       | ✅              | ✅                | ❌                      |\n\n\u003e otaripper is designed to fail early and cleanly rather than produce questionable output.\n\n---\n\n## Performance\n\notaripper automatically detects CPU capabilities and selects the optimal execution path.\n\nVersion **3.0** introduces flawless Remote HTTP Streaming and massive I/O savings:\n\n* **Remote HTTP Streaming**: Extract specific partitions directly from a remote URL! otaripper intelligently streams only the required byte-ranges over the network, completely eliminating the need to download the massive 3GB+ OTA zip just to grab a 64MB `boot.img`.\n* **Direct ZIP Memory Mapping**: Bypasses the traditional temp-file extraction step for `STORED` OTA zips, mapping the internal `payload.bin` straight from the disk using a zero-copy offset. Saves gigabytes of SSD writes per extraction.\n* **Modern Decompression Engine**: Upgraded `liblzma` backend safely handles modern Android payloads utilizing the ARM64 BCJ filter (e.g., Xiaomi HyperOS).\n* **Modular Engine Architecture**: Breaking the monolithic extraction logic into specialized `extractor` and `simd` modules.\n* **Thread-Local Buffer Pooling**: Drastically amortizing memory allocations across deep Rayon threadpools.\n* **Zero-Copy Decompression**: Triggering purely alloc-free extraction paths when output blocks map cleanly to continuous extents.\n* **Strict SIMD Encapsulation**: Cleanly isolating CPU vector operations (`AVX-512`, `AVX2`, `SSE2`) through non-temporal cache-bypassing mechanisms.\n\n```\n\nThroughput Example (3GB system partition)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\notaripper (AVX-512)  ████████████ 2.8 GB/s\notaripper (AVX2)     ████████     1.9 GB/s\npayload-dumper-go    ████         1.0 GB/s\npayload_dumper       ██           0.4 GB/s\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n```\n\nPerformance scales with:\n\n* storage speed (NVMe \u003e SATA \u003e HDD)\n* compression format\n* CPU SIMD capability\n\nFor architectural details, see [TECHNICAL.md](TECHNICAL.md)\n\n---\n\n## Quick Start\n\n### Installation\n\nPrebuilt binaries are available on the\n[Releases](https://github.com/syedinsaf/otaripper/releases) page:\n\n* Windows: `otaripper-x86_64-pc-windows-msvc.exe`\n* Linux (glibc): `otaripper-x86_64-unknown-linux-gnu`\n* Linux (musl): `otaripper-x86_64-unknown-linux-musl`\n* macOS (Intel): `otaripper-x86_64-apple-darwin`\n* macOS (Apple Silicon): `otaripper-aarch64-apple-darwin`\n\n\u003e **Note:** Each release also includes `otaripper-lite` binaries. These are compiled without remote HTTP extraction features (`--no-default-features`), resulting in an ultra-minimal footprint for users who only extract local files.\n\n### Verifying Downloads\n\notaripper releases follow a \"Gold Standard\" two-layer checksum architecture:\n1. **Download Verification:** The release page hosts a master `checksums.txt` file containing hashes for all `.tar.gz` and `.zip` archives.\n2. **Binary Verification:** Upon extracting the archive, you will find an `otaripper-vX.Y.Z.sha256` file enclosed alongside the executables. Run `sha256sum -c *.sha256` in your terminal to instantly verify the integrity of the extracted binaries.\n\n### Windows (winget)\n\notaripper is available via the Windows Package Manager:\n\n```powershell\nwinget install syedinsaf.otaripper\n```\n\nTo update to the latest version:\n\n```powershell\nwinget upgrade syedinsaf.otaripper\n```\n\n## Arch Linux (AUR)\n\notaripper is available on the AUR:\n\n```bash\nparu -S otaripper        # build from source (recommended)\nparu -S otaripper-bin    # prebuilt glibc binary\n\nyay -S otaripper\nyay -S otaripper-bin\n```\n\nIf `otaripper-bin` fails to run due to libc/runtime issues, use the\nfully static musl build from GitHub Releases:\n\n[https://github.com/syedinsaf/otaripper/releases](https://github.com/syedinsaf/otaripper/releases)\n\n---\n\n## Basic Usage\n\nExtract everything:\n\n```bash\notaripper ota.zip\n````\n\nList partitions:\n\n```bash\notaripper -l ota.zip\n```\n\nExtract selected partitions:\n\n```bash\notaripper ota.zip -p boot,vendor_boot,init_boot\n```\n\n🌐 **Remote HTTP Streaming (Zero-Download Extraction):**\n\nExtract specific partitions directly from a web URL without downloading the full OTA package!\n\n```bash\notaripper https://android.googleapis.com/packages/ota-api/package.zip -p boot,init_boot\n```\n\nPrint hashes:\n\n```bash\notaripper ota.zip --print-hash\n```\n\nStrict verification:\n\n```bash\notaripper ota.zip --strict\n```\n\nDisable automatic folder opening:\n\n```bash\notaripper ota.zip -n\n```\n\nAnalyze Qualcomm bootloader Anti-Rollback (ARB) metadata (accepts `.img`, `.bin`, or `.zip`):\n\n```bash\notaripper arb update.zip\n```\n\n🌐 **Remote ARB Inspection (Zero-Download):**\n\nInstantly check the ARB index of a firmware update without downloading the massive 3GB+ zip file! `otaripper` will intelligently stream and extract just the tiny `xbl_config.img` directly from the URL over the internet.\n\n```text\n$ otaripper arb https://example.com/firmware.zip -n\n[arbscan] OTA package detected. Extracting xbl_config.img temporarily...\n[arbscan] Analyzing: xbl_config.img\n\nOEM Metadata\n────────────\n  Major Version : 3\n  Minor Version : 0\n  ARB Index     : 0\n```\n\n---\n\n## Cleanup\n\nRemove previously extracted folders:\n\n```bash\notaripper clean\n```\n\nClean a specific directory:\n\n```bash\notaripper clean -o /path/to/output\n```\n\nThe cleanup command only removes directories matching `extracted_*`\nand refuses to operate on filesystem roots for safety.\n\n---\n\n## Command Options\n\n| Option             | Description                         |\n| ------------------ | ----------------------------------- |\n| `-l, --list`       | List partitions only                |\n| `-p, --partitions` | Extract specific partitions         |\n| `-o, --output-dir` | Custom output directory             |\n| `--strict`         | Enforce manifest hashes             |\n| `--no-verify`      | Disable verification (unsafe)       |\n| `--print-hash`     | Print SHA-256 hashes                |\n| `--sanity`         | Detect obviously invalid output     |\n| `--stats`          | Show performance statistics         |\n| `-t, --threads`    | Thread control (1–256, 0 = auto)    |\n| `-n, --no-open`    | Disable folder auto-open            |\n| `clean`            | Remove `extracted_*` folders safely |\n| `arbscan`, `arb`   | Extract ARB metadata from bootloader images or payloads |\n\n---\n\n## Building from Source\n\n### Requirements\n\n* **Rust 1.95.0 or newer** (MSRV)\n* Git\n* C compiler (gcc / clang / MSVC) - required by some native dependencies\n\n### Build\n\nWe provide two built-in Cargo aliases for easy compilation:\n\n```bash\ngit clone https://github.com/syedinsaf/otaripper.git\ncd otaripper\n\n# Build the standard CLI (with Remote HTTP Streaming support)\ncargo full\n\n# Build the 'lite' CLI (Network-free, local extraction only)\ncargo lite\n```\n\n**Binary output:**\n\n* Full Build: `target/release/otaripper`\n* Lite Build: `target/lite/release/otaripper`\n\n\u003e **Note:** The `cargo lite` alias automatically isolates its output into a separate `target/lite/` directory. This ensures you can compile and test both versions side-by-side locally without them overwriting each other!\n\n---\n\n\n## Native Optimized Build (Advanced)\n\notaripper can be built locally with **CPU-specific optimizations** for maximum performance.\nThis enables all instruction sets supported by your CPU (AVX2 / AVX-512 / ARMv8, etc.).\n\n⚠️ **Important:**\nBinaries built this way are **NOT portable** and **must NOT be redistributed**.\n\n---\n\n### Linux / macOS (build.sh)\n\nA helper script is provided to:\n- download the source\n- optionally install Rust (with confirmation)\n- build a **CPU-native release binary**\n- clean up all intermediate files\n\n#### Requirements\n- `curl`\n- `unzip`\n- A C toolchain (gcc / clang)\n- Rust (installed automatically if missing)\n\n#### Usage\n\n```bash\nchmod +x build.sh\n./build.sh\n````\n\nOutput binary:\nAfter running `build.sh`, a new folder named `otaripper-native`\nwill be created **in the same directory where `build.sh` is located**.\n\n\n```text\n~/otaripper-native/otaripper\n```\n\n---\n\n### Windows (PowerShell – MSVC)\n\nOn Windows, a native PowerShell script is provided.\nIt uses the official **Windows rustup installer** and defaults to the **MSVC toolchain**.\n\n#### Requirements\n\n* Windows 10 / 11\n* PowerShell 5.1 or newer\n* Visual Studio Build Tools (prompted automatically if missing)\n\n#### Usage\n\nBefore running the script, allow execution **for the current session only**:\n\n```powershell\nSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\n```\n\nThen run:\n\n```powershell\n.\\build.ps1\n```\n\nOutput binary:\nAfter running `build.ps1`, a new folder named `otaripper-native`\nwill be created **in the same directory where `build.ps1` is located**.\n\n```text\notaripper-native\\otaripper.exe\n```\n\n---\n\n### Notes\n\n* Native builds use `-C target-cpu=native`\n* Performance may be significantly higher than portable binaries\n* These builds are intended for **local use only**\n* GitHub Releases remain the recommended option for most users\n\n---\n\n## Contributing\n\nTesting, bug reports, and performance feedback are welcome.\n\nPlease include:\n\n* OS, CPU, RAM\n* otaripper version 3.0.0\n* OTA size and format\n* logs or error messages if available\n\nPull requests should:\n\n1. Build cleanly\n2. Preserve safety guarantees\n3. Avoid introducing undefined behavior\n4. Keep performance regressions justified\n\n---\n\n## Acknowledgments\n\notaripper benefits greatly from real-world testing and feedback.\n\nSpecial thanks to **Jean Rivera** for extensive validation, edge-case testing,\nand correctness feedback.\n\nThanks also to:\n\n* Android Open Source Project documentation\n* Rust ecosystem maintainers\n* Users who reported bugs and performance issues\n\n---\n\n## Show Your Support\n\nIf otaripper helped you:\n\n* **Star the repository** — https://github.com/syedinsaf/otaripper\n* **Report issues** — https://github.com/syedinsaf/otaripper/issues\n* **Submit pull requests** — https://github.com/syedinsaf/otaripper/pulls\n* **Share with others** — https://github.com/syedinsaf/otaripper\n\n---\n\n## License\n\notaripper is licensed under the **Apache License 2.0**.\nSee [LICENSE](LICENSE) for details.\n\n---\n\n## Disclaimer\n\nUse at your own risk.\n\n* Always verify extracted images before flashing\n* Keep backups whenever possible\n* Understand your device and bootloader requirements\n\nThe author and contributors are not responsible for data loss,\nbricked devices, or damage resulting from misuse.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyedinsaf%2Fotaripper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyedinsaf%2Fotaripper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyedinsaf%2Fotaripper/lists"}