I am developing an application for a custom tablet (built-in as a sales tool by my company) running Android. The application must communicate via a virtual serial port with a connected USB device. The drivers are installed and working fine (this is the CP2101 USB controller for the Silicon labs UART Bridge controller). I am using the serial port library found at: http://code.google.com/p/android-serialport-api/ .
The problem is that when the device is mounted, I do not have permission to open it in Android. The Android serial port library expects a file to open, which is usually / dev / ttyUSB 0, but the application does not have permission to do so. If I open the adb shell and run "chmod 666 / dev / ttyUSB0", everything will be fine. Of course, I need a more permanent solution.
I do not think init.rc will work, because I want to be able to modify the device file whenever it is mounted, and not just at boot. Is there a way to force Linux to mount this device (or any device in fact) with softer permissions?
Thanks in advance.
source share