Loading tools/releasetools/common.py +18 −2 Original line number Diff line number Diff line Loading @@ -173,10 +173,26 @@ def LoadRecoveryFSTab(zip): p.mount_point = pieces[0] p.fs_type = pieces[1] p.device = pieces[2] if len(pieces) == 4: p.length = 0 options = None if len(pieces) >= 4: if pieces[3].startswith("/"): p.device2 = pieces[3] if len(pieces) >= 5: options = pieces[4] else: p.device2 = None options = pieces[3] else: p.device2 = None if options: options = options.split(",") for i in options: if i.startswith("length="): p.length = int(i[7:]) else: print "%s: unknown option \"%s\"" % (p.mount_point, i) d[p.mount_point] = p return d Loading tools/releasetools/edify_generator.py +2 −4 Original line number Diff line number Diff line Loading @@ -172,11 +172,9 @@ class EdifyGenerator(object): fstab = self.info.get("fstab", None) if fstab: p = fstab[partition] # Reserve the last 16 Kbytes of an EMMC /data for the crypto footer if partition == "/data" and common.PARTITION_TYPES[p.fs_type] == "EMMC": reserve_size = -16384 self.script.append('format("%s", "%s", "%s", "%s");' % (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, reserve_size)) (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, p.length)) else: # older target-files without per-partition types partition = self.info.get("partition_path", "") + partition Loading Loading
tools/releasetools/common.py +18 −2 Original line number Diff line number Diff line Loading @@ -173,10 +173,26 @@ def LoadRecoveryFSTab(zip): p.mount_point = pieces[0] p.fs_type = pieces[1] p.device = pieces[2] if len(pieces) == 4: p.length = 0 options = None if len(pieces) >= 4: if pieces[3].startswith("/"): p.device2 = pieces[3] if len(pieces) >= 5: options = pieces[4] else: p.device2 = None options = pieces[3] else: p.device2 = None if options: options = options.split(",") for i in options: if i.startswith("length="): p.length = int(i[7:]) else: print "%s: unknown option \"%s\"" % (p.mount_point, i) d[p.mount_point] = p return d Loading
tools/releasetools/edify_generator.py +2 −4 Original line number Diff line number Diff line Loading @@ -172,11 +172,9 @@ class EdifyGenerator(object): fstab = self.info.get("fstab", None) if fstab: p = fstab[partition] # Reserve the last 16 Kbytes of an EMMC /data for the crypto footer if partition == "/data" and common.PARTITION_TYPES[p.fs_type] == "EMMC": reserve_size = -16384 self.script.append('format("%s", "%s", "%s", "%s");' % (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, reserve_size)) (p.fs_type, common.PARTITION_TYPES[p.fs_type], p.device, p.length)) else: # older target-files without per-partition types partition = self.info.get("partition_path", "") + partition Loading