summaryrefslogtreecommitdiff
path: root/partition_tools
AgeCommit message (Collapse)Author
2019-05-23lpdump: Add an option to print the metadata size to stdout.David Anderson
This also adds --is-super-empty if the caller knows the file is a super_empty.img, which helps suppress spurious output. Bug: 117997386 Test: lpdump --is-super-empty --dump-metadata-size super_empty.img Change-Id: I5999442c097c0ef1d6a70e844993b2164f3b091d
2019-04-25Add an lpunpack tool for extracting partitions from super.img.David Anderson
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
2019-04-03lpmake: allow to build non-sparse super image.Yifan Hong
Bug: 120041578 Test: build without --sparse but with --image. Change-Id: Iaaa8324fa1f9e8e6785f96e787c8a4ee23d37982
2019-03-28lpdump: log warning message.Yifan Hong
Warning messages were placed in the output stream as well. Put them in logcat so that stdout is always a valid JSON string. Test: lpdump --json on walleye Bug: 126233777 Change-Id: If313eeaee9c347c498818f53decdf092328f142c
2019-03-20lpdump: Add --json optionYifan Hong
This option outputs in JSON format. In addition, it emits information like usage data on mounted file systems, and block size of super block devices. Test: `lpdump --json` on host and device Bug: 126233777 Change-Id: Iad68eb3932f317637e07cd692cdebe71e52db769
2019-03-20Make lpdump possible without root.Yifan Hong
Test: adb unroot && adb shell lpdump Bug: 126233777 Change-Id: Ie559072fe53fee43d7c4a9e8f97a89d979e5b9bc
2019-03-19lpdump: refactor to use std::ostreamYifan Hong
... so that the output stream / error stream can be replaced with stringstream later. Test: lpdump Bug: 126233777 Change-Id: I837554b0289a5d669f0f89d35e7da1b79dd33b28
2018-12-12lpdump: Automatically read from super when used directly on devices.David Anderson
It's confusing to figure out how to invoke lpdump, especially on retrofit devices. It should just do the correct thing automatically when no arguments are passed. Bug: N/A Test: lpdump on retrofit device Change-Id: I0563c10ff276763710fa0a4fb9918a2515f9d054
2018-11-19lpdump: Show block device and group flags.David Anderson
Bug: N/A Test: manual test Change-Id: I6063fc416eef130e4c29168d9a265cc29f462b38
2018-11-13lpdump: Allow reading local partition images.David Anderson
PartitionOpener expects a partition name, but for debugging, lpdump should be able to open a local file too. Bug: N/A Test: manual test Change-Id: I85f6ce7f3508cf4343d89ea368309a6e960af938
2018-11-08lpmake: Allow writing split super images.David Anderson
To use this mode, the build must be a retrofit build and --output should be a folder rather than a file. This also fixes a bug in lpdump where it refuses to dump full super.img images on the host. Bug: 118887112 Test: manual test Change-Id: I3318684fbea6fe67bfa171001beea3a5c560fbab
2018-11-08partition_tools: Update for auto-slot-suffixing.David Anderson
lpmake: Add --auto-slot-suffixing for retrofit builds. lpdump: Show the slot-suffixed flag when dumping super_empty. Bug: 116802789 Test: manual test Change-Id: I65e1d4d6922d117b9dcdbfbf9ced045c97549e59
2018-10-26partition_tools: Update for multiple block device support.David Anderson
lpmake: Support multiple block devices in super. This adds a --device command that can be used to span super across multiple block devices. Example: lpmake --device "system_a:10240000:0:0" --device "vendor_a:5120000:0:0" --device "product_a:2560000:0:0" ... lpdump: Display the block device for each extent. Bug: 116802789 Test: manual test of lpmake Test: lpdump /dev/block/by-name/super Change-Id: I2e0ec54daf3b4fde04115ea646a7622426f67496
2018-10-22partition_tools: Update lpdump for metadata format changes.David Anderson
Bug: 116802789 Test: lpdump super_empty.img Change-Id: I62cd28333413897e30a4673b7f97490c984f6611
2018-10-11partition_tools: Update lpdump to build against liblp changes.David Anderson
Bug: 116802789 Test: mm lpdump Change-Id: If559c07e403fdeddc3a44e2cad7e5435bdd71ca6
2018-10-04partition_tools: Remove references to partition guid.David Anderson
Bug: 117229984 Test: builds with PRODUCT_USE_LOGICAL_PARTITIONS=true Change-Id: Ibba49f7a066fd190f8431253302f1437f07ba6dd
2018-10-02partition_tools: Add support for partition groups.David Anderson
lpmake: Add a new -g/--groups parameter to add partition groups. The syntax is name:size. In addition, a fifth argument can be added to -p/--partition, to specify a group for that partition. Example: lpmake --group google:102400000 \ --partition system:UUID:readonly:4096:google In addition, lpdump will now display the groups table and group assignments. Bug: 116817738 Test: lpmake with --groups lpdump new partition table Change-Id: Ic1eb995f3bcf5abc7be180ac03c8ba4b82a10045
2018-08-16lpflash: Update for FlashPartitionTable changes.David Anderson
Bug: N/A Test: mmm system/extras/partition_tools Change-Id: I0803c6ce48fa19ef9564c2af866e4a081d84ea36
2018-08-02lpmake: Pass the block size to MetadataBuilder.David Anderson
Bug: 79173901 Test: lpmake builds Change-Id: I6e7e5f24c5819250f82d100f47aa15938f7cb039
2018-08-01partition_tools: Use ResizePartition instead of GrowPartition.David Anderson
Bug: 79173901 Test: N/A Change-Id: I1b13883f5089a00e7c4637ebb2e5bdb44a50d11e
2018-07-27Build partition_tools with liblp as a shared library.David Anderson
Bug: 79173901 Test: mmm partition_tools builds Change-Id: Ib96867aeb0a2a3ad777c5017fbc882adeb41a129
2018-07-17lpmake: Add an option for including partition data in sparse images.David Anderson
Bug: 79173901 Test: lpmake -S -i with an ext4 image can be mounted after flashing Change-Id: I82ab5b34e56915c0a01bb11aacca1c3b00d294e9
2018-07-17lpmake: Pass a block size to WriteToSparseFile.David Anderson
Note: The default block size is 4096. Bug: 79173901 Test: lpmake -S can be flashed to Pixel 2 Change-Id: I44a96126edddbaedf078c3a59be3a74df89c0d74
2018-07-17partition_tools: Add a README.md.David Anderson
Bug: 79173901 Test: N/A Change-Id: I07a0948d04c2300ecf719a812cdd70cbbfb298e7
2018-07-13lpmake: Add a --sparse option for creating super partition images.David Anderson
This change allows creating a sparse image of the super partition, which can then be flashed using fastboot. Bug: 79173901 Test: N/A Change-Id: Ic49f843a47d5c222ce35ce1bda90fc8c0be578c8
2018-07-12partition_tools: Use the new liblp header layout.David Anderson
Bug: 79173901 Test: N/A Change-Id: Idb5cf17843262102d3db5722a6ec32110634d40e
2018-07-10lpflash: Use the new liblp API.David Anderson
Bug: 79173901 Test: N/A Change-Id: Ica97a4547e353847e971e46447a7d14fc8d86634
2018-07-09lpmake: Use a default alignment of 1MiB.David Anderson
Bug: 79173901 Test: N/A Change-Id: I1a458980b846f8227adf837ea8fed93acab0857e
2018-06-22Add standalone tools for logical partitions.David Anderson
This introduces three standalone tools: lpmake, lpdump, and lpflash. lpmake should be run on the host and will output a partition table image that can be flashed to a block device. An example invocation: lpmake --device-size 268435456 --metadata-size 131072 \ --metadata-slots 2 --output lptable.img \ --partition "cache:7837d8ea-a9cb-425f-809f-de8d9670f3c7:none:209715200" lpdump is a diagnostic tool that will print the contents of a logical partition table. It can inspect either an image file (from lpmake) or a live physical partition on a device. lpflash is a helper tool until fastboot supports logical partitions. It must be run on a device, and will write a partition table image (created by lpmake) to a block device. Bug: 79173901 Test: N/A Change-Id: Iac0863c8d42b5d6508c30b1f298fbdff07653696