If device is not connected, try opening with QuickTime to trigger it to connect

Bug: https://github.com/flutter/flutter/issues/141383
Change-Id: Ib161ef48b36b8790df6fe84b1ba9124cb43ed4e2
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/54460
Reviewed-by: Keyong Han <keyonghan@google.com>
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
Commit-Queue: Victoria Ashworth <vashworth@google.com>
diff --git a/recipe_modules/os_utils/api.py b/recipe_modules/os_utils/api.py
index 1da125c..41cf039 100644
--- a/recipe_modules/os_utils/api.py
+++ b/recipe_modules/os_utils/api.py
@@ -9,8 +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'
+TCC_AUTOMATION_DB = 'TCC.db'
+TCC_AUTOMATION_BACKUP_DB = 'TCC.db.backup'
 
 
 class OsUtilsApi(recipe_api.RecipeApi):
@@ -183,12 +183,12 @@
             infra_step=True
         )
         self.m.step(
-            'kill Safari', ['killall', '-9', 'java'],
+            'kill java', ['killall', '-9', 'java'],
             ok_ret='any',
             infra_step=True
         )
         self.m.step(
-            'kill Safari', ['killall', '-9', 'adb'],
+            'kill adb', ['killall', '-9', 'adb'],
             ok_ret='any',
             infra_step=True
         )
@@ -197,6 +197,11 @@
             ok_ret='any',
             infra_step=True
         )
+        self.m.step(
+            'kill QuickTime', ['killall', '-9', 'QuickTime Player'],
+            ok_ret='any',
+            infra_step=True
+        )
       else:
         self.m.step(
             'kill chrome', ['pkill', 'chrome'], ok_ret='any', infra_step=True
@@ -343,27 +348,49 @@
 
         is_core_device = self._is_core_device(device_id)
 
-        # Wait up to ~10 minutes for device to connect.
+        cocoon_path = self._checkout_cocoon()
+
         if is_core_device:
-          with self.m.step.nest('Wait for device to connect'):
-            self.m.retry.basic_wrap(
-                lambda timeout: self._wait_for_core_device_to_connect(
-                    device_id,
-                    timeout=timeout,
-                ),
-                step_name='Wait for device to connect',
-                sleep=10.0,
-                backoff_factor=2,
-                max_attempts=7
-            )
-            self.m.step(
-                'Kill Xcode',
-                ['killall', '-9', 'Xcode'],
-                ok_ret='any',
-            )
+          with self.m.step.nest('Wait for device to connect'
+                               ) as wait_connect_step:
+            try:
+              self._is_core_device_connected(device_id)
+            except self.m.step.InfraFailure:
+              infra_dialog_project_path = self._infra_dialog_directory_path(
+                  cocoon_path
+              ).join('infra-dialog.xcodeproj')
+              self.m.step(
+                  'Open infra-dialog in Xcode',
+                  ['open', infra_dialog_project_path],
+              )
+              # Open device in QuickTime to try to establish a connection.
+              self._open_quick_time(device_id)
+
+              # Wait up to ~5 minutes for device to connect.
+              try:
+                self.m.retry.basic_wrap(
+                    lambda timeout: self._is_core_device_connected(
+                        device_id,
+                        timeout=timeout,
+                    ),
+                    step_name='Wait for device to connect',
+                    sleep=10.0,
+                    backoff_factor=2,
+                    max_attempts=6
+                )
+              except self.m.step.InfraFailure:
+                # If fails continue to "Run app to dismiss dialogs" step. That
+                # step should also fail.
+                wait_connect_step.presentation.status = self.m.step.INFRA_FAILURE
+              finally:
+                self._list_core_devices()
+                self.m.step(
+                    'Kill Xcode',
+                    ['killall', '-9', 'Xcode'],
+                    ok_ret='any',
+                )
 
         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',
@@ -371,27 +398,140 @@
               infra_step=True,
           )
           with self.m.context(
-              cwd=cocoon_path.join('cipd_packages', 'device_doctor', 'tool',
-                                   'infra-dialog'),
+              cwd=self._infra_dialog_directory_path(cocoon_path),
               infra_steps=True,
           ):
             cmd = [resource_name, device_id]
-            self.m.step('Run app to dismiss dialogs', cmd)
+            try:
+              self.m.step('Run app to dismiss dialogs', cmd)
+            finally:
+              self._list_core_devices()
+              self.m.step(
+                  'Kill QuickTime',
+                  ['killall', '-9', 'QuickTime Player'],
+                  ok_ret='any',
+              )
         with self.m.step.nest('Dismiss Xcode automation dialogs'):
           with self.m.context(infra_steps=True):
-            self._dismiss_xcode_automation_dialogs(is_core_device)
+            builder_name = self.m.properties.get('buildername')
+            self.m.step.empty("Get buildername", step_text=builder_name)
 
-  def _is_core_device(self, device_id):
-    """Check if device is a CoreDevice (physical iOS 17+ devices).
+            # Only required for CoreDevices (physical iOS 17+ devices) or
+            # "xcode_debug" tests. Builders with 'xcode_debug' in the name
+            # force tests the workflow that requires this permission.
+            if is_core_device or 'xcode_debug' in builder_name:
+              self._dismiss_automation_dialog('Xcode', 'com.apple.dt.Xcode')
 
-    Only CoreDevices appear in `devicectl list devices` command.
+  def _infra_dialog_directory_path(self, cocoon_path):
+    return cocoon_path.join(
+        'cipd_packages', 'device_doctor', 'tool', 'infra-dialog'
+    )
+
+  def _open_quick_time(self, device_id):
+    """Gives permissions to automate QuickTime. Then opens QuickTime with
+    screen and audio to set to `device_id`.
+
+    Opening QuickTime and switching the "Screen" to the device may help the
+    device connect.
 
     Args:
       device_id(string): A string of the selected device's UDID.
     """
-    # Get list of 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.
+    with self.m.step.nest('Trigger device connect with QuickTime'):
+      with self.m.context(infra_steps=True):
+        with self.m.step.nest('Dismiss QuickTime automation dialogs'):
+          self._dismiss_automation_dialog(
+              'QuickTime Player', 'com.apple.QuickTimePlayerX'
+          )
+        self.m.step(
+            'Open QuickTime',
+            ['open', '-a', 'QuickTime Player'],
+        )
+        self.m.step(
+            'Set Audio Device in QuickTime',
+            [
+                'defaults', 'write', 'com.apple.QuickTimePlayerX',
+                'MGDeviceRecordingDocumentViewControllerAudioDeviceSelectionUniqueID',
+                device_id
+            ],
+        )
+        self.m.step(
+            'Set Video Device in QuickTime',
+            [
+                'defaults', 'write', 'com.apple.QuickTimePlayerX',
+                'MGDeviceRecordingDocumentViewControllerVideoDeviceSelectionUniqueID',
+                device_id
+            ],
+        )
+        self.m.step(
+            'View defaults in QuickTime',
+            ['defaults', 'read', 'com.apple.QuickTimePlayerX'],
+        )
+
+        self._apple_script_command(
+            'Open QuickTime Recording',
+            'QuickTime Player',
+            ['new movie recording'],
+            timeout=30,
+        )
+        # For some reason, the first time you open a QuickTime recording, the
+        # device will not be selected. Close the window and try again. The
+        # second time should work.
+        self._apple_script_command(
+            'Close QuickTime Recording',
+            'QuickTime Player',
+            ['close its front window'],
+            timeout=30,
+        )
+        self._apple_script_command(
+            'Open QuickTime Recording',
+            'QuickTime Player',
+            ['new movie recording'],
+            timeout=30,
+        )
+
+  def _apple_script_command(
+      self,
+      title,
+      app_name,
+      commands,
+      timeout=2,
+      raise_on_failure=False,
+  ):
+    """Run an AppleScript command.
+
+    Args:
+      title(string): A string of step's title.
+      app_name(string): The name of the app to tell the commands to.
+      commands(list): A list of strings of commands to tell the app to do.
+      timeout (int or float): How many seconds to wait before timing out the step.
+      raise_on_failure (bool): Raise InfraFailure or StepFailure on failure.
+    """
+
+    apple_script_to_run = []
+    for command in commands:
+      apple_script_to_run.append('-e')
+      apple_script_to_run.append(command)
+    self.m.step(
+        title,
+        [
+            'osascript',
+            '-e',
+            'tell app "%s"' % app_name,
+            *apple_script_to_run,
+            '-e',
+            'end tell',
+        ],
+        raise_on_failure=raise_on_failure,
+        ok_ret=(0,) if raise_on_failure else 'any',
+        timeout=timeout,
+    )
+
+  def _list_core_devices(self):
+    """Get list of 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.
+    """
     device_list = self.m.step(
         'List CoreDevices',
         [
@@ -406,19 +546,32 @@
         stdout=self.m.raw_io.output_text(add_output_log=True),
     ).stdout.rstrip()
 
+    return device_list
+
+  def _is_core_device(self, device_id):
+    """Check if device is a CoreDevice (physical iOS 17+ devices).
+
+    Only CoreDevices appear in `devicectl list devices` command.
+
+    Args:
+      device_id(string): A string of the selected device's UDID.
+    """
+    device_list = self._list_core_devices()
+
     if device_id in device_list:
       return True
     return False
 
   # pylint: disable=unused-argument
-  def _wait_for_core_device_to_connect(self, device_id, timeout):
+  def _is_core_device_connected(self, device_id, timeout=None):
     """Use `devicectl` command to determine if device is connected via cable.
-    If not connected, open Xcode to attempt to help it reconnect.
     Only accept if `transportType` is wired in case other devices are paired
     but not connected via cable (aka connected wirelessly).
 
     Args:
       device_id(string): A string of the selected device's UDID.
+
+    Throws an InfraFailure if device is not connected.
     """
     device_list = self.m.step(
         'Find wired CoreDevices',
@@ -435,33 +588,16 @@
     ).stdout.rstrip()
 
     if device_id not in device_list:
-      # Try opening Xcode to see if it helps device connect.
-      self.m.step(
-          'Open Xcode',
-          ['open', '-a', 'Xcode'],
-      )
       raise self.m.step.InfraFailure('Device not connected.')
 
-  def _dismiss_xcode_automation_dialogs(self, is_core_device):
-    """Dismiss Xcode automation permission dialog and update permission db.
-
-    Only required for CoreDevices (physical iOS 17+ devices) or "xcode_debug" tests.
+  def _dismiss_automation_dialog(self, app_name, app_identifer):
+    """Dismiss automation permission dialog and update permission db.
 
     Args:
-      is_core_device(bool): Indicates if device is a CoreDevice.
+      app_name(string): Name of the application to get permission for.
+      app_identifer(string): Bundle id of the application.
     """
 
-    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 not is_core_device and 'xcode_debug' not in builder_name:
-      return
-
     tcc_directory_path, db_path, backup_db_path = self._get_tcc_path()
 
     # Ensure db exists
@@ -471,7 +607,7 @@
         stdout=self.m.raw_io.output_text(add_output_log=True),
     ).stdout.rstrip()
 
-    if XCODE_AUTOMATION_DB not in files:
+    if TCC_AUTOMATION_DB not in files:
       self.m.step.empty(
           'Failed to find TCC.db',
           status=self.m.step.INFRA_FAILURE,
@@ -483,7 +619,7 @@
     # 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:
+    if TCC_AUTOMATION_BACKUP_DB not in files:
       self.m.step(
           'Create backup db',
           ['cp', db_path, backup_db_path],
@@ -492,6 +628,8 @@
     self.m.retry.basic_wrap(
         lambda timeout: self._create_tcc_entry(
             db_path,
+            app_name,
+            app_identifer,
             timeout=timeout,
         ),
         step_name='Wait to add entry in TCC db',
@@ -505,6 +643,7 @@
     self.m.retry.basic_wrap(
         lambda timeout: self._update_automation_permission_db(
             db_path,
+            app_identifer,
             timeout=timeout,
         ),
         step_name='Wait to update TCC db',
@@ -516,22 +655,24 @@
     # Print contents of db for potential debugging purposes.
     self._query_automation_db_step_with_retry(db_path)
 
-    # Try and trigger Xcode automation. If fails or times out, permission was
+    # Try and trigger automation. If fails or times out, permission was
     # not successfully granted.
     self._trigger_and_dismiss_automation_permission(
-        timeout=5 * 60, raise_on_failure=True
+        app_name,
+        timeout=5 * 60,
+        raise_on_failure=True,
     )
 
-    # Xcode was opened by Applescript, so kill it.
+    # The app was opened by Applescript, so kill it.
     self.m.step(
-        'Kill Xcode',
-        ['killall', '-9', 'Xcode'],
+        'Kill %s' % app_name,
+        ['killall', '-9', app_name],
         ok_ret='any',
     )
 
   def _dismiss_automation_permission(self):
-    """Kill the Xcode automation dialog. After killing the dialog, an entry for
-    the app requesting control of Xcode should automatically be added to the db.
+    """Kill the automation dialog. After killing the dialog, an entry for
+    the client requesting control of app should automatically be added to the db.
     """
 
     self.m.step(
@@ -541,54 +682,47 @@
     )
 
   def _trigger_and_dismiss_automation_permission(
-      self,
-      timeout=2,
-      raise_on_failure=False,
+      self, app_name, timeout=2, raise_on_failure=False
   ):
-    """Trigger Xcode automation dialog to appear and then kill the dialog.
+    """Trigger automation dialog to appear and then kill the dialog.
 
     Args:
+      app_name(string): Name of the application to get permission for.
       timeout (int or float): How many seconds to wait before timing out the
               "Trigger dialog" step.
       raise_on_failure (bool): Raise InfraFailure or StepFailure on failure.
     """
 
-    # Run an arbitrary AppleScript Xcode command to trigger permissions dialog.
-    # The AppleScript counts how many Xcode windows are open.
+    # Run an arbitrary AppleScript command to trigger permissions dialog.
+    # The AppleScript counts how many windows of the app are open.
     # The script will hang if permission has not been given, so timeout after
     # a few seconds.
-    self.m.step(
+    self._apple_script_command(
         'Trigger dialog',
-        [
-            'osascript',
-            '-e',
-            'tell app "Xcode"',
-            '-e',
-            'launch',
-            '-e',
-            'count window',
-            '-e',
-            'end tell',
-        ],
-        raise_on_failure=raise_on_failure,
-        ok_ret=(0,) if raise_on_failure else 'any',
-        timeout=timeout,
+        app_name,
+        ['launch', 'count window'],
+        timeout,
+        raise_on_failure,
     )
     self._dismiss_automation_permission()
 
-  def _create_tcc_entry(self, db_path, timeout=2):
-    """Trigger Xcode automation dialog to appear and then kill the dialog.
+  def _create_tcc_entry(self, db_path, app_name, app_identifer, timeout=2):
+    """Trigger automation dialog to appear and then kill the dialog.
     Killing the dialog will add an entry for the permission to the TCC.db.
     Raises an error if dialog fails to add entry to db.
 
     Args:
+      app_name(string): Name of the application to get permission for.
+      app_identifer(string): Bundle id of the application.
       db_path(string): A string of the path to the sqlite database.
     """
 
-    self._trigger_and_dismiss_automation_permission(timeout=timeout)
+    self._trigger_and_dismiss_automation_permission(app_name, timeout=timeout)
 
-    if 'Xcode' not in self._query_automation_db_step_with_retry(db_path):
-      raise self.m.step.InfraFailure('Xcode entry not found in TCC.db')
+    if app_identifer not in self._query_automation_db_step_with_retry(db_path):
+      raise self.m.step.InfraFailure(
+          '%s entry not found in TCC.db' % app_identifer
+      )
 
   def _get_tcc_path(self):
     """Constructs paths to the TCC directory, TCC db, and TCC backup db.
@@ -602,19 +736,20 @@
     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
-    )
+    db_path = os.path.join(tcc_directory_path, TCC_AUTOMATION_DB)
+    backup_db_path = os.path.join(tcc_directory_path, TCC_AUTOMATION_BACKUP_DB)
     return tcc_directory_path, db_path, backup_db_path
 
   # pylint: disable=unused-argument
-  def _update_automation_permission_db(self, db_path, timeout=None):
+  def _update_automation_permission_db(
+      self, db_path, app_identifer, timeout=None
+  ):
     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'"
+            "UPDATE access SET auth_value = 2, auth_reason = 3, flags = NULL WHERE service = 'kTCCServiceAppleEvents' AND indirect_object_identifier = '%s'"
+            % app_identifer
         ],
     )
 
@@ -662,9 +797,9 @@
     return query_results.stdout.rstrip()
 
   def reset_automation_dialogs(self):
-    """Reset Xcode Automation permissions."""
+    """Reset Automation permissions."""
     if self.is_devicelab() and self.m.platform.is_mac:
-      with self.m.step.nest('Reset Xcode automation dialogs'):
+      with self.m.step.nest('Reset automation dialogs'):
         tcc_directory_path, db_path, backup_db_path = self._get_tcc_path()
 
         self._dismiss_automation_permission()
@@ -681,7 +816,7 @@
             ok_ret='any',
         ).stdout.rstrip()
 
-        if XCODE_AUTOMATION_BACKUP_DB not in files:
+        if TCC_AUTOMATION_BACKUP_DB not in files:
           return
 
         self.m.step(
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 fe21bfd..1b7314f 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
@@ -202,7 +202,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -214,7 +214,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -233,6 +233,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -340,6 +352,120 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -362,17 +488,6 @@
     ]
   },
   {
-    "cmd": [
-      "killall",
-      "-9",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -380,120 +495,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -518,6 +519,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -684,7 +714,7 @@
   },
   {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -692,7 +722,7 @@
       "-9",
       "UserNotificationCenter"
     ],
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -703,7 +733,7 @@
       "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\""
     ],
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -715,7 +745,7 @@
       "Users/fakeuser/Library/Application Support/com.apple.TCC"
     ],
     "infra_step": true,
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
diff --git a/recipe_modules/os_utils/examples/full.expected/core_device_not_found.json b/recipe_modules/os_utils/examples/full.expected/core_device_not_found.json
deleted file mode 100644
index 4f5e429..0000000
--- a/recipe_modules/os_utils/examples/full.expected/core_device_not_found.json
+++ /dev/null
@@ -1,569 +0,0 @@
-[
-  {
-    "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": "Prepare iOS device",
-    "~followup_annotations": [
-      "@@@STEP_EXCEPTION@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "idevice_id",
-      "-l"
-    ],
-    "name": "Prepare iOS device.Find device id",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "-v"
-    ],
-    "name": "Prepare iOS device.List CoreDevices",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@raw_io.output_text@123456789@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Prepare iOS device.Wait for device to connect",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_EXCEPTION@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (2)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (2)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (3)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (3)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (4)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (4)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Prepare iOS device.Wait for device to connect.sleep 80",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (5)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (5)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Prepare iOS device.Wait for device to connect.sleep 160",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (6)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (6)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Prepare iOS device.Wait for device to connect.sleep 320",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "xcrun",
-      "devicectl",
-      "list",
-      "devices",
-      "--filter",
-      "connectionProperties.transportType CONTAINS 'wired'",
-      "-v"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (7)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@",
-      "@@@STEP_LOG_END@raw_io.output_text@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "open",
-      "-a",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Open Xcode (7)",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
-    "failure": {
-      "humanReason": "Device not connected."
-    },
-    "name": "$result"
-  }
-]
\ No newline at end of file
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
index 25b2fe7..ca25355 100644
--- 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
@@ -202,7 +202,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -214,7 +214,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -233,6 +233,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -343,6 +355,120 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -365,17 +491,6 @@
     ]
   },
   {
-    "cmd": [
-      "killall",
-      "-9",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -383,120 +498,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -521,6 +522,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
diff --git a/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_update_db.json b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_update_db.json
index fbc9dd4..badb0a2 100644
--- a/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_update_db.json
+++ b/recipe_modules/os_utils/examples/full.expected/dimiss_dialog_xcode_automation_fails_update_db.json
@@ -202,7 +202,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -214,7 +214,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -233,6 +233,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -343,6 +355,120 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -365,17 +491,6 @@
     ]
   },
   {
-    "cmd": [
-      "killall",
-      "-9",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -383,120 +498,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -521,6 +522,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -707,7 +737,7 @@
   },
   {
     "failure": {
-      "humanReason": "Xcode entry not found in TCC.db"
+      "humanReason": "com.apple.dt.Xcode entry not found in TCC.db"
     },
     "name": "$result"
   }
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
index 47d4107..65f4bc3 100644
--- 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
@@ -202,7 +202,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -214,7 +214,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -233,6 +233,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -340,19 +352,12 @@
   },
   {
     "cmd": [],
-    "name": "Prepare iOS device.Dismiss iOS dialogs",
+    "name": "Prepare iOS device.Checkout flutter/cocoon",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [
       "python3",
       "-u",
@@ -362,9 +367,9 @@
       "--url",
       "https://flutter.googlesource.com/mirrors/cocoon"
     ],
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git setup",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git setup",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -382,9 +387,9 @@
       "PATH": "RECIPE_REPO[depot_tools]:<PATH>"
     },
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -396,9 +401,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -409,9 +414,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.read revision",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.read revision",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@",
+      "@@@STEP_NEST_LEVEL@2@@@",
       "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@",
       "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
     ]
@@ -426,9 +431,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git clean",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -439,9 +444,9 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
     ]
   },
   {
@@ -454,9 +459,16 @@
     ],
     "cwd": "[CACHE]/cocoon",
     "infra_step": true,
-    "name": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
     "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Dismiss iOS dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
     ]
   },
   {
@@ -484,6 +496,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -500,7 +541,7 @@
   },
   {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -508,7 +549,7 @@
       "-9",
       "UserNotificationCenter"
     ],
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -519,7 +560,7 @@
       "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\""
     ],
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -531,7 +572,7 @@
       "Users/fakeuser/Library/Application Support/com.apple.TCC"
     ],
     "infra_step": true,
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
diff --git a/recipe_modules/os_utils/examples/full.expected/fail_to_prepare_device.json b/recipe_modules/os_utils/examples/full.expected/fail_to_prepare_device.json
new file mode 100644
index 0000000..17d2a41
--- /dev/null
+++ b/recipe_modules/os_utils/examples/full.expected/fail_to_prepare_device.json
@@ -0,0 +1,976 @@
+[
+  {
+    "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 java",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "adb"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill adb",
+    "~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": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~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": "Prepare iOS device",
+    "~followup_annotations": [
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "idevice_id",
+      "-l"
+    ],
+    "name": "Prepare iOS device.Find device id",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "name": "Prepare iOS device.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_LOG_LINE@raw_io.output_text@123456789@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Wait for device to connect",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "open",
+      "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog/infra-dialog.xcodeproj"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Open infra-dialog in Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "ls",
+      "Users/fakeuser/Library/Application Support/com.apple.TCC"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Find TCC directory",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_LINE@raw_io.output_text@TCC.db@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "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": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Query TCC db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "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": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Create backup db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"QuickTime Player\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Trigger dialog",
+    "timeout": 2,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Dismiss dialog",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "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": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Query TCC db (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_LINE@raw_io.output_text@service|client|client_type|auth_value|auth_reason|auth_version|com.apple.QuickTimePlayerX|flags|last_modified@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "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.QuickTimePlayerX'"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Update db",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "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": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Query TCC db (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"QuickTime Player\"",
+      "-e",
+      "launch",
+      "-e",
+      "count window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Trigger dialog (2)",
+    "timeout": 300,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "UserNotificationCenter"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Dismiss dialog (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Kill QuickTime Player",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@4@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "open",
+      "-a",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Open QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "defaults",
+      "write",
+      "com.apple.QuickTimePlayerX",
+      "MGDeviceRecordingDocumentViewControllerAudioDeviceSelectionUniqueID",
+      "123456789"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Set Audio Device in QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "defaults",
+      "write",
+      "com.apple.QuickTimePlayerX",
+      "MGDeviceRecordingDocumentViewControllerVideoDeviceSelectionUniqueID",
+      "123456789"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Set Video Device in QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "defaults",
+      "read",
+      "com.apple.QuickTimePlayerX"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.View defaults in QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"QuickTime Player\"",
+      "-e",
+      "new movie recording",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Open QuickTime Recording",
+    "timeout": 30,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"QuickTime Player\"",
+      "-e",
+      "close its front window",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Close QuickTime Recording",
+    "timeout": 30,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "osascript",
+      "-e",
+      "tell app \"QuickTime Player\"",
+      "-e",
+      "new movie recording",
+      "-e",
+      "end tell"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Open QuickTime Recording (2)",
+    "timeout": 30,
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@3@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (2)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (3)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (4)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (5)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Wait for device to connect.sleep 80",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (6)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Wait for device to connect.sleep 160",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "--filter",
+      "connectionProperties.transportType CONTAINS 'wired'",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Find wired CoreDevices (7)",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "Xcode"
+    ],
+    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
+    "name": "Prepare iOS device.Dismiss iOS dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@",
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "chmod",
+      "755",
+      "RECIPE_MODULE[flutter::os_utils]/resources/dismiss_dialogs.sh"
+    ],
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Set execute permission",
+    "~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": "Prepare iOS device.Dismiss iOS dialogs.Run app to dismiss dialogs",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_EXCEPTION@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "failure": {
+      "humanReason": "Infra Failure: Step('Prepare iOS device.Dismiss iOS dialogs.Run app to dismiss dialogs') (retcode: 1)"
+    },
+    "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 31da604..1f71ab3 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
@@ -236,7 +236,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -248,7 +248,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -267,6 +267,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -374,6 +386,120 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -396,17 +522,6 @@
     ]
   },
   {
-    "cmd": [
-      "killall",
-      "-9",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -414,120 +529,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -552,6 +553,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -718,7 +748,7 @@
   },
   {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -726,7 +756,7 @@
       "-9",
       "UserNotificationCenter"
     ],
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -737,7 +767,7 @@
       "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\""
     ],
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -749,7 +779,7 @@
       "Users/fakeuser/Library/Application Support/com.apple.TCC"
     ],
     "infra_step": true,
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset 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 56757d5..6a4fcef 100644
--- a/recipe_modules/os_utils/examples/full.expected/mac.json
+++ b/recipe_modules/os_utils/examples/full.expected/mac.json
@@ -58,7 +58,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -70,7 +70,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -89,6 +89,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
diff --git a/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_finds_db.json b/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_finds_db.json
index 16a3e91..289069c 100644
--- a/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_finds_db.json
+++ b/recipe_modules/os_utils/examples/full.expected/reset_dialog_xcode_automation_finds_db.json
@@ -202,7 +202,7 @@
       "java"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -214,7 +214,7 @@
       "adb"
     ],
     "infra_step": true,
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -233,6 +233,18 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "infra_step": true,
+    "name": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",
@@ -340,6 +352,120 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "infra_step": true,
+    "name": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -362,17 +488,6 @@
     ]
   },
   {
-    "cmd": [
-      "killall",
-      "-9",
-      "Xcode"
-    ],
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -380,120 +495,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -518,6 +519,35 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "infra_step": true,
+    "name": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -684,7 +714,7 @@
   },
   {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -692,7 +722,7 @@
       "-9",
       "UserNotificationCenter"
     ],
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -703,7 +733,7 @@
       "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\""
     ],
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -715,7 +745,7 @@
       "Users/fakeuser/Library/Application Support/com.apple.TCC"
     ],
     "infra_step": true,
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -726,7 +756,7 @@
       "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",
+    "name": "Reset automation dialogs.Restore from backup db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -736,7 +766,7 @@
       "rm",
       "Users/fakeuser/Library/Application Support/com.apple.TCC/TCC.db.backup"
     ],
-    "name": "Reset Xcode automation dialogs.Remove backup",
+    "name": "Reset automation dialogs.Remove backup",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -747,7 +777,7 @@
       "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\""
     ],
-    "name": "Reset Xcode automation dialogs.Query TCC db (2)",
+    "name": "Reset automation dialogs.Query TCC db (2)",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
diff --git a/recipe_modules/os_utils/examples/full.py b/recipe_modules/os_utils/examples/full.py
index 1763bf5..484cb52 100644
--- a/recipe_modules/os_utils/examples/full.py
+++ b/recipe_modules/os_utils/examples/full.py
@@ -47,7 +47,9 @@
   )
   xcode_dismiss_dialog_query_db_step = api.step_data(
       'Prepare iOS device.Dismiss Xcode automation dialogs.Query TCC db (2)',
-      stdout=api.raw_io.output_text('service|client|client_type|auth_value|auth_reason|auth_version|com.apple.dt.Xcode|flags|last_modified'),
+      stdout=api.raw_io.output_text(
+          'service|client|client_type|auth_value|auth_reason|auth_version|com.apple.dt.Xcode|flags|last_modified'
+      ),
   )
   yield api.test(
       'basic',
@@ -91,13 +93,14 @@
       api.step_data("Killing Processes.stop dart", retcode=1)
   )
   yield api.test(
-      'clean_derived_data', api.platform('mac', 64),
+      'clean_derived_data',
+      api.platform('mac', 64),
       xcode_dismiss_dialog_find_db_step,
       xcode_dismiss_dialog_query_db_step,
       api.properties(device_os='iOS-16'),
       api.properties.environ(
           properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
-      )
+      ),
   )
   yield api.test(
       'dimiss_dialog_xcode_automation_fails_find_db',
@@ -127,7 +130,7 @@
       xcode_dismiss_dialog_find_db_step,
       xcode_dismiss_dialog_query_db_step,
       api.step_data(
-          'Reset Xcode automation dialogs.Find TCC directory',
+          'Reset automation dialogs.Find TCC directory',
           stdout=api.raw_io.output_text('TCC.db.backup'),
       ),
       api.platform('mac', 64),
@@ -143,13 +146,22 @@
           stdout=api.raw_io.output_text('123456789'),
       ),
       api.platform('mac', 64),
-      api.properties(buildername='Mac flutter_gallery_ios__start_up', device_os='iOS-16'),
+      api.properties(
+          buildername='Mac flutter_gallery_ios__start_up', device_os='iOS-16'
+      ),
       api.properties.environ(
           properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
       ),
   )
   yield api.test(
-      'core_device_not_found',
+      'fail_to_prepare_device',
+      api.platform('mac', 64),
+      api.properties(
+          buildername='Mac flutter_gallery_ios__start_up', device_os='iOS-17'
+      ),
+      api.properties.environ(
+          properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
+      ),
       api.step_data(
           'Prepare iOS device.Find device id',
           stdout=api.raw_io.output_text('123456789'),
@@ -158,10 +170,19 @@
           'Prepare iOS device.List CoreDevices',
           stdout=api.raw_io.output_text('123456789'),
       ),
-      api.platform('mac', 64),
-      api.properties(buildername='Mac flutter_gallery_ios__start_up', device_os='iOS-17'),
-      api.properties.environ(
-          properties.EnvProperties(SWARMING_BOT_ID='flutter-devicelab-mac-1')
+      api.step_data(
+          'Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Find TCC directory',
+          stdout=api.raw_io.output_text('TCC.db'),
+      ),
+      api.step_data(
+          'Prepare iOS device.Wait for device to connect.Trigger device connect with QuickTime.Dismiss QuickTime automation dialogs.Query TCC db (2)',
+          stdout=api.raw_io.output_text(
+              'service|client|client_type|auth_value|auth_reason|auth_version|com.apple.QuickTimePlayerX|flags|last_modified'
+          ),
+      ),
+      api.step_data(
+          'Prepare iOS device.Dismiss iOS dialogs.Run app to dismiss dialogs',
+          retcode=1,
       ),
       status='INFRA_FAILURE'
   )
diff --git a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
index bb5fed6..2270be2 100644
--- a/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/upload-metrics-mac.json
@@ -1122,7 +1122,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1168,7 +1168,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1221,6 +1221,52 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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": "Killing Processes.kill QuickTime",
+    "~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 c9be1ce..da15509 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-chromium-mac.json
@@ -1122,7 +1122,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1168,7 +1168,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1221,6 +1221,52 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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": "Killing Processes.kill QuickTime",
+    "~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 66106e3..9587ab4 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab-timeout.json
@@ -722,6 +722,350 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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"
+    ],
+    "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"
+      ]
+    },
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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",
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>",
+      "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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.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",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -778,51 +1122,6 @@
     ]
   },
   {
-    "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"
-      ]
-    },
-    "luci_context": {
-      "realm": {
-        "name": "project:ci"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -830,350 +1129,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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"
-    ],
-    "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"
-      ]
-    },
-    "luci_context": {
-      "realm": {
-        "name": "project:ci"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Prepare iOS device.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": {
-      "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",
-      "PATH": "RECIPE_REPO[depot_tools]:<PATH>",
-      "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "checkout",
-      "-f",
-      "FETCH_HEAD"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "rev-parse",
-      "HEAD"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.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",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "submodule",
-      "sync"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "submodule",
-      "update",
-      "--init",
-      "--recursive"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -1265,6 +1220,101 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "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": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "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": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -2841,7 +2891,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -2887,7 +2937,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -2939,8 +2989,54 @@
     ]
   },
   {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -2982,7 +3078,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -3027,7 +3123,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -3073,7 +3169,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
diff --git a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
index 2e5727f..e99f311 100644
--- a/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
+++ b/recipes/devicelab/devicelab_drone.expected/xcode-devicelab.json
@@ -722,6 +722,350 @@
   },
   {
     "cmd": [],
+    "name": "Prepare iOS device.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"
+    ],
+    "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"
+      ]
+    },
+    "luci_context": {
+      "realm": {
+        "name": "project:ci"
+      },
+      "resultdb": {
+        "current_invocation": {
+          "name": "invocations/build:8945511751514863184",
+          "update_token": "token"
+        },
+        "hostname": "rdbhost"
+      }
+    },
+    "name": "Prepare iOS device.Checkout flutter/cocoon.git setup",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "fetch",
+      "origin",
+      "main",
+      "--recurse-submodules",
+      "--progress",
+      "--tags"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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",
+      "PATH": "RECIPE_REPO[depot_tools]:<PATH>",
+      "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": "Prepare iOS device.Checkout flutter/cocoon.git fetch",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "checkout",
+      "-f",
+      "FETCH_HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.git checkout",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "rev-parse",
+      "HEAD"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.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",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.git clean",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "sync"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.submodule sync",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "git",
+      "submodule",
+      "update",
+      "--init",
+      "--recursive"
+    ],
+    "cwd": "[CACHE]/cocoon",
+    "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": "Prepare iOS device.Checkout flutter/cocoon.submodule update",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
+    "cmd": [],
     "name": "Prepare iOS device.Wait for device to connect",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
@@ -778,51 +1122,6 @@
     ]
   },
   {
-    "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"
-      ]
-    },
-    "luci_context": {
-      "realm": {
-        "name": "project:ci"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Prepare iOS device.Wait for device to connect.Kill Xcode",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@2@@@"
-    ]
-  },
-  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss iOS dialogs",
     "~followup_annotations": [
@@ -830,350 +1129,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "Prepare iOS device.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"
-    ],
-    "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"
-      ]
-    },
-    "luci_context": {
-      "realm": {
-        "name": "project:ci"
-      },
-      "resultdb": {
-        "current_invocation": {
-          "name": "invocations/build:8945511751514863184",
-          "update_token": "token"
-        },
-        "hostname": "rdbhost"
-      }
-    },
-    "name": "Prepare iOS device.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": {
-      "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",
-      "PATH": "RECIPE_REPO[depot_tools]:<PATH>",
-      "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git fetch",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "checkout",
-      "-f",
-      "FETCH_HEAD"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git checkout",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "rev-parse",
-      "HEAD"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.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",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.git clean",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "submodule",
-      "sync"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule sync",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "git",
-      "submodule",
-      "update",
-      "--init",
-      "--recursive"
-    ],
-    "cwd": "[CACHE]/cocoon",
-    "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": "Prepare iOS device.Dismiss iOS dialogs.Checkout flutter/cocoon.submodule update",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@3@@@"
-    ]
-  },
-  {
     "cmd": [
       "chmod",
       "755",
@@ -1265,6 +1220,101 @@
     ]
   },
   {
+    "cmd": [
+      "xcrun",
+      "devicectl",
+      "list",
+      "devices",
+      "-v"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "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": "Prepare iOS device.Dismiss iOS dialogs.List CoreDevices",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@",
+      "@@@STEP_LOG_END@raw_io.output_text@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "cwd": "[CACHE]/cocoon/cipd_packages/device_doctor/tool/infra-dialog",
+    "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": "Prepare iOS device.Dismiss iOS dialogs.Kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@2@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Prepare iOS device.Dismiss Xcode automation dialogs",
     "~followup_annotations": [
@@ -2843,7 +2893,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -2889,7 +2939,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -2941,8 +2991,54 @@
     ]
   },
   {
+    "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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": "Killing Processes.kill QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
     "cmd": [],
-    "name": "Reset Xcode automation dialogs"
+    "name": "Reset automation dialogs"
   },
   {
     "cmd": [
@@ -2984,7 +3080,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Dismiss dialog",
+    "name": "Reset automation dialogs.Dismiss dialog",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -3029,7 +3125,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Query TCC db",
+    "name": "Reset automation dialogs.Query TCC db",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_END@raw_io.output_text@@@"
@@ -3075,7 +3171,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Reset Xcode automation dialogs.Find TCC directory",
+    "name": "Reset automation dialogs.Find TCC directory",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
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 a22f669..5084398 100644
--- a/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
+++ b/recipes/devicelab/devicelab_drone_build_test.expected/xcode-mac.json
@@ -1379,7 +1379,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1426,7 +1426,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1480,6 +1480,53 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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 QuickTime",
+    "~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 55e6abb..b3df8ae 100644
--- a/recipes/devicelab/devicelab_test_drone.expected/mac.json
+++ b/recipes/devicelab/devicelab_test_drone.expected/mac.json
@@ -1710,7 +1710,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1757,7 +1757,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -1811,6 +1811,53 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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 QuickTime",
+    "~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 1d81225..9640750 100644
--- a/recipes/engine_v2/builder.expected/mac.json
+++ b/recipes/engine_v2/builder.expected/mac.json
@@ -6129,7 +6129,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (2)",
+    "name": "Killing Processes.kill java",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -6153,7 +6153,7 @@
         "hostname": "rdbhost"
       }
     },
-    "name": "Killing Processes.kill Safari (3)",
+    "name": "Killing Processes.kill adb",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@"
     ]
@@ -6184,6 +6184,30 @@
   },
   {
     "cmd": [
+      "killall",
+      "-9",
+      "QuickTime Player"
+    ],
+    "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 QuickTime",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
+    "cmd": [
       "top",
       "-l",
       "3",