签名保护级别-阐明 [英] signature protection level - clarifying

查看:102
本文介绍了签名保护级别-阐明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我是Android的新手,所以我想问一些我不太清楚的问题.我阅读了 API指南关于权限的更多问题和解答. ;考虑这个话题,我仍然不确定我是否理解正确.因此,签名保护级别为:

As I am new to Android, I wanted to ask something which is not clear enough to me. I read the API guide about the permissions as a lot more Q&A considering this topic, still, I am not sure if I understand it correctly. So, signature protection level is:

仅当请求应用程序时系统才授予的权限 使用与声明的应用程序相同的证书签名 许可.如果证书匹配,系统将自动 授予许可而无需通知用户或要求 用户的明确批准.

A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval.

这是否意味着我不能使用具有签名"保护级别的任何权限,因此除开发团队之外,任何人都无法使用Android API中定义的所有具有这种保护级别的权限? >

Does this mean that I am not able to use any permission with 'signature' protection level, so all permissions defined in the Android's API and having such protection level are unavailable to anyone, apart the team which is developing it?

推荐答案

这是否意味着我无法使用具有签名"保护级别的任何权限,因此除开发团队之外,任何人都无法使用Android API中定义的所有具有该保护级别的权限? >

Does this mean that I am not able to use any permission with 'signature' protection level, so all permissions defined in the Android's API and having such protection level are unavailable to anyone, apart the team which is developing it?

一般来说是的.

更具体地说,signature级权限意味着该应用使用该权限为自己辩护(例如,通过android:permission属性),而该应用尝试与需要该权限的第一个应用对话(<uses-permission>元素) )必须使用相同的签名密钥签名.

More specifically, a signature-level permission means that the app defending itself with that permission (e.g., via android:permission attributes) and the app trying to talk to the first app that needs the permission (<uses-permission> element) must be signed by the same signing key.

如果防御程序本身是设备固件的一部分,或者是操作系统本身,则只有使用与该固件具有相同签名密钥签名的应用程序才能通过获得许可与防御程序进行对话.

If the app defending itself is part of the device firmware, or is the OS itself, only apps signed by the same signing key as that firmware can talk to the defending app by holding the permission.

但是,如果 you 编写使用signature级权限(例如自定义权限)为自己辩护的App A,而 you 编写需要如果要使用相同的签名密钥对App A和App B进行签名,则可以与App A的被保护部分进行对话.

However, if you write App A that defends itself with a signature-level permission (e.g., a custom one), and you write App B that wants to talk to the defended portions of App A, you can do so, if you are signing App A and App B with the same signing key.

这篇关于签名保护级别-阐明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆