Merge "Fix non-AB OTA signing issue"

This commit is contained in:
Treehugger Robot 2023-01-24 04:51:44 +00:00 committed by Gerrit Code Review
commit b62c0fdcaa
2 changed files with 4 additions and 2 deletions

View file

@ -282,7 +282,7 @@ endif;
needed_property_files = (
NonAbOtaPropertyFiles(),
)
FinalizeMetadata(metadata, staging_file, output_file, needed_property_files)
FinalizeMetadata(metadata, staging_file, output_file, needed_property_files, package_key=OPTIONS.package_key)
def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_file):
@ -537,7 +537,7 @@ endif;
needed_property_files = (
NonAbOtaPropertyFiles(),
)
FinalizeMetadata(metadata, staging_file, output_file, needed_property_files)
FinalizeMetadata(metadata, staging_file, output_file, needed_property_files, package_key=OPTIONS.package_key)
def GenerateNonAbOtaPackage(target_file, output_file, source_file=None):

View file

@ -132,8 +132,10 @@ def FinalizeMetadata(metadata, input_file, output_file, needed_property_files=No
# Re-sign the package after updating the metadata entry.
if no_signing:
logger.info(f"Signing disabled for output file {output_file}")
shutil.copy(prelim_signing, output_file)
else:
logger.info(f"Signing the output file {output_file} with key {package_key}")
SignOutput(prelim_signing, output_file, package_key, pw)
# Reopen the final signed zip to double check the streaming metadata.