1

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?

3
  • not sure about mounted namespaces, but in linux world subgroubs can be members of groups. on file system level you can only chown single group
    – alecxs
    Nov 6, 2020 at 16:03
  • 1
    I don't know of any OS where a file is owned by multiple users or groups. You can have multiple supplementary groups though, or something like ACLs. Not clear what you are trying to do. From config.fs I guess you are developing a ROM? That's off-topic here. And you talked about DAC only. What about MAC (SELinux)? Nov 6, 2020 at 16:22
  • @IrfanLatif ok to elaborate more in android /dev/snd/pcm* is owned by user system and group audio. just for some reason, I want to access PCM device from an apk. instead of assigning the full audio gid permission I thought to create a custom gid and have this gid also in /dev/snd/pcm. Nov 6, 2020 at 16:36

0

You must log in to answer this question.

Browse other questions tagged .