获取Linux的UID一个Android应用程序的 [英] Obtain the Linux UID of an Android App
本文介绍了获取Linux的UID一个Android应用程序的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能够得到一个安装的Android应用程序的Linux的UID(用户ID)。
I would like to be able to get the Linux UID (user ID) of an installed Android application.
从安全和权限:在安装的时候,Android给每个包一个独特的Linux的用户ID。该身份保持恒定在该设备上的程序包的寿命的持续时间。
Excerpt from Security and Permissions: "At install time, Android gives each package a distinct Linux user ID. The identity remains constant for the duration of the package's life on that device."
有没有一种方法来检索这个UID?
Is there a way to retrieve this UID?
推荐答案
使用 PackageManager
和 getApplicationInfo()
。
这篇关于获取Linux的UID一个Android应用程序的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文