Skip to content

Commit

Permalink
Check for vintf compatiblity early in generation process
Browse files Browse the repository at this point in the history
Currently CheckVintfIfTrebleEnabled is called after generating payload.
Users have to wait for ~1 hour before vintf is checked. Do the check
early and fail early.

Test: th
Change-Id: I2e4a8c7eaa62c94c92973c127b1d825a26e63b35
  • Loading branch information
zhangxp1998 authored and hanifardhani committed Jun 25, 2022
1 parent 161abad commit 4e5a172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/releasetools/ota_from_target_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):
target_info.info_dict['ab_partitions'] = zfp.read(
AB_PARTITIONS).decode().strip().split("\n")

CheckVintfIfTrebleEnabled(target_file, target_info)

# Metadata to comply with Android OTA package format.
metadata = GetPackageMetadata(target_info, source_info)
# Generate payload.
Expand Down Expand Up @@ -1181,8 +1183,6 @@ def GenerateAbOtaPackage(target_file, output_file, source_file=None):

common.ZipClose(target_zip)

CheckVintfIfTrebleEnabled(target_file, target_info)

# We haven't written the metadata entry yet, which will be handled in
# FinalizeMetadata().
common.ZipClose(output_zip)
Expand Down

0 comments on commit 4e5a172

Please sign in to comment.