The android system checks the pid and uid to find the corresponding application

终端中输入adb shell,然后输入 cat /proc/<pid>/status。

Through packages.xml, check the UID of the application to be queried,
enter adb shell in the terminal, and then enter cat /data/system/packages.xml.
cat /data/system/packages.list

Viewing method
Through the PS command
terminal, enter adb shell and then enter ps, you can view the process list as shown in the figure below
Through the process list, we can see that there are various types of users, among which u0_axxx represents the user of the application. The u0_axxx is different for each application. From the overview, we know that the UID of the application starts from 10000, and the value obtained by adding 10000 to the number after u0_a is the UID.

Get the UIDs of all installed apps programmatically

Guess you like

Origin blog.csdn.net/baiyifei2016/article/details/129142173