获取Android应用程序的Linux UID
16lz
2021-01-22
I would like to be able to get the Linux UID (user ID) of an installed Android application.
我希望能够获得已安装的Android应用程序的Linux UID(用户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."
安全和权限摘录:“在安装时,Android为每个软件包提供了一个独特的Linux用户ID。在该软件包的生命周期内,该标识保持不变。”
Is there a way to retrieve this UID?
有没有办法检索这个UID?
4 个解决方案
#1
20
Use PackageManager
and getApplicationInfo()
.
使用PackageManager和getApplicationInfo()。
更多相关文章
- 如何查找特定用户可执行的所有文件(不是最新的)
- 在linux 列出 超级用户 普通用户和 系统用户
- linux 用户和组操作
- Linux服务器权限管理实践——添加用户只访问某些文件目录
- 在Linux中使用PAM进行身份验证为什么它可能无法从某些用户运行?
- Ubuntu 安装XAMPP集成环境软件包 与 运行WordPress 的简单方法
- 关于使用samba用户的权限设置
- Shell脚本创建linux用户帐户但密码出错
- Linux 批量添加和删除用户