mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 00:03:28 +02:00
This reverts commit 6f09708304.
This commit is contained in:
@@ -3,7 +3,6 @@ var util = require('util')
|
||||
var split = require('split')
|
||||
var Promise = require('bluebird')
|
||||
var androidDeviceList = require('android-device-list')
|
||||
var deviceClient = require('@devicefarmer/adbkit').DeviceClient
|
||||
|
||||
var devutil = module.exports = Object.create(null)
|
||||
|
||||
@@ -72,8 +71,7 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) {
|
||||
})
|
||||
}
|
||||
|
||||
var client = deviceClient(adb, serial)
|
||||
return client.shell('ps 2>/dev/null')
|
||||
return adb.shell(serial, 'ps 2>/dev/null')
|
||||
.then(findProcess)
|
||||
.then(function(res) {
|
||||
// return pids if process can be found in the output of 'ps' command
|
||||
@@ -83,7 +81,7 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) {
|
||||
}
|
||||
// otherwise try to run 'ps -elf'
|
||||
else {
|
||||
return client.shell('ps -lef 2>/dev/null')
|
||||
return adb.shell(serial, 'ps -lef 2>/dev/null')
|
||||
.then(findProcess)
|
||||
.then(function(res) {
|
||||
return Promise.resolve(res.pids)
|
||||
|
||||
Reference in New Issue
Block a user