Android签名保护和导出="false"

Android signature protection and exported="false"

我希望我的 ContentProvider 仅在我的应用程序中可用, 为此,我将 ContentProvider 的 exported 属性设置为 false

android:exported="false"

这工作正常,Android 抛出 SecurityException 每当其他应用程序试图访问 ContentProvider

问题: 添加 "signature protection permission" 作为额外保护有意义吗?

应用由多个进程组成,ContentProvider用于进程间通信,无需与其他应用通信

谢谢

是的,这是使用您定义的权限保护内容提供者的最安全方式。将其设为签名权限,这样只有使用您的证书签名的应用才能获得它。

也可以参考developer console

如果您的应用程序的最低级别 is lower then 17 :

这是可能的,并且很有用

Because this attribute was introduced in API level 17, all devices running API level 16 and lower behave as though this attribute is set "true".