I am trying to run monkeyrunner on my Raspberry Pi but having difficulty.
First I installed the Android Tools adb package ....
apt-get clean
apt-get update
apt-get upgrade
apt-get install android-tools-adb
.... which proceeded smoothly and completed with no apparent gotchas.
When I just run "adb devices" from the command line, it looks fine:
root@raspberrypi:~# adb devices
List of devices attached
LGL41Cda259c3 device
root@raspberrypi:~#
so it seems the underlying USB plumbing between RPi and my phone, USB debugging mode, etc. is all working properly. Also I can run "adb shell", etc. with no trouble.
I downloaded the Android Studio command line tools .tgz from the official website onto the RPi, unzipped and extracted the directory structure+files from the tar archive into my /home/pi directory, etc. That went well.
However, when I run monkeyrunner (as root), I immediately get the error ---
root@raspberrypi:~# /home/pi/android-sdk-linux/tools/monkeyrunner
E/adb: Cannot run program "/home/pi/android-sdk-linux/tools/adb": error=2, No such file or directory
So, I thought ... this should be easy --- just put a copy of /usr/bin/adb in /home/pi/android-sdk-linux/tools and all will be fine.
Now when I run monkeyrunner (as root), it does this ---
root@raspberrypi:~# /home/pi/android-sdk-linux/tools/monkeyrunner
01:01:40 E/DeviceMonitor: Connection attempts: 1
01:01:41 E/DeviceMonitor: Connection attempts: 2
01:01:42 E/DeviceMonitor: Connection attempts: 3
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.8.0_65
01:01:43 E/DeviceMonitor: Connection attempts: 4
>>> 01:01:44 E/DeviceMonitor: Connection attempts: 5
01:01:45 E/DeviceMonitor: Connection attempts: 6
01:01:46 E/DeviceMonitor: Connection attempts: 7
01:01:47 E/DeviceMonitor: Connection attempts: 8
01:01:48 E/DeviceMonitor: Connection attempts: 9
01:01:49 E/DeviceMonitor: Connection attempts: 10
[ad infinitum]
I've tried to do my research on this, and have found some seemingly relevant references with 'fixes' which basically seem to focus on config options to discourage IPv6 binding and forcing IPv4 binding, stopping and restarting the adb-server, etc. but nothing (including those) has helped.
I would greatly appreciate any further suggestions, since I would really like to get this to work using my RPi instead of my Windows laptop. Thank you very much.