Please see this URL https://android.googlesource.com/platform/build.git/+/eec4a7cba4face3370acb6293ab357879920b467 and this for more information.
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.
Browse individual files
Download HERE
Usage on PC(linux):
**Make sure <output_directory> already exists as this tool will not create a directory for you and will error if not found.**
**If you run this command with no slot specified, it will output 0 byte empty b images.
To extract all A images:
To extract all B images:
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!
ALL CREDIT GOES TO HANETZER @ntzrmtthihu777 FOR ALL OF THIS INFORMATION 
He taught me, I just wrote this!
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.
Browse individual files
Download HERE
- Extract super.img from device
Code:
adb shell
Code:
su
Code:
dd if=/dev/block/by-name/super of=/sdcard/super.img
Code:
exit
Code:
exit
Code:
adb pull /sdcard/super.img
- Extract super.img with lpunpack
Usage on PC(linux):
Code:
./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).
**Make sure <output_directory> already exists as this tool will not create a directory for you and will error if not found.**
**If you run this command with no slot specified, it will output 0 byte empty b images.
To extract all A images:
Code:
./lpunpack --slot=0 <path-to-super.img> <output_dir>
To extract all B images:
Code:
./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!
Last edited: