FORUMS

[GUIDE] OTA Tools LPUnpack

266 posts
Thanks Meter: 124
 
By bynarie, Senior Member on 28th January 2020, 06:11 AM
Post Reply Email Thread
Please see this URL https://android.googlesource.com/pla...b357879920b467 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.

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!

ALL CREDIT GOES TO HANETZER @ntzrmtthihu777 FOR ALL OF THIS INFORMATION
He taught me, I just wrote this!
The Following 4 Users Say Thank You to bynarie For This Useful Post: [ View ] Gift bynarie Ad-Free
28th January 2020, 09:47 AM |#2  
manan001's Avatar
Senior Member
Flag Ahmedabad
Thanks Meter: 482
 
More
We are waiting for good dev support to build twrp, custom roms and kernel.
28th January 2020, 10:40 AM |#3  
Senior Member
Thanks Meter: 403
 
More
Quote:
Originally Posted by manan001

We are waiting for good dev support to build twrp, custom roms and kernel.

Most kernels already support 7T/Pro. (Except Smurf)
Not that much on the ROM side but some are there.

Sent from my OnePlus7TPro using XDA Labs
28th January 2020, 02:52 PM |#4  
OP Senior Member
Flag Hilliard OH
Thanks Meter: 124
 
More
Quote:
Originally Posted by manan001

We are waiting for good dev support to build twrp, custom roms and kernel.

I agree. I just felt like a lot of people don't know about lpmake/lpunpack and wanted to share it. Think its a pretty cool tool.
28th January 2020, 03:29 PM |#5  
Senior Member
Thanks Meter: 68
 
Donate to Me
More
Bit of a clarification. If you call lpunpack without any flags, it will extract
{odm,product,system,vendor}_a.img properly without issue, but will create 'empty'
0 byte images for {odm,product,system,vendor}_b.img. In order to get the b-sides,
you must call it again like so:
Code:
./lpunpack --slot=1 super.img
@bynarie
23rd May 2020, 05:04 AM |#6  
Junior Member
Thanks Meter: 2
 
More
hello @All
How to repack super.img file from Odm.img.Product.img, system.img, vender.img
Pls help me , Thanks !
Yesterday, 01:36 PM |#7  
oslo83's Avatar
Senior Member
Thanks Meter: 407
 
Donate to Me
More
Any idea how I could build an arm version of lpunpack ?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes