Lines Matching defs:Partition
292 class Partition(object):
342 d[mount_point] = Partition(mount_point=mount_point, fs_type=pieces[2],
359 def AppendAVBSigningArgs(cmd, partition):
362 key_path = OPTIONS.info_dict.get("avb_" + partition + "_key_path")
363 algorithm = OPTIONS.info_dict.get("avb_" + partition + "_algorithm")
368 if avb_salt and partition != "vbmeta":
626 which: The partition name, which must be "system" or "vendor".
820 data: A string that contains all the data for the partition.
821 target: The partition name. The ".img" suffix is optional.
1524 def __init__(self, partition, tgt, src=None, check_first_block=False,
1528 self.partition = partition
1542 self.path = os.path.join(MakeTempDir(), partition)
1549 _, self.device = GetTypeAndDevice("/" + partition, OPTIONS.info_dict)
1551 _, self.device = GetTypeAndDevice("/" + partition,
1561 script.Print("Patching %s image unconditionally..." % (self.partition,))
1563 script.Print("Patching %s image after verification." % (self.partition,))
1578 partition = self.partition
1579 script.Print("Verifying %s..." % (partition,))
1591 partition = self.partition
1595 script.Print("Image %s will be patched unconditionally." % (partition,))
1616 self.device, partition, partition, partition))
1617 script.Print('Verified %s image...' % (partition,))
1625 # the superblock) of the partition to see if it's what we expect. If
1626 # this check fails, give an explicit log message about the partition
1632 if partition == "system":
1639 'package_extract_file("{partition}.transfer.list"), '
1640 '"{partition}.new.dat", "{partition}.patch.dat"), '
1641 'ui_print("{partition} recovered successfully."), '
1642 'abort("E{code}: {partition} partition fails to recover"));\n'
1644 partition=partition, code=code))
1647 # even if it may match the checksum of the target partition.
1649 # unconditionally and damage the partition.
1652 if partition == "system":
1657 'abort("E%d: %s partition has unexpected contents");\n'
1658 'endif;') % (code, partition))
1661 partition = self.partition
1662 script.Print('Verifying the updated %s image...' % (partition,))
1677 script.Print('Verified the updated %s image.' % (partition,))
1678 if partition == "system":
1684 ' abort("E%d: %s partition has unexpected non-zero contents after '
1686 'endif;' % (code, partition))
1688 script.Print('Verified the updated %s image.' % (partition,))
1690 if partition == "system":
1697 ' abort("E%d: %s partition has unexpected contents after OTA '
1699 'endif;' % (code, partition))
1704 '{}.transfer.list'.format(self.partition))
1718 print("Compressing {}.new.dat with brotli".format(self.partition))
1722 'compression of {}.new.dat failed'.format(self.partition)
1724 new_data_name = '{}.new.dat.br'.format(self.partition)
1730 new_data_name = '{}.new.dat'.format(self.partition)
1735 '{}.patch.dat'.format(self.partition),
1738 if self.partition == "system":
1744 'package_extract_file("{partition}.transfer.list"), '
1745 '"{new_data_name}", "{partition}.patch.dat") ||\n'
1746 ' abort("E{code}: Failed to update {partition} image.");'.format(
1747 device=self.device, partition=self.partition,
1772 # map recovery.fstab's fs_types to mount/format "partition types"