From 212e5dfb53dd1b1f59389e2463fc1b762d762e43 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 17 Dec 2018 12:52:25 -0800 Subject: [PATCH] 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 --- tools/releasetools/build_super_image.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/build_super_image.py b/tools/releasetools/build_super_image.py index e8730ae19a..c82a9eee65 100755 --- a/tools/releasetools/build_super_image.py +++ b/tools/releasetools/build_super_image.py @@ -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")