From 00f3f5f690bdb9bf549dcfbb7fc456d8bacdb3c3 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Mon, 6 Jul 2020 17:04:06 +0100 Subject: [PATCH] android/background: Specify the device for background cmds Ensure the device is passed when executing a background command. --- devlib/utils/android.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/utils/android.py b/devlib/utils/android.py index 4c9587d..3b695dc 100755 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -574,7 +574,7 @@ def adb_background_shell(conn, command, uuid_var = 'BACKGROUND_COMMAND_UUID={}'.format(uuid_) command = "{} sh -c {}".format(uuid_var, quote(command)) - adb_cmd = get_adb_command(None, 'shell', adb_server) + adb_cmd = get_adb_command(device, 'shell', adb_server) full_command = '{} {}'.format(adb_cmd, quote(command)) logger.debug(full_command) p = subprocess.Popen(full_command, stdout=stdout, stderr=stderr, shell=True)