I know we can assign permission to device driver to run on root/group/user mode using udev config scripts but I am not sure how to run program which is using driver in Android HAL to run in specific user mode? I could execute program only after I executed chmod 777 on /dev/ttyOx.
I saw Bluetooth module in udev config in Android scripts using like this
chmod 0660 /dev/ttyO1 chown system system /dev/ttyS0
My question is , how can program using specific driver can be registered to specific group or user permission such as Bluetooth in above scripts and make only that specific program to use device driver?