diff --git a/tools/releasetools/check_partition_sizes.py b/tools/releasetools/check_partition_sizes.py
index 745c136..3047ddb 100644
--- a/tools/releasetools/check_partition_sizes.py
+++ b/tools/releasetools/check_partition_sizes.py
@@ -40,6 +40,7 @@
 
 logger = logging.getLogger(__name__)
 
+
 class Expression(object):
   def __init__(self, desc, expr, value=None):
     # Human-readable description
@@ -62,6 +63,20 @@
       else:
         logger.log(level, msg)
 
+  def CheckLt(self, other, level=logging.ERROR):
+    format_args = (self.desc, other.desc, self.expr, self.value,
+                   other.expr, other.value)
+    if self.value < other.value:
+      logger.info("%s is less than %s:\n%s == %d < %s == %d",
+                  *format_args)
+    else:
+      msg = "{} is greater than or equal to {}:\n{} == {} >= {} == {}".format(
+          *format_args)
+      if level == logging.ERROR:
+        raise RuntimeError(msg)
+      else:
+        logger.log(level, msg)
+
   def CheckEq(self, other):
     format_args = (self.desc, other.desc, self.expr, self.value,
                    other.expr, other.value)
@@ -116,7 +131,6 @@
             int(info_dict["super_partition_size"])
     self.info_dict = info_dict
 
-
   def _ReadSizeOfPartition(self, name):
     # Tests uses *_image_size instead (to avoid creating empty sparse images
     # on disk)
@@ -124,7 +138,6 @@
       return int(self.info_dict[name + "_image_size"])
     return sparse_img.GetImagePartitionSize(self.info_dict[name + "_image"])
 
-
   # Round result to BOARD_SUPER_PARTITION_ALIGNMENT
   def _RoundPartitionSize(self, size):
     alignment = self.info_dict.get("super_partition_alignment")
@@ -132,7 +145,6 @@
       return size
     return (size + alignment - 1) // alignment * alignment
 
-
   def _CheckSuperPartitionSize(self):
     info_dict = self.info_dict
     super_block_devices = \
@@ -239,7 +251,20 @@
       max_size = Expression(
           "BOARD_SUPER_PARTITION_SIZE{}".format(size_limit_suffix),
           int(info_dict["super_partition_size"]) // num_slots)
-      sum_size.CheckLe(max_size)
+      # Retrofit DAP will build metadata as part of super image.
+      if Dap.Get(info_dict) == Dap.RDAP:
+        sum_size.CheckLe(max_size)
+        return
+
+      sum_size.CheckLt(max_size)
+      # Display a warning if group size + 1M >= super size
+      minimal_metadata_size = 1024 * 1024  # 1MiB
+      sum_size_plus_metadata = Expression(
+          "sum of sizes of {} plus 1M metadata".format(groups),
+          "+".join(str(size) for size in
+                   group_size_list + [minimal_metadata_size]),
+          sum(group_size_list) + minimal_metadata_size)
+      sum_size_plus_metadata.CheckLe(max_size, level=logging.WARNING)
 
   def Run(self):
     self._CheckAllPartitionSizes()
diff --git a/tools/releasetools/test_check_partition_sizes.py b/tools/releasetools/test_check_partition_sizes.py
index ed20873..073d229 100644
--- a/tools/releasetools/test_check_partition_sizes.py
+++ b/tools/releasetools/test_check_partition_sizes.py
@@ -27,8 +27,8 @@
         dynamic_partition_list=system vendor product
         super_partition_groups=group
         super_group_partition_list=system vendor product
-        super_partition_size=200
-        super_super_device_size=200
+        super_partition_size=202
+        super_super_device_size=202
         super_group_group_size=100
         system_image_size=50
         vendor_image_size=20
@@ -41,8 +41,8 @@
   def test_non_ab(self):
     self.info_dict.update(common.LoadDictionaryFromLines("""
         ab_update=false
-        super_partition_size=100
-        super_super_device_size=100
+        super_partition_size=101
+        super_super_device_size=101
         """.split("\n")))
     CheckPartitionSizes(self.info_dict)
 
@@ -112,8 +112,8 @@
   def test_vab(self):
     self.info_dict.update(common.LoadDictionaryFromLines("""
         virtual_ab=true
-        super_partition_size=100
-        super_super_device_size=100
+        super_partition_size=101
+        super_super_device_size=101
         """.split("\n")))
     CheckPartitionSizes(self.info_dict)
 
