Hi everyone. I'm surprised I havent seen a thread about ota tools yet and lpunpack. This zip file contains a lot of useful tools for modifying super.img and making super.img as well as other tools found in other toolkits. This was just compiled using aosp master. The most useful function is the lpunpack tool which can extract a super.img into system, vendor, odm and product images.
- Extract super.img from device
dd if=/dev/block/by-name/super of=/sdcard/super.img
adb pull /sdcard/super.img
- Extract super.img with lpunpack
Usage on PC(linux):
./lpunpack - command-line tool for extracting partition images from super Usage: ./lpunpack [options...] SUPER_IMAGE [OUTPUT_DIR] Options: -p, --partition=NAME Extract the named partition. This can be specified multiple times. -S, --slot=NUM Slot number (default is 0).
**If you run this command with no slot specified, it will output 0 byte empty b images.
To extract all A images:
./lpunpack --slot=0 <path-to-super.img> <output_dir>
./lpunpack --slot=1 <path-to-super.img> <output_dir>
This program can take a couple minutes to run. After it is complete, your $output_dir will contain vendor, system, product and odm with either _a or _b.
Thanks for reading!
He taught me, I just wrote this!