title: Sending logcat input into monkeyrunner through eclipse/java results in issues
body: <p>I am working on a tool to identify widgets within an android app, and display their properties when clicked upon. I have created a standalone tool that can successfully do this, but I am having issues in converting the standalone tool into an eclipse plugin, which will be necessary to package into our final product. </p>
  
  <p>The way that the tool operates is that first, a transparent overlay application is run on the emulator. This application gathers the coordinate of a screen press by the user and writes it to the Android log. Then, the application to be tested is started on the emulator.</p>
  
  <p>Adb logcat is piped as standard input into a monkeyrunner script which handles the widget identification. In real time, the monkeyrunner script parses the logcat input for the coordinate press information. The monkeyrunner script uses AndroidViewClient (https://github.com/dtmilano/AndroidViewClient ), a tool which can list all of the View objects on a screen and their properties. Using the coordinate press information, the View from the list of Views which has the correct coordinate properties is singled out, and its properties are printed out. </p>
  
  <p>The issue(s) that I am having stem from attempting to handle the piping of logcat output to the monkeyrunner script within the context of eclipse/java. If I run adb logcat and monkeyrunner in separate, concurrent processes, and transfer logcat's InputStream to monkeyrunner's OutputStream, there seems to be some locking issue, as monkeyrunner never receives the coordinate information as input. I tried putting the stream handlers in separate threads as well, but this had no effect. </p>
  
  <p>Since concurrent processes can sometimes be a source of problems, I thought to read from logcat directly within monkeyrunner, thereby only having one main process. Within monkeyrunner, once a connection is established with the emulator, it is possible to open an adb shell on it (https://developer.android.com/tools/help/MonkeyDevice.html#shell). Logcat is a pretty common adb command, but when I run device.shell("logcat"), it fails with  </p>
  
  <pre><code>    [main] [com.android.chimpchat.adb.AdbChimpDevice] Error executing command: logcat
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    [main] [com.android.chimpchat.adb.AdbChimpDevice]com.android.ddmlib.ShellCommandUnrespo‌​nsiveException – 
  </code></pre>
  
  <p>Unfortunately, my google skills have not been able to find me a solution to this problem. </p>