From bb83d064129e55175ad3d0e1afb9c2d9d0c79cd6 Mon Sep 17 00:00:00 2001 From: DeepMind Date: Mon, 12 Aug 2024 11:47:36 -0700 Subject: [PATCH] Avoid including device name in adb command if it is empty. PiperOrigin-RevId: 662172728 --- android_env/components/adb_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android_env/components/adb_controller.py b/android_env/components/adb_controller.py index a8a1b9d..6031ffa 100644 --- a/android_env/components/adb_controller.py +++ b/android_env/components/adb_controller.py @@ -54,7 +54,7 @@ def command_prefix(self, include_device_name: bool = True) -> list[str]: '-P', str(self._config.adb_server_port), ] - if include_device_name: + if include_device_name and self._config.device_name: command_prefix.extend(['-s', self._config.device_name]) return command_prefix