Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop the monkey madness?

I'm using the monkey tool to run a test of my Android application. For example, I might do a run like the following:

adb shell monkey -p com.myapp -v 10000 

However, if I change my mind and need to cancel the test, there doesn't seem to be a way to do so that doesn't involve waiting multiple minutes for the damned monkey to finish most or all of its run.

Killing the adb shell process on my mac doesn't solve the problem. Killing the com.myapp process on my phone using ddms doesn't work. Unplugging my phone doesn't work.

How do I cancel the monkey madness?

like image 972
emmby Avatar asked Apr 03 '12 18:04

emmby


People also ask

What monkey bones do I need for Monkey Madness?

For this quest, only one monkey talisman and Monkey bones are needed (make sure those are Karamjan monkey's bones; otherwise, you will have to run back again. You can substitute the bones with a Monkey corpse.).

Where do I start the Monkey Madness quest?

Go to Karamja. You should take the glider at the top of the Grand Tree to Karamja (Gandius). If you do not have monkey bones (or a monkey corpse), kill a monkey to obtain some. Enter the shipyard north of the glider landing site and speak with G.L.O.

How do I get back to the hangar in Monkey Madness?

After beginning Monkey Madness you are able to talk to Daero at Blurberry's Bar in the Grand Tree. He will be able to take you to the secret military glider hangar. You can also leave the hangar using the teleportation device located towards the hangar's south end. This will return you to the Tree Gnome Stronghold.


2 Answers

You can kill the monkey process just doing this:

$ adb shell ps | awk '/com\.android\.commands\.monkey/ { system("adb shell kill " $2) }' 
like image 71
Diego Torres Milano Avatar answered Sep 21 '22 14:09

Diego Torres Milano


[Nitpick] You're confusing monkeyrunner with monkey.

The monkeyrunner tool is not related to the UI/Application Exerciser Monkey, also known as the monkey tool. The monkey tool runs in an adb shell directly on the device or emulator and generates pseudo-random streams of user and system events. In comparison, the monkeyrunner tool controls devices and emulators from a workstation by sending specific commands and events from an API.

[/Nitpick]

On my Android 2.2 device when I start monkey, I see a process started in DDMS by the name "?" (just a question mark). When I killed that process, the monkey madness stopped.

like image 39
Dheeraj Vepakomma Avatar answered Sep 20 '22 14:09

Dheeraj Vepakomma