fix adb ps exec for old device
This commit is contained in:
parent
9cb9058ab8
commit
bb4c479a77
|
@ -190,12 +190,8 @@ class ADB:
|
|||
# Try to get the list of processes using `ps -A`
|
||||
prompt = [*self.prompt, 'ps']
|
||||
sp = shell([*prompt, '-A'])
|
||||
|
||||
if sp.returncode != 0:
|
||||
self.logger.error('Failed to execute ps -A command (Error: %s)', sp.stderr.decode('utf-8').strip())
|
||||
return processes
|
||||
|
||||
lines = sp.stdout.decode('utf-8').splitlines()
|
||||
|
||||
# If the output has less than 10 lines, try the alternative `ps` command
|
||||
if len(lines) < 10:
|
||||
sp = shell(prompt)
|
||||
|
|
Loading…
Reference in New Issue