开发者

How to determine and set android.process.media group?

Android has a system media service, which process name is android.process.media. It has sharedUserId=android.media, and id of process itself is simply app_xx. In the absence of the shell commands groups, u开发者_如何学Pythonseradd, and proper-functional id i don't have any idea how to get it.


In short:

  • to determine android.process.media GIDs look at the ActivityManager log which contains them.
  • To add a new GID add it as a permission: first a new value in "android_filesystem_config.h", then a permission in AndroidManifest.xml of base frameworks and finally assign it to the target in "permissions.xml".

Android platform uses a hard-coded list of user and group IDs which is stored in the file called "android_filesystem_config.h".

Most of system services have the same gids as SystemServer process which GIDs are hard-coded in it's main() function in Zygote.

Additional GIDs are mapped in permissions.xml to Android permissions. There're also special permissions for ADB root user, Media service, etc. are set in this file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜