+Blog

Paul Bourdeaux

Director of Marketing Technology

More Posts

The Android Monkey

The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare. So what happens when that same monkey hits keys at random on your new G1 phone from HMK? Android, as it turns out, has the answer…

As part of its Android SDK, Google has included the Monkey. According to the documentation, “The Monkey is a command-line tool that that you can run on any emulator instance or on a device. It sends a pseudo-random stream of user events into the system, which acts as a stress test on the application software you are developing.” So basically it is the same thing as having a monkey randomly push buttons on the emulator or device, hence the name. It does a great job of stress testing your applications, and includes a variety of arguments that allow you to sick the Monkey on a specific application, control the length of time it is active, and seed the random event generator. Definitely something that should be used in application development.

However, when looking at the docs a bit more, the phrase I keyed in on was “emulator or device.” Device? You mean that The Monkey is also included on the only Android device currently in existence, the G1? I am not sure how much damage a monkey can do, but my four year old once downloaded over a hundred dollars of material onto my phone… and that was before 3G networks existed. Considering that this command line tool is included as part of the SDK itself, it wouldn’t be all that hard for a less than scrupulous person to hack into it and send your phone into a flurry of random activity. When I run the Monkey on the emulator, it routinely sets alarms, changes contacts, and tries to log into my application. On a phone, how long would it take for it to text message your girlfriend, delete that priceless photo of you at the Vikings game, or call 911? Given the likelihood of malicious use, I suspect that the Monkey will not be available on devices as indicated, unless done through some kind of development only environment.

Posted in: Mobile, Google, Software Development, Software Maintenance

Share