6
votes

I am developing an application for a custom tablet (built as a sales tool by my company) running Android. The application needs to communicate over a virtual serial port to an attached USB device. The drivers are installed and work great (it is a CP2101 USB to UART Bridge Controller by Silicon labs). I am using the serial port library found at: http://code.google.com/p/android-serialport-api/.

The problem is whenever the device is mounted I do not have permission to open it in Android. The Android serial port library expects to open a file, which is usually /dev/ttyUSB0, but the application does not have permission to do so. If I open the adb shell and run "chmod 666 /dev/ttyUSB0" everything works great. Of course I need a more permanent solution.

I don't think init.rc will work because I want to be able to modify the device file whenever it is mounted, not just at boot. Is there a way to force Linux to mount this device (or any device really) with more lenient permissions?

Thanks in advance.

1

1 Answers

3
votes

Check /ueventd.rc. There are configured device permissions and owners/groups.