Add support for replacing any partition image #103
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds support for replacing any partition image within the payload with a custom image. This is useful, for example, to add a custom kernel to an OTA, which may involve partitions that wouldn't normally be touched (eg.
vendor_dlkm
).Any image specified via
--replace
will have its corresponding descriptor in the vbmeta image updated. This is handled recursively. For example, replacingvendor_dlkm
would update bothvbmeta_vendor
andvbmeta
. This requires all vbmeta images to be extracted during the patching process so that a complete dependency graph can be computed. The performance hit in doing so is negligible, but does require the checksums of the stripped images to be updated for the tests.Fixes: #102