certify_bootimg: support more archive formats

The common archive format in a kernel tree is usually *.tar.gz
rather than *.zip. Supports different archive formats for
--boot_img_archive (renamed from --boot_img_zip).

An usage example:
  certify_bootimg --boot_img_archive boot-img.tar.gz \
      --algorithm SHA256_RSA4096 \
      --key external/avb/test/data/testkey_rsa4096.pem \
      --extra_args "--prop foo:bar" \
      --extra_args "--prop gki:nice" \
      --output boot-certified-img.tar.gz

The formats of the input archive and the output archive can
be different:
  certify_bootimg --boot_img_archive boot-img.zip \
      --algorithm SHA256_RSA4096 \
      --key external/avb/test/data/testkey_rsa4096.pem \
      --extra_args "--prop foo:bar" \
      --extra_args "--prop gki:nice" \
      --output boot-certified-img.tar

The supported archive formats in the python binary built by
the current Android build system are:
  shutil.get_unpack_formats():
    [('gztar', ['.tar.gz', '.tgz'], "gzip'ed tar-file"),
     ('tar', ['.tar'], 'uncompressed tar file'),
     ('zip', ['.zip'], 'ZIP file')]

Bug: 223288963
Test: atest --host certify_bootimg_test
Change-Id: I74542c435a7b16f66708530e1c00d6fa8331e4cd
2 files changed