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.
Following these instructions I successfully managed to compile libcec for Android and execute it as root on the box, with this command:
echo <my-cec-command> | cec-client -s /dev/ttyACM0
where /dev/ttyACM0
is the device file created by the system when plugging the dongle.
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).
On the other hand the app can actually access the USB dongle via the USB Host API of the Android SDK (provided the user grants the permission) and can even be wrapped into a USB serial controller with UsbSerial library.
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?