Merge "Fix sparse image detection"

This commit is contained in:
Treehugger Robot
2023-03-07 23:41:43 +00:00
committed by Gerrit Code Review

View File

@@ -2121,9 +2121,7 @@ def GetUserImage(which, tmpdir, input_zip,
if info_dict is None: if info_dict is None:
info_dict = LoadInfoDict(input_zip) info_dict = LoadInfoDict(input_zip)
is_sparse = info_dict.get("extfs_sparse_flag") is_sparse = IsSparseImage(os.path.join(tmpdir, "IMAGES", which + ".img"))
if info_dict.get(which + "_disable_sparse"):
is_sparse = False
# When target uses 'BOARD_EXT4_SHARE_DUP_BLOCKS := true', images may contain # When target uses 'BOARD_EXT4_SHARE_DUP_BLOCKS := true', images may contain
# shared blocks (i.e. some blocks will show up in multiple files' block # shared blocks (i.e. some blocks will show up in multiple files' block