【问题标题】:Android permissions, signature and the developer's keyAndroid 权限、签名和开发者密钥
【发布时间】:2013-02-15 11:34:16
【问题描述】:

我正在开发一个包含多个组件的应用程序,每个组件都是一个单独的 Android 应用程序。 “核心”应用程序将使用内容提供者来提供对数据库的访问,并且阅读权限文档“签名”保护是我想要的方式。

我已经为我的权限定义了一个组,主要是为了让我的权限可以很好地显示在应用信息的“权限”部分中我自己的图标上。与android:protectionLevel="normal" 他们显示得很好。但是当我使用android:protectionLevel="signature" 时,它们消失了。

<permission-group
    android:name="com.example.permissions.GROUP"
    android:label="@string/lblGroup"
    android:description="@string/descGroup"
    android:icon="@drawable/ic_menu_permissions_group" />

<permission
    android:name="com.example.permission.CONFIG_READ"
    android:permissionGroup="com.example.permissions.GROUP"
    android:protectionLevel="signature"
    android:label="@string/lblConfigRead"
    android:description="@string/descConfigRead" />
<permission
    android:name="com.example.permission.CONFIG_WRITE"
    android:permissionGroup="com.example.permissions.GROUP"
    android:protectionLevel="signature"
    android:label="@string/lblConfigWrite"
    android:description="@string/descConfigWrite" />

鉴于我目前正在开发并因此使用开发人员密钥,是否需要跳过其他一些障碍才能使“签名”保护级别为开发人员工作?

一如既往地非常感谢您的帮助

史蒂夫

【问题讨论】:

    标签: android android-permissions


    【解决方案1】:

    但是当我使用 android:protectionLevel="signature" 他们消失了。

    那是因为用户不需要批准它们。签名级权限会根据应用的签名自动授予和拒绝。

    为了让“签名”保护级别为开发人员工作,我需要跳过其他一些障碍吗?

    它已经适用于您自己的应用程序。如果“开发者”是第三方,则不能使用签名级权限,因为他们将使用自己的签名密钥进行签名。

    【讨论】:

    • 感谢 CW。在逐步建立权限的过程中,我从“正常”切换到“签名”作为一个错误。 :-)
    • 这是一个七年前的帖子。所以我认为现在情​​况已经发生了变化。如果您的应用程序使用与您尝试从其他应用程序使用的权限相同的签名证书,则会授予签名权限。查看文档并查看 android 提供的默认签名权限,看起来这些权限仅供操作系统使用,如果我没记错的话,开发人员的签名权限是为了在您的应用程序之间共享自定义权限。
    猜你喜欢
    • 2019-11-26
    • 1970-01-01
    • 2019-09-29
    • 1970-01-01
    • 2012-01-24
    • 1970-01-01
    • 1970-01-01
    • 2013-12-27
    • 2015-05-19
    相关资源
    最近更新 更多