sign_virt_apex: Set hash_algorithm flag to sha256

sign_virt_apex actually resigns the virt apex images. Set the
hash_algorithm flag here, to be used for system/vendor images.

Bug: 262892300
Test: Builds
Change-Id: Ibdeaa0ab9a5e0b21cb5ec88940c6a8f968f897df
This commit is contained in:
Shikha Panwar 2023-01-03 06:00:26 +00:00
parent c9af1f16a7
commit 638119b9b4
1 changed files with 2 additions and 1 deletions

View File

@ -239,14 +239,15 @@ def AddHashTreeFooter(args, key, image_path):
image_size = ReadBytesSize(info['Image size'])
algorithm = info['Algorithm']
partition_name = descriptor['Partition Name']
hash_algorithm = descriptor['Hash Algorithm']
partition_size = str(image_size)
cmd = ['avbtool', 'add_hashtree_footer',
'--key', key,
'--algorithm', algorithm,
'--partition_name', partition_name,
'--partition_size', partition_size,
'--do_not_generate_fec',
'--hash_algorithm', hash_algorithm,
'--image', image_path]
if args.signing_args:
cmd.extend(shlex.split(args.signing_args))