From 81f9ee2c506ebf3228dea45f2dd058ef563720b4 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 31 Mar 2021 10:04:22 +0100 Subject: [PATCH] utils/android: Use busybox implementation of ps On some older versions of ps the flags used to look up the pids are not supported and results in no output. Use the busybox implementation for consistency. --- 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 90be900..3140e31 100755 --- a/devlib/utils/android.py +++ b/devlib/utils/android.py @@ -603,7 +603,7 @@ def adb_background_shell(conn, command, p = subprocess.Popen(full_command, stdout=stdout, stderr=stderr, shell=True) # Out of band PID lookup, to avoid conflicting needs with stdout redirection - find_pid = 'ps -A -o pid,args | grep {}'.format(quote(uuid_var)) + find_pid = '{} ps -A -o pid,args | grep {}'.format(conn.busybox, quote(uuid_var)) ps_out = conn.execute(find_pid) pids = [ int(line.strip().split(' ', 1)[0])