0

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 chunkand 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."

hsqzggg
  • 1
  • 2

1 Answers1

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).

  • ps(1) lists running processus.

  • kill(1) sends a SIGTERM signal from the linux kernel directly to the process you targeted.

shkschneider
  • 17,833
  • 13
  • 59
  • 112