So in my scenario, I am trying to assign multiple groups, the user to a file in /dev/. So I have created a custom AID in config.fs and the corresponding [path], mode, caps parameter also configured. Also modifies my apk to uses this new gid.
At runtime, I saw that a custom group is created and my process(java process) also has this custom gid in Groups(cat /proc//status). But still, I can't perform the operation on /dev/* file.
So my question is this possible in android that a file/folder can have multiple owners and groups?
config.fs
I guess you are developing a ROM? That's off-topic here. And you talked about DAC only. What about MAC (SELinux)?