Loading tools/releasetools/build_image.py +16 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,6 @@ def BuildImage(in_dir, prop_dict, out_file, build_command = [] fs_type = prop_dict.get("fs_type", "") run_fsck = False is_verity_partition = "verity_block_device" in prop_dict verity_supported = prop_dict.get("verity") == "true" # adjust the partition size to make room for the hashes if this is to be verified Loading @@ -244,6 +243,22 @@ def BuildImage(in_dir, prop_dict, out_file, build_command.extend(["-j", prop_dict["journal_size"]]) if "timestamp" in prop_dict: build_command.extend(["-T", str(prop_dict["timestamp"])]) else: #Timestamp not provided in property_dict. #Lets try to find the build.prop file and get the timestamp from there #instead path = in_dir + "/build.prop" if os.path.exists(path): with open(path) as f: lines = f.readlines() for line in lines: line = line.strip() if line.startswith("ro.build.date.utc"): name, value = line.split("=", 1) print "read ro.build.date.utc from build.prop as ", value build_command.extend(["-T", value]) else: print "unable to open build.prop file..Image will be built using system time" if fs_config is not None: build_command.extend(["-C", fs_config]) if block_list is not None: Loading Loading
tools/releasetools/build_image.py +16 −1 Original line number Diff line number Diff line Loading @@ -220,7 +220,6 @@ def BuildImage(in_dir, prop_dict, out_file, build_command = [] fs_type = prop_dict.get("fs_type", "") run_fsck = False is_verity_partition = "verity_block_device" in prop_dict verity_supported = prop_dict.get("verity") == "true" # adjust the partition size to make room for the hashes if this is to be verified Loading @@ -244,6 +243,22 @@ def BuildImage(in_dir, prop_dict, out_file, build_command.extend(["-j", prop_dict["journal_size"]]) if "timestamp" in prop_dict: build_command.extend(["-T", str(prop_dict["timestamp"])]) else: #Timestamp not provided in property_dict. #Lets try to find the build.prop file and get the timestamp from there #instead path = in_dir + "/build.prop" if os.path.exists(path): with open(path) as f: lines = f.readlines() for line in lines: line = line.strip() if line.startswith("ro.build.date.utc"): name, value = line.split("=", 1) print "read ro.build.date.utc from build.prop as ", value build_command.extend(["-T", value]) else: print "unable to open build.prop file..Image will be built using system time" if fs_config is not None: build_command.extend(["-C", fs_config]) if block_list is not None: Loading