Hi everybody,

I am trying to run Android on my prototype phone. The phone has a
sensor (a device that reports its orientation to the phone) attached
to it through the USB interface.

I have developed a hardware module for that sensor, the name of the
shared library for the module being "sensors.default.so". The module
communicates with the sensor through the device file /dev/ttyUSB0.

The problem I am facing is that the device file /dev/ttyUSB0 has
permissions as:
crw-------    root   root  188,   0   1980-01-10   18:47    ttyUSB0

So, when I test the module's functionality by running a test android
application, the application doesn't have enough privileges to read/
write from/to the device file. So, the results are negative.

And, if I test the same functionality by running a native test
application (via the adb shell, so it runs as root), the results are
positive.

I tried to solve this issue by modifying the startup scripts (these
run as root) to change the device file permissions at startup, but it
seems that the device file is created after the scripts have completed
their execution.

Any suggestions on what should be done, to make the android
application able to read/write from/to the device file ?
How to change the device file permissions at the time of creation ?

Thanks,
Puneet Jindal

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to