title: Use libCEC + USB dongle in Android app
body: <p>My goal is to send HDMI CEC commands from a standard (i.e non-system) app running on an Android box equipped with Pulse-Eight's USB dongle.</p>
  
  <p>Following <a href="https://www.evernote.com/shard/s426/sh/73529e1e-45b2-4bc5-a96a-3ec7d7f3dd3b/d95ec16f56bc05646417fb6c7cfbd702" rel="noreferrer">these instructions</a> I successfully managed to compile <a href="https://github.com/Pulse-Eight/libcec" rel="noreferrer">libcec</a> for Android and execute it as root on the box, with this command:</p>
  
  <pre><code>echo &lt;my-cec-command&gt; | cec-client -s /dev/ttyACM0
  </code></pre>
  
  <p>where <code>/dev/ttyACM0</code> is the device file created by the system when plugging the dongle.</p>
  
  <p>However the permissions of this file prevent the command to be executed by a non-root user (therefore it cannot be executed from my Android app).</p>
  
  <p>On the other hand the app can actually access the USB dongle via the <a href="https://developer.android.com/guide/topics/connectivity/usb/host.html" rel="noreferrer">USB Host API</a> of the Android SDK (provided the user grants the permission) and can even be wrapped into a USB serial controller with <a href="https://github.com/felHR85/UsbSerial" rel="noreferrer">UsbSerial</a> library. </p>
  
  <p>But I don't see any way to make the bridge between the connection provided by Android's USB Host API and libcec/cec-client. Do you have any idea or suggestion?</p>