Merge "Add a flag to skip compatibility check"
This commit is contained in:
@@ -71,6 +71,9 @@ Common options that apply to both of non-A/B and A/B OTAs
|
|||||||
partitions but the target build does. For A/B, when this flag is set,
|
partitions but the target build does. For A/B, when this flag is set,
|
||||||
--skip_postinstall is implied.
|
--skip_postinstall is implied.
|
||||||
|
|
||||||
|
--skip_compatibility_check
|
||||||
|
Skip adding the compatibility package to the generated OTA package.
|
||||||
|
|
||||||
Non-A/B OTA specific options
|
Non-A/B OTA specific options
|
||||||
|
|
||||||
-b (--binary) <file>
|
-b (--binary) <file>
|
||||||
@@ -221,6 +224,7 @@ OPTIONS.extracted_input = None
|
|||||||
OPTIONS.key_passwords = []
|
OPTIONS.key_passwords = []
|
||||||
OPTIONS.skip_postinstall = False
|
OPTIONS.skip_postinstall = False
|
||||||
OPTIONS.retrofit_dynamic_partitions = False
|
OPTIONS.retrofit_dynamic_partitions = False
|
||||||
|
OPTIONS.skip_compatibility_check = False
|
||||||
|
|
||||||
|
|
||||||
METADATA_NAME = 'META-INF/com/android/metadata'
|
METADATA_NAME = 'META-INF/com/android/metadata'
|
||||||
@@ -750,6 +754,11 @@ def AddCompatibilityArchiveIfTrebleEnabled(target_zip, output_zip, target_info,
|
|||||||
if not HasTrebleEnabled(target_zip, target_info):
|
if not HasTrebleEnabled(target_zip, target_info):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Skip adding the compatibility package as a workaround for b/114240221. The
|
||||||
|
# compatibility will always fail on devices without qualified kernels.
|
||||||
|
if OPTIONS.skip_compatibility_check:
|
||||||
|
return
|
||||||
|
|
||||||
# Full OTA carries the info for system/vendor both.
|
# Full OTA carries the info for system/vendor both.
|
||||||
if source_info is None:
|
if source_info is None:
|
||||||
AddCompatibilityArchive(True, True)
|
AddCompatibilityArchive(True, True)
|
||||||
@@ -2032,6 +2041,8 @@ def main(argv):
|
|||||||
OPTIONS.skip_postinstall = True
|
OPTIONS.skip_postinstall = True
|
||||||
elif o == "--retrofit_dynamic_partitions":
|
elif o == "--retrofit_dynamic_partitions":
|
||||||
OPTIONS.retrofit_dynamic_partitions = True
|
OPTIONS.retrofit_dynamic_partitions = True
|
||||||
|
elif o == "--skip_compatibility_check":
|
||||||
|
OPTIONS.skip_compatibility_check = True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@@ -2063,6 +2074,7 @@ def main(argv):
|
|||||||
"extracted_input_target_files=",
|
"extracted_input_target_files=",
|
||||||
"skip_postinstall",
|
"skip_postinstall",
|
||||||
"retrofit_dynamic_partitions",
|
"retrofit_dynamic_partitions",
|
||||||
|
"skip_compatibility_check",
|
||||||
], extra_option_handler=option_handler)
|
], extra_option_handler=option_handler)
|
||||||
|
|
||||||
if len(args) != 2:
|
if len(args) != 2:
|
||||||
|
Reference in New Issue
Block a user