Sometimes, we see the problem where the jenkins is no longer listing the android device when trying to run our automated tests.
We try adb devices and there is nothing coming back. We unplug and replug and nothing happens.
Well…I worked out what was causing so this so that I no longer see it…and I’ll tell you about that later, but in order to get things running again, here’s what you generally need to do.
You need to kill and restart the adb as root on the jenkins server and THEN you need to unplug and replug the device(s). Do the following (on an ubuntu server)
sudo su enter password cd Android/Sdk/platform-tools/ ./adb kill-server ./adb start-server ./adb devices exit
So, what’s causing this? Generally it’s two calabash jobs running at the same time that causes adb to get confused as hell. To prevent this either build a rake task or install a build blocker plug-in.