ssut / payload-dumper-go Goto Github PK
View Code? Open in Web Editor NEWan android OTA payload dumper written in Go
License: Apache License 2.0
an android OTA payload dumper written in Go
License: Apache License 2.0
Hi,
I wonder if there is any way to use this software using Termux on Android system?
Thanks!
Line 126 in 412e5a9
Something like:
fmt.Fprintf(os.Stderr, "Usage: %s [options] [inputfile]\n", os.Args[0])
So that it can print
C:\Projects\roms\alioth21.8.18>C:\Projects\roms\posp\payload-dumper-go.exe
Usage: C:\Projects\roms\posp\payload-dumper-go.exe [options] [inputfile]
...
It'd be nice to be able run something like payload-dumper-go info
(or --dry-run
) to get just the info about the partitions and their sizes, like
payload.bin: payload.bin
Payload Version: 2
Payload Manifest Length: 229331
Payload Manifest Signature Length: 267
Found partitions:
my_engineering (336 kB), my_preload (2.5 MB), vendor_boot (201 MB), engineering_cdt (1.0 MB), keymaster (410 kB), system (705 MB), bluetooth (1.2 MB), uefisecapp (180 kB), imagefv (74 kB), abl (221 kB), my_bigball (808 MB), cpucp (188 kB), tz (3.9 MB), devcfg (49 kB), aop (278 kB), uefi (3.2 MB), vbmeta_system (8.2 kB), xbl (1.2 MB), recovery (105 MB), xbl_ramdump (832 kB), qupfw (57 kB), system_dlkm (348 kB), splash (332 kB), my_stock (965 MB), my_manifest (369 kB), system_ext (1.1 GB), my_region (3.9 MB), modem (298 MB), oplusstanvbk (2.0 MB), init_boot (8.4 MB), vbmeta (12 kB), boot (201 MB), product (2.9 MB), odm (1.5 GB), hyp (1.6 MB), vendor (1.1 GB), aop_config (16 kB), dtbo (25 MB), my_carrier (336 kB), xbl_config (192 kB), oplus_sec (852 kB), my_heytap (917 MB), dsp (67 MB), featenabler (98 kB), vendor_dlkm (145 MB), shrm (66 kB), my_company (336 kB), vbmeta_vendor (4.1 kB), my_product (553 MB)
It would also be nice to add a way to extract images for just the specified partition(s), like payload-dumper-go --extract-partitions=init_boot,my_region
should extract just 2 small files and that operation should be damn fast.
If I use this tool to unpack zip file (with payload.bin in it), my [C:] disk will be full because the payload.bin was not deleted by this tool, pls fix that.
Since extracting the entire payload.bin can be time-consuming (and RAM-consuming!) when all you want is boot.img ๐
Thanks!
It would be nice to see Homebrew support for this, similiar to Android Platform Tools. Not necessary due to the update frequency, but a nice to have considering the low level of maintenance.
https://docs.brew.sh/Cask-Cookbook
https://formulae.brew.sh/cask/android-platform-tools#default
Hi, any chance of a Win32 build? Also curious if it's possible to cross-compile this to arm, since on-device is where payload dumper might be most useful!
realme gt rmx2202 android 12
https://componentota-manual-cn.allawnfs.com/component-ota/21/10/17/8c89fffacdfe4f5b95bc576c10e0b15e.zip
Right now it just extracts in the working directory which is not something we always want. Having the ability to specific the output directory would be really useful.
libzma-5.dll not found
payload-dumper-go /path/to/payload.bin
zsh: exec format error: payload-dumper-go
getting this error I have set it as system path aswell in zshrc file
Using either -o or -output flags doesn't change the output path and uses the default ./extracted_* directory. Trying the -partitions flag doesn't work either.
Commands tried:
Well, I guess the only major thing left is this limitation: Incremental OTA(delta) payload is not supported. ๐
Here is a fork of the original Python payload_dumper supporting extracting the resulting images from a delta and an existing factory image, so perhaps their method could be adapted here: https://github.com/vm03/payload_dumper
$ go build
go: downloading github.com/spencercw/go-xz v0.0.0-20181128201811-c82a2123b492
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/vbauerster/mpb/v5 v5.3.0
go: downloading google.golang.org/protobuf v1.25.0
go: downloading github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
go: downloading golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed
go: downloading github.com/mattn/go-runewidth v0.0.9
go: downloading github.com/VividCortex/ewma v1.1.1
# github.com/spencercw/go-xz
../../go/pkg/mod/github.com/spencercw/[email protected]/compression.go:36:10: fatal error: lzma.h: No such file or directory 36 | #include <lzma.h>
| ^~~~~~~~
compilation terminated.
Can you please specify checksum type in "payload-dumper-go_[version]_checksum.txt" or in release description?
How to compilation for Win10 ? When I : go get github.com/ssut/payload-dumper-go and then : fatal error: lzma.h: No such file or directory #include <lzma.h>
After I unpacked OnePlus Ace payload.bin, the size of boot.img is 24M, then patch it with magisk, fastboot flash it in bootloader, the phone bircked.
Then I use fastboot enhance to unpack, size is 64M, then magisk patch, fastboot flash , succefully rooted.
payload dumper go version: windows amd64 1.2.0
OnePlus Ace ColorOS 12.1 A.13๏ผhttps://gauss-componentotacostauto-cn.allawnfs.com/remove-e07d443bc0b9ed5aa24b8e90acf245c2/component-ota/22/05/19/f74d65fd84be4aa7aed4d1a158003d8a.zip
OnePlus Ace ColorOS 12.1 A.14๏ผhttps://gauss-componentotacostauto-cn.allawnfs.com/remove-95b631ef075cabb3f4adb658434fcf71/component-ota/22/05/23/38772068d9024a069310cb9031984875.zip
Hey, it would be great if you can include the installation instructions
Or would you accept a PR
I currently use Arch Linux and someone has already put the binary up on Arch User Repository
I can research about other Debian based Linux and Windows as well as Mac OS, regarding the installation steps
Is it possible to define the -version
flag on the windows executable?
Currently getting the following error when I type payload-dumper-go -version
flag provided but not defined: -version
atm you cannot parse the output of the progress or partition list.
it would be great if there is a kind of "batch" mode so one can easily parse the partition + progress
e.g. partition:%
vendor:10
system:14
and also when listing partitions, e.g. partition:size-in-KB
vendor:11231243
system:112321434123
Fixed to KB so it will be easy to convert if needed and so not humanized
Could you also publish a linux binary, pls?
sample https://mobile-ota-cdn.lenovo.com/firmware/2021123013411302-9111.zip
please download and unzip obtain payload.bin file
payload.bin: payload.bin
Payload Version: 2
Payload Manifest Length: 524712
Payload Manifest Signature Length: 267
Found partitions:
abl (274 kB), aop (180 kB), bluetooth (225 kB), boot (101 MB), core_nhlos (109 MB), devcfg (45 kB), dsp (67 MB), dtbo (8.4 MB), featenabler (90 kB), hyp (406 kB), imagefv (537 kB), keymaster (246 kB), modem (145 MB), multiimgoem (16 kB), odm (1.0 MB), product (479 MB), qupfw (57 kB), recovery (101 MB), system (3.7 GB), system_ext (261 MB), tz (3.0 MB), uefisecapp (127 kB), vbmeta (8.2 kB), vbmeta_system (4.1 kB), vendor (650 MB), xbl (3.5 MB), xbl_config (98 kB)
Number of workers: 4
abl (274 kB) [=======================================================================================] 100 %
aop (180 kB) [=======================================================================================] 100 %
bluetooth (225 kB) [=======================================================================================] 100 %
boot (101 MB) [=======================================================================================] 100 %
core_nhlos (109 MB) [=======================================================================================] 100 %
devcfg (45 kB) [=======================================================================================] 100 %
dtbo (8.4 MB) [=======================================================================================] 100 %
dsp (67 MB) [=======================================================================================] 100 %
featenabler (90 kB) [=======================================================================================] 100 %
hyp (406 kB) [=======================================================================================] 100 %
imagefv (537 kB) [=======================================================================================] 100 %
keymaster (246 kB) [=======================================================================================] 100 %
modem (145 MB) [=======================================================================================] 100 %
multiimgoem (16 kB) [=======================================================================================] 100 %
odm (1.0 MB) [=======================================================================================] 100 %
product (479 MB) [=======================================================================================] 100 %
qupfw (57 kB) [=======================================================================================] 100 %
recovery (101 MB) [=======================================================================================] 100 %
system (3.7 GB) [=======================================================================================] 100 %
system_ext (261 MB) [=======================================================================================] 100 %
tz (3.0 MB) [=======================================================================================] 100 %
uefisecapp (127 kB) [=======================================================================================] 100 %
vbmeta (8.2 kB) [=======================================================================================] 100 %
vbmeta_system (4.1 kB) [=======================================================================================] 100 %
vendor (650 MB) [=======================================================================================] 100 %
xbl (3.5 MB) [=======================================================================================] 100 %
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.