• Andrew Gunnerson's avatar
    Add support for replacing any partition image
    · 93dcd638
    Andrew Gunnerson создал
    
    
    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, replacing `vendor_dlkm` would update both `vbmeta_vendor` and
    `vbmeta`. 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
    
    Signed-off-by: default avatarAndrew Gunnerson <accounts+github@chiller3.com>
    93dcd638