support for per-partition fs_type (do not merge)
Include the recovery.fstab file in the recovery image. Remove the
global fs_type and partition_type values from the target-files
key/value dict, and parse the recovery.fstab file instead to find
types for each partition.
Change-Id: I35ee2dd0989441dc2a704b63c1b32e598049acb5
diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files
index d734ad0..2a0e4cc 100755
--- a/tools/releasetools/img_from_target_files
+++ b/tools/releasetools/img_from_target_files
@@ -61,9 +61,10 @@
img = tempfile.NamedTemporaryFile()
build_command = []
- if OPTIONS.info_dict.get("fs_type", "").startswith("ext"):
+ if OPTIONS.info_dict["fstab"]["/data"].fs_type.startswith("ext"):
build_command = ["mkuserimg.sh",
- user_dir, img.name, OPTIONS.info_dict["fs_type"], "userdata"]
+ user_dir, img.name,
+ OPTIONS.info_dict["fstab"]["/data"].fs_type, "userdata"]
if "userdata_size" in OPTIONS.info_dict:
build_command.append(str(OPTIONS.info_dict["userdata_size"]))
else:
@@ -108,10 +109,10 @@
pass
build_command = []
- if OPTIONS.info_dict.get("fs_type", "").startswith("ext"):
+ if OPTIONS.info_dict["fstab"]["/system"].fs_type.startswith("ext"):
build_command = ["mkuserimg.sh",
os.path.join(OPTIONS.input_tmp, "system"), img.name,
- OPTIONS.info_dict["fs_type"], "system"]
+ OPTIONS.info_dict["fstab"]["/system"].fs_type, "system"]
if "system_img" in OPTIONS.info_dict:
build_command.append(str(OPTIONS.info_dict["system_size"]))
else: