def AddSuperEmpty(output_zip): """Create a super_empty.img and store it in output_zip.""" img = OutputFile(output_zip, OPTIONS.input_tmp, "IMAGES", "super_empty.img") build_super_image.BuildSuperImage(OPTIONS.info_dict, img.name) img.Write()
def BuildSuperEmpty(): framework_dict = common.LoadDictionaryFromFile( os.path.join(OPTIONS.product_out_framework, "misc_info.txt")) vendor_dict = common.LoadDictionaryFromFile( os.path.join(OPTIONS.product_out_vendor, "misc_info.txt")) # Regenerate super_empty.img if both partial builds enable DAP. If only the # the vendor build enables DAP, the vendor build's existing super_empty.img # will be reused. If only the framework build should enable DAP, super_empty # should be included in the --framework_images flag to copy the existing # super_empty.img from the framework build. if (framework_dict.get("use_dynamic_partitions") == "true") and (vendor_dict.get("use_dynamic_partitions") == "true"): logger.info("Building super_empty.img.") merged_dict = dict(vendor_dict) merged_dict.update( common.MergeDynamicPartitionInfoDicts( framework_dict=framework_dict, vendor_dict=vendor_dict, size_prefix="super_", size_suffix="_group_size", list_prefix="super_", list_suffix="_partition_list")) output_super_empty_path = os.path.join(OPTIONS.product_out_vendor, "super_empty.img") build_super_image.BuildSuperImage(merged_dict, output_super_empty_path)
def AddSuperSplit(output_zip): """Create split super_*.img and store it in output_zip.""" outdir = os.path.join(OPTIONS.input_tmp, "OTA") built = build_super_image.BuildSuperImage(OPTIONS.input_tmp, outdir) if built: for dev in OPTIONS.info_dict['super_block_devices'].strip().split(): img = OutputFile(output_zip, OPTIONS.input_tmp, "OTA", "super_" + dev + ".img") img.Write()