Dismiss Xcode automation permission dialog, kill Xcode when killing processes

Reland of https://flutter-review.googlesource.com/c/recipes/+/49240.

Change-Id: Ie75ca23264495500e442ae71fb83efff94d8efdd
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/49880
Reviewed-by: Ricardo Amador <ricardoamador@google.com>
Commit-Queue: Victoria Ashworth <vashworth@google.com>
diff --git a/.gitignore b/.gitignore
index b746e8d..ff95628 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 .idea/misc.xml
 /.idea/
 README.recipes.md
+.DS_Store
diff --git a/recipe_modules/os_utils/api.py b/recipe_modules/os_utils/api.py
index 1dd2a30..e9c9629 100644
--- a/recipe_modules/os_utils/api.py
+++ b/recipe_modules/os_utils/api.py
@@ -9,6 +9,8 @@
 from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
 
 TIMEOUT_PROPERTY = 'ios_debug_symbol_doctor_timeout_seconds'
+XCODE_AUTOMATION_DB = 'TCC.db'
+XCODE_AUTOMATION_BACKUP_DB = 'TCC.db.backup'
 
 
 class OsUtilsApi(recipe_api.RecipeApi):
@@ -174,6 +176,11 @@
             ok_ret='any',
             infra_step=True
         )
+        self.m.step(
+            'kill Xcode', ['killall', '-9', 'Xcode'],
+            ok_ret='any',
+            infra_step=True
+        )
       else:
         self.m.step(
             'kill chrome', ['pkill', 'chrome'], ok_ret='any', infra_step=True
@@ -300,7 +307,7 @@
         )
 
   def dismiss_dialogs(self):
-    """Dismisses iOS dialogs to avoid problems.
+    """Dismisses iOS and macOS dialogs to avoid problems.
 
     Args:
       flutter_path(Path): A path to the checkout of the flutter sdk repository.
@@ -308,24 +315,236 @@
     if str(self.m.swarming.bot_id
           ).startswith('flutter-devicelab') and self.m.platform.is_mac:
       with self.m.step.nest('Dismiss dialogs'):
-        cocoon_path = self._checkout_cocoon()
-        resource_name = self.resource('dismiss_dialogs.sh')
-        self.m.step(
-            'Set execute permission',
-            ['chmod', '755', resource_name],
+        with self.m.step.nest('Dismiss iOS dialogs'):
+          cocoon_path = self._checkout_cocoon()
+          resource_name = self.resource('dismiss_dialogs.sh')
+          self.m.step(
+              'Set execute permission',
+              ['chmod', '755', resource_name],
+              infra_step=True,
+          )
+          with self.m.context(
+              cwd=cocoon_path.join('cipd_packages', 'device_doctor', 'tool',
+                                   'infra-dialog'),
+              infra_steps=True,
+          ):
+            device_id = self.m.step(
+                'Find device id', ['idevice_id', '-l'],
+                stdout=self.m.raw_io.output_text()
+            ).stdout.rstrip()
+            cmd = [resource_name, device_id]
+            self.m.step('Run app to dismiss dialogs', cmd)
+        with self.m.step.nest('Dismiss Xcode automation dialogs'):
+          self._dismiss_xcode_automation_dialogs(device_id)
+
+  def _dismiss_xcode_automation_dialogs(self, device_id):
+    """Dismiss Xcode automation permission dialog and update permission db.
+
+    Only required for CoreDevices (physical iOS 17+ devices) or "xcode_debug" tests.
+
+    Args:
+      device_id(string): A string of the selected device's UDID.
+    """
+
+    # Get list of wired CoreDevices.
+    # Allow any return code and ignore failure since this command will only
+    # work with Xcode 15 and therefore may not work for all machines.
+    self.m.step(
+        'List CoreDevices',
+        [
+            'xcrun',
+            'devicectl',
+            'list',
+            'devices',
+            '-v',
+        ],
+        infra_step=True,
+        raise_on_failure=False,
+        ok_ret='any',
+    )
+
+    device_list = self.m.step(
+        'Find wired CoreDevices',
+        [
+            'xcrun',
+            'devicectl',
+            'list',
+            'devices',
+            '--filter',
+            "connectionProperties.transportType CONTAINS 'wired'",
+            '-v',
+        ],
+        stdout=self.m.raw_io.output_text(),
+        infra_step=True,
+        raise_on_failure=False,
+        ok_ret='any',
+    ).stdout.rstrip()
+
+    builder_name = self.m.properties.get('buildername')
+
+    self.m.step.empty("Get buildername", step_text=builder_name)
+
+    # Skip the rest of this step if the device is not a CoreDevice and the
+    # builder name doesn't contain 'xcode_debug'.
+    # Builders with 'xcode_debug' in the name force tests the workflow that
+    # requires this permission.
+    if device_id not in device_list and 'xcode_debug' not in builder_name:
+      return
+
+    tcc_directory_path, db_path, backup_db_path = self._get_tcc_path()
+
+    # Ensure db exists
+    self.m.step(
+        'List TCC directory',
+        ['ls', tcc_directory_path],
+        infra_step=True,
+    )
+
+    files = self.m.step(
+        'Find TCC directory',
+        ['ls', tcc_directory_path],
+        stdout=self.m.raw_io.output_text(),
+        infra_step=True,
+    ).stdout.rstrip()
+
+    if XCODE_AUTOMATION_DB not in files:
+      self.m.step.empty(
+          'Failed to find TCC.db',
+          status=self.m.step.INFRA_FAILURE,
+      )
+
+    # Print contents of db for potential debugging purposes.
+    self._query_automation_db_step(db_path)
+
+    # Create backup db if there isn't one.
+    # If there is already a backup, it's most likely that a previous run did
+    # not complete correctly and did not get reset, so don't overwrite the backup.
+    if XCODE_AUTOMATION_BACKUP_DB not in files:
+      self.m.step(
+          'Create backup db',
+          ['cp', db_path, backup_db_path],
+          infra_step=True,
+      )
+
+    # Run an arbitrary AppleScript Xcode command to trigger permissions dialog.
+    # The AppleScript counts how many Xcode windows are open.
+    # The script will hang if permission has not been given, so timeout after
+    # a few seconds.
+    self.m.step(
+        'Trigger dialog',
+        [
+            'osascript',
+            '-e',
+            'tell app "Xcode"',
+            '-e',
+            'launch',
+            '-e',
+            'count window',
+            '-e',
+            'end tell',
+        ],
+        infra_step=True,
+        raise_on_failure=False,
+        ok_ret='any',
+        timeout=2,
+    )
+
+    # Kill the dialog. After killing the dialog, an entry for the app requesting
+    # control of Xcode should automatically be added to the db.
+    self.m.step(
+        'Dismiss dialog',
+        ['killall', '-9', 'UserNotificationCenter'],
+        infra_step=True,
+        ok_ret='any',
+    )
+
+    # Print contents of db for potential debugging purposes.
+    self._query_automation_db_step(db_path)
+
+    # Update the db to make it think permission was given.
+    self.m.step(
+        'Update db',
+        [
+            'sqlite3', db_path,
+            "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+        ],
+        infra_step=True,
+    )
+
+    # Print contents of db for potential debugging purposes.
+    self._query_automation_db_step(db_path)
+
+    # Xcode was opened by Applescript, so kill it.
+    self.m.step(
+        'Kill Xcode',
+        ['killall', '-9', 'Xcode'],
+        infra_step=True,
+        ok_ret='any',
+    )
+
+  def _get_tcc_path(self):
+    """Constructs paths to the TCC directory, TCC db, and TCC backup db.
+
+    Returns:
+        A tuple of strings representing the paths to the TCC directory, TCC db, and TCC backup db.
+    """
+    home_path = 'Users/fakeuser' if self._test_data.enabled else os.environ.get(
+        'HOME'
+    )
+    tcc_directory_path = os.path.join(
+        str(home_path), 'Library/Application Support/com.apple.TCC'
+    )
+    db_path = os.path.join(tcc_directory_path, XCODE_AUTOMATION_DB)
+    backup_db_path = os.path.join(
+        tcc_directory_path, XCODE_AUTOMATION_BACKUP_DB
+    )
+    return tcc_directory_path, db_path, backup_db_path
+
+  def _query_automation_db_step(self, db_path):
+    """Queries the TCC database.
+
+    Args:
+      db_path(string): A string of the path to the sqlite database.
+    """
+    self.m.step(
+        'Query TCC db',
+        [
+            'sqlite3', db_path,
+            'SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = "kTCCServiceAppleEvents"'
+        ],
+        infra_step=True,
+    )
+
+  def reset_automation_dialogs(self):
+    """Reset Xcode Automation permissions."""
+    if str(self.m.swarming.bot_id
+          ).startswith('flutter-devicelab') and self.m.platform.is_mac:
+      with self.m.step.nest('Reset Xcode automation dialogs'):
+        tcc_directory_path, db_path, backup_db_path = self._get_tcc_path()
+
+        files = self.m.step(
+            'Find TCC directory',
+            ['ls', tcc_directory_path],
+            stdout=self.m.raw_io.output_text(),
             infra_step=True,
+            raise_on_failure=False,
+            ok_ret='any',
+        ).stdout.rstrip()
+
+        if XCODE_AUTOMATION_BACKUP_DB not in files:
+          return
+
+        self.m.step(
+            'Restore from backup db',
+            ['cp', backup_db_path, db_path],
         )
-        with self.m.context(
-            cwd=cocoon_path.join('cipd_packages', 'device_doctor', 'tool',
-                                 'infra-dialog'),
-            infra_steps=True,
-        ):
-          device_id = self.m.step(
-              'Find device id', ['idevice_id', '-l'],
-              stdout=self.m.raw_io.output_text()
-          ).stdout.rstrip()
-          cmd = [resource_name, device_id]
-          self.m.step('Run app to dismiss dialogs', cmd)
+        self.m.step(
+            'Remove backup',
+            ['rm', backup_db_path],
+        )
+
+        # Print contents of db for potential debugging purposes.
+        self._query_automation_db_step(db_path)
 
   def _checkout_cocoon(self):
     """Checkout cocoon at HEAD to the cache and return the path."""
diff --git a/recipe_modules/os_utils/examples/full.expected/clean_derived_data.json b/recipe_modules/os_utils/examples/full.expected/clean_derived_data.json
index 4e0de01..9112833 100644
--- a/recipe_modules/os_utils/examples/full.expected/clean_derived_data.json
+++ b/recipe_modules/os_utils/examples/full.expected/clean_derived_data.json
@@ -221,6 +221,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -304,12 +316,19 @@
   },
   {
     "cmd": [],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [
       "python3",
       "-u",
@@ -319,9 +338,9 @@
       "--url",
       "https://flutter.googlesource.com/mirrors/cocoon"
     ],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git setup",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -339,9 +358,9 @@
       "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
     },
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git fetch",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -353,9 +372,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git checkout",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -366,9 +385,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.read revision",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
       "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
     ]
@@ -383,9 +402,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git clean",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -396,9 +415,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule sync",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -411,9 +430,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule update",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -423,9 +442,9 @@
       "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
     ],
     "infra_step": true,
-    "name": "Dismiss dialogs.Set execute permission",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -435,9 +454,9 @@
     ],
     "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
     "infra_step": true,
-    "name": "Dismiss dialogs.Find device id",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -447,7 +466,191 @@
     ],
     "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
     "infra_step": true,
-    "name": "Dismiss dialogs.Run app to dismiss dialogs",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"Xcode\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
diff --git a/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_find_db.json b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_find_db.json
new file mode 100644
index 0000000..17de95f
--- /dev/null
+++ b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_find_db.json
@@ -0,0 +1,558 @@
+[
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor"
+  },
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "pub",
+      "get"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.pub get device_doctor",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "[CACHE]/cocoon/cipd_packages/device_doctor/bin/ios_debug_symbol_doctor.dart",
+      "diagnose"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.diagnose",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Killing Processes"
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "dart"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill dart",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "flutter"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill flutter",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Chrome"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Chrome",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Safari"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "java"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "adb"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "top",
+      "-l",
+      "3",
+      "-o",
+      "mem"
+    ],
+    "infra_step": true,
+    "name": "OS info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/python3"
+    ],
+    "infra_step": true,
+    "name": "python3 xattr info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/git"
+    ],
+    "infra_step": true,
+    "name": "git xattr info"
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "rmtree",
+      "[CLEANUP]/tmp_tmp_1"
+    ],
+    "infra_step": true,
+    "name": "temp dir for Create temp directory"
+  },
+  {
+    "cmd": [
+      "rm",
+      "-rf",
+      "[HOME]/Library/Developer/Xcode/DerivedData"
+    ],
+    "infra_step": true,
+    "name": "Delete mac deriveddata"
+  },
+  {
+    "cmd": [],
+    "name": "Shutdown simulators"
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "shutdown",
+      "all"
+    ],
+    "name": "Shutdown simulators.Shutdown simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "erase",
+      "all"
+    ],
+    "name": "Shutdown simulators.Erase simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "chmod",
+      "755",
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "idevice_id",
+      "-l"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh",
+      ""
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Failed to find TCC.db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "failure": {
+      "humanReason": "Infra Failure: Step('Dismiss dialogs.Dismiss Xcode automation dialogs.Failed to find TCC.db') (retcode: 0)"
+    },
+    "name": "$result"
+  }
+]
\ No newline at end of file
diff --git a/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_skip_if_not_core_device.json b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_skip_if_not_core_device.json
new file mode 100644
index 0000000..33763af
--- /dev/null
+++ b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_skip_if_not_core_device.json
@@ -0,0 +1,556 @@
+[
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor"
+  },
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "pub",
+      "get"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.pub get device_doctor",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "[CACHE]/cocoon/cipd_packages/device_doctor/bin/ios_debug_symbol_doctor.dart",
+      "diagnose"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.diagnose",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Killing Processes"
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "dart"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill dart",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "flutter"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill flutter",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Chrome"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Chrome",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Safari"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "java"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "adb"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "top",
+      "-l",
+      "3",
+      "-o",
+      "mem"
+    ],
+    "infra_step": true,
+    "name": "OS info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/python3"
+    ],
+    "infra_step": true,
+    "name": "python3 xattr info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/git"
+    ],
+    "infra_step": true,
+    "name": "git xattr info"
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "rmtree",
+      "[CLEANUP]/tmp_tmp_1"
+    ],
+    "infra_step": true,
+    "name": "temp dir for Create temp directory"
+  },
+  {
+    "cmd": [
+      "rm",
+      "-rf",
+      "[HOME]/Library/Developer/Xcode/DerivedData"
+    ],
+    "infra_step": true,
+    "name": "Delete mac deriveddata"
+  },
+  {
+    "cmd": [],
+    "name": "Shutdown simulators"
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "shutdown",
+      "all"
+    ],
+    "name": "Shutdown simulators.Shutdown simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "erase",
+      "all"
+    ],
+    "name": "Shutdown simulators.Erase simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs"
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "chmod",
+      "755",
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "idevice_id",
+      "-l"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh",
+      "123456789"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@Mac flutter_gallery_ios__start_up@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ln",
+      "-s",
+      "/a/file",
+      "/a/b/c/simlink"
+    ],
+    "infra_step": true,
+    "name": "Link /a/b/c/simlink to /a/file"
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "com.apple.CoreSimulator.CoreSimulatorDevice"
+    ],
+    "infra_step": true,
+    "name": "kill dart"
+  },
+  {
+    "name": "$result"
+  }
+]
\ No newline at end of file
diff --git a/recipe_modules/os_utils/examples/full.expected/ios_debug_symbol_doctor_fails_then_succeeds.json b/recipe_modules/os_utils/examples/full.expected/ios_debug_symbol_doctor_fails_then_succeeds.json
index 3f03cbe..fe0a927 100644
--- a/recipe_modules/os_utils/examples/full.expected/ios_debug_symbol_doctor_fails_then_succeeds.json
+++ b/recipe_modules/os_utils/examples/full.expected/ios_debug_symbol_doctor_fails_then_succeeds.json
@@ -255,6 +255,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -338,12 +350,19 @@
   },
   {
     "cmd": [],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [
       "python3",
       "-u",
@@ -353,9 +372,9 @@
       "--url",
       "https://flutter.googlesource.com/mirrors/cocoon"
     ],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git setup",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -373,9 +392,9 @@
       "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
     },
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git fetch",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -387,9 +406,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git checkout",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -400,9 +419,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.read revision",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
       "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
     ]
@@ -417,9 +436,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git clean",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -430,9 +449,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule sync",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -445,9 +464,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule update",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -457,9 +476,9 @@
       "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
     ],
     "infra_step": true,
-    "name": "Dismiss dialogs.Set execute permission",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -469,9 +488,9 @@
     ],
     "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
     "infra_step": true,
-    "name": "Dismiss dialogs.Find device id",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -481,7 +500,191 @@
     ],
     "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
     "infra_step": true,
-    "name": "Dismiss dialogs.Run app to dismiss dialogs",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"Xcode\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
diff --git a/recipe_modules/os_utils/examples/full.expected/mac.json b/recipe_modules/os_utils/examples/full.expected/mac.json
index e7cb2d3..56757d5 100644
--- a/recipe_modules/os_utils/examples/full.expected/mac.json
+++ b/recipe_modules/os_utils/examples/full.expected/mac.json
@@ -77,6 +77,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_fails_find_db.json b/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_fails_find_db.json
new file mode 100644
index 0000000..9308ce2
--- /dev/null
+++ b/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_fails_find_db.json
@@ -0,0 +1,713 @@
+[
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor"
+  },
+  {
+    "cmd": [],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "pub",
+      "get"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.pub get device_doctor",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "dart",
+      "[CACHE]/cocoon/cipd_packages/device_doctor/bin/ios_debug_symbol_doctor.dart",
+      "diagnose"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor",
+    "infra_step": true,
+    "name": "ios_debug_symbol_doctor.diagnose",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Killing Processes"
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "dart"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill dart",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "flutter"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill flutter",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Chrome"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Chrome",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Safari"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "java"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "adb"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Safari (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "top",
+      "-l",
+      "3",
+      "-o",
+      "mem"
+    ],
+    "infra_step": true,
+    "name": "OS info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/python3"
+    ],
+    "infra_step": true,
+    "name": "python3 xattr info"
+  },
+  {
+    "cmd": [
+      "xattr",
+      "/opt/s/w/ir/cipd_bin_packages/git"
+    ],
+    "infra_step": true,
+    "name": "git xattr info"
+  },
+  {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "rmtree",
+      "[CLEANUP]/tmp_tmp_1"
+    ],
+    "infra_step": true,
+    "name": "temp dir for Create temp directory"
+  },
+  {
+    "cmd": [
+      "rm",
+      "-rf",
+      "[HOME]/Library/Developer/Xcode/DerivedData"
+    ],
+    "infra_step": true,
+    "name": "Delete mac deriveddata"
+  },
+  {
+    "cmd": [],
+    "name": "Shutdown simulators"
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "shutdown",
+      "all"
+    ],
+    "name": "Shutdown simulators.Shutdown simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sudo",
+      "xcrun",
+      "simctl",
+      "erase",
+      "all"
+    ],
+    "name": "Shutdown simulators.Erase simulators",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs"
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python3",
+      "-u",
+      "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py",
+      "--path",
+      "[CACHE]/cocoon",
+      "--url",
+      "https://flutter.googlesource.com/mirrors/cocoon"
+    ],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "env": {
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
+    },
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "clean",
+      "-f",
+      "-d",
+      "-x"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "chmod",
+      "755",
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "idevice_id",
+      "-l"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh",
+      ""
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"Xcode\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db"
+    ],
+    "name": "Reset Xcode automation dialogs.Restore from backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "rm",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "name": "Reset Xcode automation dialogs.Remove backup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "infra_step": true,
+    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ln",
+      "-s",
+      "/a/file",
+      "/a/b/c/simlink"
+    ],
+    "infra_step": true,
+    "name": "Link /a/b/c/simlink to /a/file"
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "com.apple.CoreSimulator.CoreSimulatorDevice"
+    ],
+    "infra_step": true,
+    "name": "kill dart"
+  },
+  {
+    "name": "$result"
+  }
+]
\ No newline at end of file
diff --git a/recipe_modules/os_utils/examples/full.py b/recipe_modules/os_utils/examples/full.py
index 3291ffa..27dc436 100644
--- a/recipe_modules/os_utils/examples/full.py
+++ b/recipe_modules/os_utils/examples/full.py
@@ -9,6 +9,7 @@
     'flutter/os_utils',
     'recipe_engine/platform',
     'recipe_engine/properties',
+    'recipe_engine/raw_io',
 ]
 
 
@@ -23,6 +24,7 @@
   api.os_utils.shutdown_simulators()
   api.os_utils.enable_long_paths()
   api.os_utils.dismiss_dialogs()
+  api.os_utils.reset_automation_dialogs()
   api.os_utils.print_pub_certs()
   api.os_utils.is_symlink('/a/b/c/simlink')
   api.os_utils.symlink('/a/file', '/a/b/c/simlink')
@@ -33,6 +35,10 @@
   # For coverage.
   api.os_utils.is_symlink(True)
 
+  xcode_dismiss_dialog_find_db_step = api.step_data(
+      'Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory',
+      stdout=api.raw_io.output_text('TCC.db'),
+  )
   yield api.test(
       'basic',
       api.platform('win', 64),
@@ -44,6 +50,7 @@
   yield api.test(
       'ios_debug_symbol_doctor_fails_then_succeeds',
       api.step_data('ios_debug_symbol_doctor.diagnose', retcode=1),
+      xcode_dismiss_dialog_find_db_step,
       api.platform('mac', 64),
       api.properties.environ(
           properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
@@ -72,7 +79,48 @@
   )
   yield api.test(
       'clean_derived_data', api.platform('mac', 64),
+      xcode_dismiss_dialog_find_db_step,
       api.properties.environ(
           properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
       )
   )
+  yield api.test(
+      'dimiss_dialog_xcode_automation_fails_find_db',
+      api.step_data(
+          'Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory',
+          stdout=api.raw_io.output_text(''),
+      ),
+      api.platform('mac', 64),
+      api.properties.environ(
+          properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
+      ),
+      status='INFRA_FAILURE'
+  )
+  yield api.test(
+      'reset_dialog_xcode_automation_fails_find_db',
+      xcode_dismiss_dialog_find_db_step,
+      api.step_data(
+          'Reset Xcode automation dialogs.Find TCC directory',
+          stdout=api.raw_io.output_text('TCC.db.backup'),
+      ),
+      api.platform('mac', 64),
+      api.properties.environ(
+          properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
+      ),
+  )
+  yield api.test(
+      'dimiss_dialog_xcode_automation_skip_if_not_core_device',
+      api.step_data(
+          'Dismiss dialogs.Dismiss iOS dialogs.Find device id',
+          stdout=api.raw_io.output_text('123456789'),
+      ),
+      api.step_data(
+          'Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices',
+          stdout=api.raw_io.output_text('No devices found.'),
+      ),
+      api.platform('mac', 64),
+      api.properties(buildername='Mac flutter_gallery_ios__start_up',),
+      api.properties.environ(
+          properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
+      ),
+  )
diff --git a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
index 3f18913..6ee2bd0 100644
--- a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
@@ -1734,6 +1734,54 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json b/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
index a648a56..093e547 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
@@ -1734,6 +1734,54 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json
index db4d7ca..aca913b 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json
@@ -1167,12 +1167,19 @@
   },
   {
     "cmd": [],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [
       "python3",
       "-u",
@@ -1216,9 +1223,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git setup",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1267,9 +1274,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git fetch",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1314,9 +1321,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git checkout",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1360,9 +1367,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.read revision",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
       "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
     ]
@@ -1410,9 +1417,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git clean",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1456,9 +1463,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule sync",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1504,9 +1511,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule update",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1550,9 +1557,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Set execute permission",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -1595,9 +1602,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Find device id",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -1640,12 +1647,590 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Run app to dismiss dialogs",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@Mac_ios abc@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"Xcode\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Shutdown simulators"
   },
@@ -3267,6 +3852,105 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
index 06dd5ce..b289ae3 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
@@ -1167,12 +1167,19 @@
   },
   {
     "cmd": [],
-    "name": "Dismiss dialogs.Checkout flutter/cocoon",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [
       "python3",
       "-u",
@@ -1216,9 +1223,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git setup",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1267,9 +1274,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git fetch",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1314,9 +1321,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git checkout",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1360,9 +1367,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.read revision",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_NEST_LEVEL@3@@@",
       "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
       "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
     ]
@@ -1410,9 +1417,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.git clean",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1456,9 +1463,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule sync",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1504,9 +1511,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Checkout flutter/cocoon.submodule update",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
+      "@@@STEP_NEST_LEVEL@3@@@"
     ]
   },
   {
@@ -1550,9 +1557,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Set execute permission",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Set execute permission",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -1595,9 +1602,9 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Find device id",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Find device id",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -1640,12 +1647,590 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Dismiss dialogs.Run app to dismiss dialogs",
+    "name": "Dismiss dialogs.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Get buildername",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_TEXT@Mac_ios abc@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.List TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "cp",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"Xcode\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = 'com.apple.dt.Xcode'"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "sqlite3",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db",
+      "SELECT service, client, client_type, auth_value, auth_reason, indirect_object_identifier_type, indirect_object_identifier, flags, last_modified FROM access WHERE service = \"kTCCServiceAppleEvents\""
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Dismiss dialogs.Dismiss Xcode automation dialogs.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Shutdown simulators"
   },
@@ -2759,6 +3344,105 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Reset Xcode automation dialogs"
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk",
+      "USE_EMULATOR": "False"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/devicelab/devicelab_drone.py b/recipes/devicelab/devicelab_drone.py
index 295a927..de91ac2 100644
--- a/recipes/devicelab/devicelab_drone.py
+++ b/recipes/devicelab/devicelab_drone.py
@@ -210,6 +210,8 @@
   api.logs_util.upload_logs(task_name)
   # This is to clean up leaked processes.
   api.os_utils.kill_processes()
+  # This is to reset permission dialogs.
+  api.os_utils.reset_automation_dialogs()
   # Collect memory/cpu/process after task execution.
   api.os_utils.collect_os_info()
 
@@ -432,7 +434,11 @@
       api.step_data(
           'Find device type',
           stdout=api.raw_io.output_text('iPhone8,1'),
-      )
+      ),
+      api.step_data(
+          'Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory',
+          stdout=api.raw_io.output_text('TCC.db'),
+      ),
   )
   yield api.test(
       "xcode-devicelab-timeout",
@@ -456,6 +462,10 @@
           times_out_after=2,
           had_timeout=True,
       ),
+      api.step_data(
+          'Dismiss dialogs.Dismiss Xcode automation dialogs.Find TCC directory',
+          stdout=api.raw_io.output_text('TCC.db'),
+      ),
       api.swarming.properties(bot_id='flutter-devicelab-mac-1'),
       status='FAILURE',
   )
diff --git a/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json b/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
index 9fe53a0..3d4a9a1 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
@@ -1372,6 +1372,53 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/devicelab/devicelab_test_drone.expected/mac.json b/recipes/devicelab/devicelab_test_drone.expected/mac.json
index 98f3c2c..0ebc98a 100644
--- a/recipes/devicelab/devicelab_test_drone.expected/mac.json
+++ b/recipes/devicelab/devicelab_test_drone.expected/mac.json
@@ -1703,6 +1703,53 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CLEANUP]/tmp_tmp_1/flutter sdk/dev/devicelab",
+    "env": {
+      "ARTIFACT_HUB_REPOSITORY": "artifactregistry://us-maven.pkg.dev/artifact-foundry-prod/maven-3p",
+      "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "GIT_BRANCH": "master",
+      "LUCI_BRANCH": "",
+      "LUCI_CI": "True",
+      "LUCI_PR": "",
+      "OS": "darwin",
+      "PUB_CACHE": "[START_DIR]/.pub-cache",
+      "REVISION": "12345abcde12345abcde12345abcde12345abcde",
+      "SDK_CHECKOUT_PATH": "[CLEANUP]/tmp_tmp_1/flutter sdk"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin",
+        "[CLEANUP]/tmp_tmp_1/flutter sdk/bin/cache/dart-sdk/bin"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_flutter_flutter-3.8-candidate.10.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_flutter_flutter-3.8-candidate.10.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_flutter_main.json b/recipes/engine/engine.expected/mac_flutter_main.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_flutter_main.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_font_subset_flutter_flutter-3.8-candidate.10.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_font_subset_flutter_main.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_font_subset_flutter_main.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_font_subset_prod_flutter-3.8-candidate.10.json
index f2206ae..4be2cab 100644
--- a/recipes/engine/engine.expected/mac_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_font_subset_prod_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_font_subset_prod_main.json
index 4e6a781..fd5c3fe 100644
--- a/recipes/engine/engine.expected/mac_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_font_subset_prod_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_font_subset_staging_flutter-3.8-candidate.10.json
index 98c1672..ac53764 100644
--- a/recipes/engine/engine.expected/mac_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_font_subset_staging_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_font_subset_staging_main.json
index 9ef58fc..e18167e 100644
--- a/recipes/engine/engine.expected/mac_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_font_subset_staging_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_flutter_flutter-3.8-candidate.10.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_no_lto_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_flutter_flutter-3.8-candidate.10.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_flutter_main.json b/recipes/engine/engine.expected/mac_no_lto_flutter_main.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_no_lto_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_flutter_main.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_main.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_flutter_main.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
index ad8f634..32f981b 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_main.json
index 2e1b7d0..a8cd35a 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_prod_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
index 3c257f8..483a6c9 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_main.json
index 537acb8..fc714fe 100644
--- a/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_font_subset_staging_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_prod_flutter-3.8-candidate.10.json
index ad8f634..32f981b 100644
--- a/recipes/engine/engine.expected/mac_no_lto_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_prod_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_prod_main.json b/recipes/engine/engine.expected/mac_no_lto_prod_main.json
index 2e1b7d0..a8cd35a 100644
--- a/recipes/engine/engine.expected/mac_no_lto_prod_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_prod_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_no_lto_staging_flutter-3.8-candidate.10.json
index 3c257f8..483a6c9 100644
--- a/recipes/engine/engine.expected/mac_no_lto_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_no_lto_staging_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_no_lto_staging_main.json b/recipes/engine/engine.expected/mac_no_lto_staging_main.json
index 537acb8..fc714fe 100644
--- a/recipes/engine/engine.expected/mac_no_lto_staging_main.json
+++ b/recipes/engine/engine.expected/mac_no_lto_staging_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_prod_flutter-3.8-candidate.10.json
index f2206ae..4be2cab 100644
--- a/recipes/engine/engine.expected/mac_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_prod_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_prod_main.json b/recipes/engine/engine.expected/mac_prod_main.json
index 4e6a781..fd5c3fe 100644
--- a/recipes/engine/engine.expected/mac_prod_main.json
+++ b/recipes/engine/engine.expected/mac_prod_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_flutter_flutter-3.8-candidate.10.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_flutter_flutter-3.8-candidate.10.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_flutter_main.json b/recipes/engine/engine.expected/mac_publish_cipd_flutter_main.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_flutter_main.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_main.json
index f5e2e15..c543df4 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_flutter_main.json
@@ -14715,6 +14715,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
index f2206ae..4be2cab 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_main.json
index 4e6a781..fd5c3fe 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_prod_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
index 98c1672..ac53764 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_main.json
index 9ef58fc..e18167e 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_font_subset_staging_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_main.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_flutter_main.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_main.json
index d77d612..2682d87 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_flutter_main.json
@@ -14724,6 +14724,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
index ad8f634..32f981b 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_main.json
index 2e1b7d0..a8cd35a 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_prod_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
index 3c257f8..483a6c9 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_main.json
index 537acb8..fc714fe 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_font_subset_staging_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
index ad8f634..32f981b 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_main.json
index 2e1b7d0..a8cd35a 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_prod_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
index 3c257f8..483a6c9 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_main.json b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_main.json
index 537acb8..fc714fe 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_no_lto_staging_main.json
@@ -14760,6 +14760,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_prod_flutter-3.8-candidate.10.json
index f2206ae..4be2cab 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_prod_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_prod_main.json b/recipes/engine/engine.expected/mac_publish_cipd_prod_main.json
index 4e6a781..fd5c3fe 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_prod_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_prod_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_publish_cipd_staging_flutter-3.8-candidate.10.json
index 98c1672..ac53764 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_staging_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_publish_cipd_staging_main.json b/recipes/engine/engine.expected/mac_publish_cipd_staging_main.json
index 9ef58fc..e18167e 100644
--- a/recipes/engine/engine.expected/mac_publish_cipd_staging_main.json
+++ b/recipes/engine/engine.expected/mac_publish_cipd_staging_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_staging_flutter-3.8-candidate.10.json
index 98c1672..ac53764 100644
--- a/recipes/engine/engine.expected/mac_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_staging_flutter-3.8-candidate.10.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_staging_main.json b/recipes/engine/engine.expected/mac_staging_main.json
index 9ef58fc..e18167e 100644
--- a/recipes/engine/engine.expected/mac_staging_main.json
+++ b/recipes/engine/engine.expected/mac_staging_main.json
@@ -14751,6 +14751,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_flutter_flutter-3.8-candidate.10.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_flutter_flutter-3.8-candidate.10.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_flutter_main.json b/recipes/engine/engine.expected/mac_upload_flutter_main.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_flutter_main.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_font_subset_flutter_flutter-3.8-candidate.10.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_upload_font_subset_flutter_main.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_flutter_main.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_font_subset_prod_flutter-3.8-candidate.10.json
index 77792fa..f14b6a0 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_prod_flutter-3.8-candidate.10.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_upload_font_subset_prod_main.json
index 40613ae..95a00c3 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_prod_main.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_font_subset_staging_flutter-3.8-candidate.10.json
index 0518389..ac84f2c 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_staging_flutter-3.8-candidate.10.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_upload_font_subset_staging_main.json
index f347a4d..b05a76c 100644
--- a/recipes/engine/engine.expected/mac_upload_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_font_subset_staging_main.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_flutter_flutter-3.8-candidate.10.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_flutter_flutter-3.8-candidate.10.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_flutter_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_flutter_main.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_flutter_main.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_main.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_flutter_main.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
index 6dceaaa..33d60f1 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_main.json
index 4254c38..3de8ff5 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_prod_main.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
index ed46504..e08a98a 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_main.json
index 0cd16a8..be74652 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_font_subset_staging_main.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_prod_flutter-3.8-candidate.10.json
index 6dceaaa..33d60f1 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_prod_flutter-3.8-candidate.10.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_prod_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_prod_main.json
index 4254c38..3de8ff5 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_prod_main.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_no_lto_staging_flutter-3.8-candidate.10.json
index ed46504..e08a98a 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_staging_flutter-3.8-candidate.10.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_no_lto_staging_main.json b/recipes/engine/engine.expected/mac_upload_no_lto_staging_main.json
index 0cd16a8..be74652 100644
--- a/recipes/engine/engine.expected/mac_upload_no_lto_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_no_lto_staging_main.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_prod_flutter-3.8-candidate.10.json
index 77792fa..f14b6a0 100644
--- a/recipes/engine/engine.expected/mac_upload_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_prod_flutter-3.8-candidate.10.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_prod_main.json b/recipes/engine/engine.expected/mac_upload_prod_main.json
index 40613ae..95a00c3 100644
--- a/recipes/engine/engine.expected/mac_upload_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_prod_main.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_flutter-3.8-candidate.10.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_flutter-3.8-candidate.10.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_main.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_flutter_main.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_main.json
index a8ff8e2..4c12732 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_flutter_main.json
@@ -15082,6 +15082,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
index 77792fa..f14b6a0 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_flutter-3.8-candidate.10.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_main.json
index 40613ae..95a00c3 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_prod_main.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
index 0518389..ac84f2c 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_flutter-3.8-candidate.10.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_main.json
index f347a4d..b05a76c 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_font_subset_staging_main.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_flutter-3.8-candidate.10.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_main.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_flutter_main.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_flutter-3.8-candidate.10.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_main.json
index 9c0fbf7..c36bfca 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_flutter_main.json
@@ -15091,6 +15091,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:flutter"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
index 6dceaaa..33d60f1 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_flutter-3.8-candidate.10.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_main.json
index 4254c38..3de8ff5 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_prod_main.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
index ed46504..e08a98a 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_flutter-3.8-candidate.10.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_main.json
index 0cd16a8..be74652 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_font_subset_staging_main.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
index 6dceaaa..33d60f1 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_flutter-3.8-candidate.10.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_main.json
index 4254c38..3de8ff5 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_prod_main.json
@@ -16577,6 +16577,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
index ed46504..e08a98a 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_flutter-3.8-candidate.10.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_main.json
index 0cd16a8..be74652 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_no_lto_staging_main.json
@@ -15127,6 +15127,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_flutter-3.8-candidate.10.json
index 77792fa..f14b6a0 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_flutter-3.8-candidate.10.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_main.json
index 40613ae..95a00c3 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_prod_main.json
@@ -16568,6 +16568,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_flutter-3.8-candidate.10.json
index 0518389..ac84f2c 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_flutter-3.8-candidate.10.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_main.json b/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_main.json
index f347a4d..b05a76c 100644
--- a/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_publish_cipd_staging_main.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_staging_flutter-3.8-candidate.10.json b/recipes/engine/engine.expected/mac_upload_staging_flutter-3.8-candidate.10.json
index 0518389..ac84f2c 100644
--- a/recipes/engine/engine.expected/mac_upload_staging_flutter-3.8-candidate.10.json
+++ b/recipes/engine/engine.expected/mac_upload_staging_flutter-3.8-candidate.10.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine/engine.expected/mac_upload_staging_main.json b/recipes/engine/engine.expected/mac_upload_staging_main.json
index f347a4d..b05a76c 100644
--- a/recipes/engine/engine.expected/mac_upload_staging_main.json
+++ b/recipes/engine/engine.expected/mac_upload_staging_main.json
@@ -15118,6 +15118,50 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "cwd": "[CACHE]/builder",
+    "env": {
+      "ANDROID_HOME": "[CACHE]/builder/src/third_party/android_tools/sdk",
+      "FLUTTER_LOGS_DIR": "[CLEANUP]/flutter_logs_dir",
+      "FLUTTER_PREBUILT_DART_SDK": "True",
+      "FLUTTER_TEST_OUTPUTS_DIR": "[CLEANUP]/flutter_logs_dir"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]/builder/src/third_party/dart/tools/sdks/dart-sdk/bin"
+      ]
+    },
+    "env_suffixes": {
+      "DEPOT_TOOLS_UPDATE": [
+        "0"
+      ],
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:staging"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipes/engine_v2/builder.expected/mac.json b/recipes/engine_v2/builder.expected/mac.json
index 0221440..f88a8df 100644
--- a/recipes/engine_v2/builder.expected/mac.json
+++ b/recipes/engine_v2/builder.expected/mac.json
@@ -5109,6 +5109,30 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "infra_step": true,
+    "luci_context": {
+      "realm": {
+        "name": "flutter:prod"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Killing Processes.kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",