diff --git a/devlib/utils/android.py b/devlib/utils/android.py index e6db188..93c1fda 100644 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -291,7 +291,7 @@ def adb_disconnect(device): _check_env() if not device: return - if ":" in device: + if ":" in device and device in adb_list_devices(): command = "adb disconnect " + device logger.debug(command) retval = subprocess.call(command, stdout=open(os.devnull, 'wb'), shell=True)