Uid和Gid

1. Android中Uid定义在 Process.java 中

//frameworks/base/core/java/android/os/Process.java
public class Process {
    public static final int ROOT_UID = 0; //Defines the root UID.
    public static final int SYSTEM_UID = 1000; //Defines the UID/GID under which system code runs.
    public static final int PHONE_UID = 1001; //Defines the UID/GID under which the telephony code runs.
    public static final int SHELL_UID = 2000;
    public static final int FIRST_APPLICATION_UID = 10000; //Defines the start of a range of UIDs (and GIDs) of App.
    ...
}

 

2. 查看Uid Gid

/proc # cat /proc/3806/status
Name:   ndroid.systemui
...
Uid:    10184   10184   10184   10184
Gid:    10184   10184   10184   10184

 

posted on 2023-01-17 14:38  Hello-World3  阅读(148)  评论(0编辑  收藏  举报

导航