This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to change /sys/class/rfkill/rfkill0/state permission automatically?

Hi,

I am testing usb bluetooth function in android2.3.4,

and I want to chmod 0660 /sys/class/rfkill/rfkill0/state, and chown bluetooth.bluetooth /sys/class/rfkill/rfkill0/state automatically when I plug the usb bluetooth card.

if I add these commands into init.rc, when the board boots with card pulged in, that is ok, the permission is changed; but if I want to plug the card in when the system is already up, how to let the file permission changed automatically?

Thanks,

Kevin