1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 18:29:17 +02:00

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.
This commit is contained in:
thinkhy 2017-06-11 23:08:47 +08:00 committed by GitHub
parent 3896e185fd
commit 3dba33f071

View file

@ -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