This is a similar post as device-node-access-permissions-in-linux 6 years ago without an answer.
I have a device node at /dev/magic-i2c
created using misc_register()
, the problem is the default access permissions for this device node is for root, and cant be accessed by AOSP
libraries. I tried adding .mode = S_IRWXUGO
but no effect. How can I change the permission of this device node automatically during bootup?
You can add your device to this file in AOSP :
{AOSP DIR}/system/core/rootdir/ueventd.rc
First Add your device then set UID/GID and access mode for it.