android - 系统或签名保护级别

标签 android permissions

有关“systemOrSignature”保护级别的信息似乎存在一些冲突。

如果我有一个预装的系统应用程序,该应用程序包含在 OEM 的镜像中,但由我签名,我的应用程序将具有此保护级别,对吗?这与需要 OEM 签名的“签名”保护级别不同。

如果是这样,我的应用程序会被授予此权限吗? android.permission.INSTALL_PACKAGES

默认情况下,这似乎设置为 systemOrSignature 级别保护,但 stackoverflow 上的大多数答案都表明需要 OEM 签名,例如:

Install apps silently, with granted INSTALL_PACKAGES permission

Troubles installing programmatically an app with INSTALL_PACKAGES permission from /system/app

最佳答案

If I have a preinstalled system app included with the image by the OEM, but signed by me, my app will have this protection level, correct?

这就是应该发生的事情。

If so, will my application be granted this permission? android.permission.INSTALL_PACKAGES

基于the current source code ,是的:

<permission android:name="android.permission.INSTALL_PACKAGES"
    android:label="@string/permlab_installPackages"
    android:description="@string/permdesc_installPackages"
    android:protectionLevel="signature|system" />

请记住,任何给定权限的规则可能会随着时间的推移而改变。

By default this seems to be set to systemOrSignature level protection, but most answers on stackoverflow indicate that the OEM signature will be required

您的第二个链接说安装在固件上就足够了,这与当前的源代码一致。

此外,有时对 SO 的回答和评论会使用一些速记。由于您可以通过查看源代码来了解您需要什么,因此您始终可以自己验证给定权限是否仅签名

关于android - 系统或签名保护级别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14348066/

相关文章:

android - React Native 中的平台特定组件

android - 附加到gmail时pdf的大小显示为0

macos - 撤销 requestAccessToEntityType : authorization on Mavericks so I can test my app

php - 无法写入只读 SQLite 数据库文件

java - 更改 TextView 样式 Android 应用程序

java - Android应用内计费如何实现

java - java检查不存在文件的权限

powershell - Get-AzureRmADApplication 显示没有权限

java - 应用不显示?

android - 以编程方式翻译 Activity 的动画