title: java.io.IOException: write failed: ENODEV while writting data to arduino from JellyBean device
body: <p>Am getting</p>
  
  <pre><code>E/xx( 5508): java.io.IOException: write failed: ENODEV (No such device)
  E/xxx( 5508):   at libcore.io.IoBridge.write(IoBridge.java:462)
  E/xxx( 5508):   at java.io.FileOutputStream.write(FileOutputStream.java:187)
  E/xxx( 5508):   at java.io.OutputStream.write(OutputStream.java:82)
  </code></pre>
  
  <p>when writing(via USB) data to Arduino from my jelly bean device.
  Code in Android for writing is </p>
  
  <pre><code>try {
             String buff = new String(v.getText().toString());
             buff += '\0';
             mOutputStream.write(buff.getBytes());
  } catch (IOException e) {
             Log.e(TAG, "write failed", e);
  }
  </code></pre>
  
  <p>and code for reading in arduino is </p>
  
  <pre><code>  while (Serial.available()) {
      char inChar = (char)Serial.read(); 
      inputStringFromSerial += inChar;
      if (inChar == 0xd) { // inchar == '\n'
        stringComplete = true;
      } 
    }
  </code></pre>
  
  <p>Even though my Android can detect the accessory automatically and start my app automatically I cannot write to or read from Arduino. Permission is also acquired properly</p>
  
  <p>Also from where do I get latest ADK libraries for Arduino?Some libraris need acc.powerOn() while some need acc.begin() to start.Which one is latest?</p>
  
  <p>I got it working for just once without any code changes.But only once, after that no :(</p>