Hi all,
I have a device file related to a USB device (/dev/ttyACM*) which is
connected and disconnected several times during a single boot of my
Android device.
How can I set the default permissions of this file to be, e.g., 777?
(We will restrict the permissions at a later point and protect the
device with a system service, but for prototyping we would like any
application to be able to read or write to it.)
Some old posts refer to adding lines in $ANDROID/system/init/devices.c
such as:
{ "/dev/ttyUSB0", 0666, AID_ROOT, AID_ROOT,
0 },
to the data structure : static struct perms_ devperms[]
Source:
http://groups.google.com/group/android-framework/browse_thread/thread/718d307bf51e8821
However, this seems to be obsolete, as there is no such static struct
any more. There is a method called add_dev_perms, however a quick
grep did not show me any place in the Android source code where this
is called.
I also am aware of the on-device-added init sections. Could I set the
permissions using this construct? Or is this out of date as well?
Appreciate any help as I struggle to keep up with a rapidly changing
platform...
Best regards,
Jim
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting