Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 212e5dfb authored by David Anderson's avatar David Anderson Committed by Hridya Valsaraju
Browse files

Add an extra metadata slot to super[_empty].img.

This change excludes retrofit devices from getting a third metadata
slot, until code is in place to correctly upgrade those devices through
fastbootd/update_engine.

Bug: 121149247
Test: lpdump super_empty.img
Change-Id: Id147c42cee93a1f6d61ee0edc9cddc0c0540a279
parent ada27155
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -78,10 +78,12 @@ def BuildSuperImageFromDict(info_dict, output):
  block_devices = shlex.split(info_dict.get("super_block_devices", "").strip())
  groups = shlex.split(info_dict.get("super_partition_groups", "").strip())

  if ab_update:
  if ab_update and retrofit:
    cmd += ["--metadata-slots", "2"]
  elif ab_update:
    cmd += ["--metadata-slots", "3"]
  else:
    cmd += ["--metadata-slots", "1"]
    cmd += ["--metadata-slots", "2"]

  if ab_update and retrofit:
    cmd.append("--auto-slot-suffixing")