From 3dba33f0718a36325ed7734d39df2ba026491037 Mon Sep 17 00:00:00 2001 From: thinkhy Date: Sun, 11 Jun 2017 23:08:47 +0800 Subject: [PATCH] replace "ps comm" with "ps" in the function listPidsByComm There exists an incompatibility problem as the shell command "ps comm" is invalid in some devices such as Google Pixel. Below is the output when I issued "ps com" in Pixel: 1|sailfish:/ $ ps com bad pid 'com' 1|sailfish:/ $ echo $? 1 So I replaced "ps comm" with "ps" which is workable for all the Android device. --- lib/util/devutil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util/devutil.js b/lib/util/devutil.js index 98ed7a82..4b1e9d00 100644 --- a/lib/util/devutil.js +++ b/lib/util/devutil.js @@ -39,7 +39,7 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) { shell: true } - return adb.shell(serial, ['ps', comm]) + return adb.shell(serial, ['ps']) .then(function(out) { return new Promise(function(resolve) { var header = true