{"id":13481597,"url":"https://github.com/ssut/payload-dumper-go","last_synced_at":"2025-05-13T22:03:04.807Z","repository":{"id":37364422,"uuid":"300937856","full_name":"ssut/payload-dumper-go","owner":"ssut","description":"an android OTA payload dumper written in Go","archived":false,"fork":false,"pushed_at":"2024-11-20T14:29:44.000Z","size":76,"stargazers_count":2681,"open_issues_count":8,"forks_count":225,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-04-28T15:18:21.863Z","etag":null,"topics":["android","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/ssut.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2020-10-03T17:28:44.000Z","updated_at":"2025-04-27T03:51:16.000Z","dependencies_parsed_at":"2024-01-13T18:24:11.465Z","dependency_job_id":"c94b7f5b-fe38-4294-b8cd-c614c4c7baff","html_url":"https://github.com/ssut/payload-dumper-go","commit_stats":{"total_commits":33,"total_committers":8,"mean_commits":4.125,"dds":0.5757575757575757,"last_synced_commit":"d0b0efee72be10030ada7296868cec22eff9cac6"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fpayload-dumper-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fpayload-dumper-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fpayload-dumper-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssut%2Fpayload-dumper-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssut","download_url":"https://codeload.github.com/ssut/payload-dumper-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251336391,"owners_count":21573188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","golang"],"created_at":"2024-07-31T17:00:53.187Z","updated_at":"2025-04-28T15:18:28.980Z","avatar_url":"https://github.com/ssut.png","language":"Go","funding_links":[],"categories":["Go","android"],"sub_categories":[],"readme":"# payload-dumper-go\n\nAn android OTA payload dumper written in Go.\n\n## Features\n\n![screenshot](https://i.imgur.com/IJtwoWU.png)\n\nSee how fast payload-dumper-go is: https://imgur.com/a/X6HKJT4. (MacBook Pro 16-inch 2019 i9-9750H, 16G)\n\n- Incredibly fast decompression. All decompression progresses are executed in parallel.\n- Payload checksum verification.\n- Support original zip package that contains payload.bin.\n\n### Cautions\n\n- There's just one dependency you need to install on your system: `xz`. (The reason I didn't use the pure Go implementation is written in the [Performance](#performance) section below.)\n- Working on a SSD is highly recommended for performance reasons, a HDD could be a bottle-neck.\n\n### Limitations\n\n- Incremental OTA (delta) payload is not supported yet. ([#44](https://github.com/ssut/payload-dumper-go/pull/44))\n\n## Installation\n\n### Linux and macOS (From releases, recommended)\n\n1. Download the latest binary for your platform from [here](https://github.com/ssut/payload-dumper-go/releases) and extract the contents of the downloaded file to a directory on your system.\n2. Make sure the extracted binary file has executable permissions. You can use the following command to set the permissions if necessary:\n\n```\nchmod +x payload-dumper-go\n```\n\n3. Run the following command to add the directory path to your system's PATH environment variable:\n\n```\nexport PATH=$PATH:/path/to/payload-dumper-go\n```\n\nNote: 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).\n\n### macOS (Homebrew)\n\nJust simply run:\n\n```sh\n$ brew install payload-dumper-go\n```\n\n### Windows\n\n1. Download the latest binary for your platform from [here](https://github.com/ssut/payload-dumper-go/releases) and extract the contents of the downloaded file to a directory on your system.\n2. Open the Start menu and search for \"Environment Variables\".\n3. Click on \"Edit the system environment variables\".\n4. Click on the \"Environment Variables\" button at the bottom right corner of the \"System Properties\" window.\n5. Under \"System Variables\", scroll down and click on the \"Path\" variable, then click on \"Edit\".\n6. Click \"New\" and add the path to the directory where the extracted binary is located.\n7. Click \"OK\" on all the windows to save the changes.\n\n## Usage\n\nRun the following command in your terminal:\n\n```\npayload-dumper-go /path/to/payload.bin\n```\n\n## Performance\n\nMachine: MacBook Pro 16-inch 2021 (Apple M1 Max, 64G), OS: macOS Sonoma 14.5, Go: 1.22.4.\n\nTested with a 2.31GB payload.bin file from https://developers.google.com/android/ota (akita).\n\n```shell\npayload.bin: payload.bin\nPayload Version: 2\nPayload Manifest Length: 154250\nPayload Manifest Signature Length: 523\nFound partitions:\nabl (1.8 MB), bl1 (16 kB), bl2 (537 kB), bl31 (106 kB), boot (67 MB), dtbo (17 MB), gcf (8.2 kB), gsa (348 kB), gsa_bl1 (33 kB), init_boot (8.4 MB), ldfw (2.4 MB), modem (102 MB), pbl (49 kB), product (3.4 GB), pvmfw (1.0 MB), system (821 MB), system_dlkm (11 MB), system_ext (288 MB), tzsw (7.9 MB), vbmeta (12 kB), vbmeta_system (8.2 kB), vbmeta_vendor (4.1 kB), vendor (693 MB), vendor_boot (67 MB), vendor_dlkm (28 MB), vendor_kernel_boot (67 MB)\nNumber of workers: 4\nabl (1.8 MB)                [===================================================================================================================] 100 %\nbl2 (537 kB)                [===================================================================================================================] 100 %\nbl1 (16 kB)                 [===================================================================================================================] 100 %\nbl31 (106 kB)               [===================================================================================================================] 100 %\nboot (67 MB)                [===================================================================================================================] 100 %\ndtbo (17 MB)                [===================================================================================================================] 100 %\ngcf (8.2 kB)                [===================================================================================================================] 100 %\ngsa (348 kB)                [===================================================================================================================] 100 %\ngsa_bl1 (33 kB)             [===================================================================================================================] 100 %\ninit_boot (8.4 MB)          [===================================================================================================================] 100 %\nldfw (2.4 MB)               [===================================================================================================================] 100 %\nmodem (102 MB)              [===================================================================================================================] 100 %\npbl (49 kB)                 [===================================================================================================================] 100 %\nproduct (3.4 GB)            [===================================================================================================================] 100 %\npvmfw (1.0 MB)              [===================================================================================================================] 100 %\nsystem (821 MB)             [===================================================================================================================] 100 %\nsystem_dlkm (11 MB)         [===================================================================================================================] 100 %\nsystem_ext (288 MB)         [===================================================================================================================] 100 %\ntzsw (7.9 MB)               [===================================================================================================================] 100 %\nvbmeta (12 kB)              [===================================================================================================================] 100 %\nvbmeta_system (8.2 kB)      [===================================================================================================================] 100 %\nvbmeta_vendor (4.1 kB)      [===================================================================================================================] 100 %\nvendor (693 MB)             [===================================================================================================================] 100 %\nvendor_boot (67 MB)         [===================================================================================================================] 100 %\nvendor_dlkm (28 MB)         [===================================================================================================================] 100 %\nvendor_kernel_boot (67 MB)  [===================================================================================================================] 100 %\ngo run *.go payload.bin  87.93s user 3.51s system 145% cpu 1:02.99 total\n```\n\n### Why not use the pure Go implementation for xz decompression?\n\n[The pure Go implementation of xz](https://github.com/ulikunitz/xz) is very slow compared to [the C implementation used with CGO](https://github.com/spencercw/go-xz). Here's the result with the same payload.bin file on the same conditions:\n\n```shell\npayload.bin: payload.bin\nPayload Version: 2\nPayload Manifest Length: 154250\nPayload Manifest Signature Length: 523\nFound partitions:\nabl (1.8 MB), bl1 (16 kB), bl2 (537 kB), bl31 (106 kB), boot (67 MB), dtbo (17 MB), gcf (8.2 kB), gsa (348 kB), gsa_bl1 (33 kB), init_boot (8.4 MB), ldfw (2.4 MB), modem (102 MB), pbl (49 kB), product (3.4 GB), pvmfw (1.0 MB), system (821 MB), system_dlkm (11 MB), system_ext (288 MB), tzsw (7.9 MB), vbmeta (12 kB), vbmeta_system (8.2 kB), vbmeta_vendor (4.1 kB), vendor (693 MB), vendor_boot (67 MB), vendor_dlkm (28 MB), vendor_kernel_boot (67 MB)\nNumber of workers: 4\nabl (1.8 MB)                [===================================================================================================================] 100 %\nbl1 (16 kB)                 [===================================================================================================================] 100 %\nbl2 (537 kB)                [===================================================================================================================] 100 %\nbl31 (106 kB)               [===================================================================================================================] 100 %\nboot (67 MB)                [===================================================================================================================] 100 %\ndtbo (17 MB)                [===================================================================================================================] 100 %\ngcf (8.2 kB)                [===================================================================================================================] 100 %\ngsa (348 kB)                [===================================================================================================================] 100 %\ngsa_bl1 (33 kB)             [===================================================================================================================] 100 %\ninit_boot (8.4 MB)          [===================================================================================================================] 100 %\nldfw (2.4 MB)               [===================================================================================================================] 100 %\nmodem (102 MB)              [===================================================================================================================] 100 %\npbl (49 kB)                 [===================================================================================================================] 100 %\nproduct (3.4 GB)            [===================================================================================================================] 100 %\npvmfw (1.0 MB)              [===================================================================================================================] 100 %\nsystem (821 MB)             [===================================================================================================================] 100 %\nsystem_dlkm (11 MB)         [===================================================================================================================] 100 %\nsystem_ext (288 MB)         [===================================================================================================================] 100 %\ntzsw (7.9 MB)               [===================================================================================================================] 100 %\nvbmeta (12 kB)              [===================================================================================================================] 100 %\nvbmeta_system (8.2 kB)      [===================================================================================================================] 100 %\nvbmeta_vendor (4.1 kB)      [===================================================================================================================] 100 %\nvendor (693 MB)             [===================================================================================================================] 100 %\nvendor_boot (67 MB)         [===================================================================================================================] 100 %\nvendor_dlkm (28 MB)         [===================================================================================================================] 100 %\nvendor_kernel_boot (67 MB)  [===================================================================================================================] 100 %\ngo run *.go payload.bin  587.89s user 2428.69s system 248% cpu 20:12.19 total\n```\n\nAs you can see, the pure Go implementation is about 6~ times slower than the C implementation.\n\n## Sources\n\nhttps://android.googlesource.com/platform/system/update_engine/+/master/update_metadata.proto\n\n## License\n\nThis source code is licensed under the Apache License 2.0 as described in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssut%2Fpayload-dumper-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssut%2Fpayload-dumper-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssut%2Fpayload-dumper-go/lists"}