android_system_core/fs_mgr/liblp
David Anderson 140d053c02 liblp: Add a helper method for upgrading metadata on retrofit devices.
This adds a new MetadataBuilder constructor, NewForUpdate, that can be
used by update_engine to simplify upgrading metadata. It is safe to call
whether or not the device is a retrofit. If the metadata has block
devices assigned to a specific slot, and that slot matches the slot
suffix, it will ensure that an equivalent entry exists for the alternate
slot.

Thus, if the source slot is _a and the target slot is _b, and the
metadata has "system_a" as a block device but not "system_b", this will
automatically add "system_b" as a block device.

Bug: 116802789
Test: liblp_test gtest
Change-Id: Ie89d4dbf4c708b5705e658220227ebf33fcb1930
2018-11-09 16:03:40 -08:00
..
include/liblp liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
Android.bp liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00
builder.cpp liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
builder_test.cpp fastboot: Fix flashing both slots with dynamic partitions. 2018-11-06 11:43:03 -08:00
images.cpp liblp: Split super.img for retrofit devices. 2018-11-08 14:19:42 -08:00
images.h liblp: Split super.img for retrofit devices. 2018-11-08 14:19:42 -08:00
io_test.cpp liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
partition_opener.cpp liblp: Allow the super partition to span multiple block devices. 2018-10-24 19:08:37 -07:00
reader.cpp liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
reader.h liblp: Allow automatic slot suffixing of partition names. 2018-11-08 09:51:03 -08:00
test_partition_opener.cpp liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00
test_partition_opener.h liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00
utility.cpp liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
utility.h liblp: Add a helper method for upgrading metadata on retrofit devices. 2018-11-09 16:03:40 -08:00
utility_test.cpp liblp: Allow automatic slot suffixing of partition names. 2018-11-08 09:51:03 -08:00
writer.cpp liblp: Allow automatic slot suffixing of partition names. 2018-11-08 09:51:03 -08:00
writer.h liblp: Add an abstraction layer for opening partitions. 2018-10-24 14:18:38 -07:00