OSDN Git Service

Add an lpunpack tool for extracting partitions from super.img.
authorDavid Anderson <dvander@google.com>
Thu, 25 Apr 2019 01:16:27 +0000 (18:16 -0700)
committerDavid Anderson <dvander@google.com>
Fri, 26 Apr 2019 23:00:50 +0000 (23:00 +0000)
commit1f0277ae23c3f7a4c52629b666d020ebc4e9ac96
treea37e9f9c421dcef83f14c0fa0901c0c8115a7013
parent5e91e3fce339d94a0f8e90857c3f0aff07df27fa
Add an lpunpack tool for extracting partitions from super.img.

This tool performs the inverse of lpmake. It can extract partition
images out of a prebuilt super.img. There are a few caveats:

 - lpunpack does not support retrofit/split images.
 - lpunpack does not support sparse super images. They must be unsparsed
   before using with lpunpack.
 - Partition names will be suffixed on A/B devices, meaning,
   vendor_a.img will contain vendor.img and vendor_b.img will be
   0-length.

Note that lpunpack will store output files with holes for zero blocks,
as a space-saving measure.

Usage: lpunpack [options] SUPER_IMAGE [OUTPUT_DIR]

Bug: 131173010
Test: m superimage
      mm lpunpack
      lpunpack super.img
      lpunpack super.img out/
      lpunpack -p vendor_a super.img
      lpunpack -p unknown super.img
      sha1sum image with precursor image

Change-Id: Iad3f7362ae6ce767ddc7de2e8cfa7e4a47190e99
Merged-In: Iad3f7362ae6ce767ddc7de2e8cfa7e4a47190e99
partition_tools/Android.bp
partition_tools/lpunpack.cc [new file with mode: 0644]