7

I am a little confused on how to actually use monkey, i thought you were supposed to power on your emulator and go into terminal editor and type:

$ adb shell monkey -p insert.my.package.name.here -v 500

since that did not work (error, adb: permission denied)

i tried monkey -p insert.blah.blah -v 500 and this comes up that it has been killed, what am I doing wrong?

Macarse
  • 91,829
  • 44
  • 175
  • 230
Demonicpenguin
  • 113
  • 1
  • 3
  • 13

2 Answers2

6

It's probably trying to talk to a device over your USB port.

You probably just need to add an -e in there to tell adb to connect to the emulator:

$ adb shell monkey -p insert.my.package.name.here -v 500

(Or -s serialnum if you have more than one emulator running.)

See Directing commands in the ADB docs.

tangentstorm
  • 7,183
  • 2
  • 29
  • 38
  • Thank you for your response, my actual problem was that i was using the terminal editor right on the emulator itself i didn't think you would have to run it through command prompt aswell – Demonicpenguin Oct 26 '11 at 03:42
0

It's well explained here:

https://android.googlesource.com/platform/development/+/master/cmds/monkey/README.NETWORK.txt

it's a tool for testing apps, and the port indicates which porto to connect (binds to localhost) to issue remote commands

Zibri
  • 9,096
  • 3
  • 52
  • 44