I want to stop the running monkey by using the adb shell monkey --wait-dbg
,but the result is only display like this:Sending WAIT chunk
and then the monkey is still running.
How to understand the command?The official explain is "Stops the Monkey from executing until a debugger is attached to it."
Asked
Active
Viewed 1,115 times
0

hsqzggg
- 1
- 2
-
Try `adb shell ps | awk '/com\.android\.commands\.monkey/ { system("adb shell kill " $2) }'` – shkschneider Apr 24 '14 at 10:01
-
Thanks a lot. But I know this way to stop monkey .I just want to understand this command. – hsqzggg Apr 24 '14 at 10:06
1 Answers
0
I'm not sure as to why your command did not work, but you reported this as working:
adb shell ps | awk '/com\.android\.commands\.monkey/ { system("adb shell kill " $2) }'
This is a linux command line.
Let me explains it: it displays all running processes (ps), filter it to get the process id of "com.android.commands.monkey" (awk) then sends it a SIGTERM signal (kill).

shkschneider
- 17,833
- 13
- 59
- 112