asysbang

 找回密码
 立即注册
查看: 6947|回复: 0
打印 上一主题 下一主题

系统权限汇总

[复制链接]

513

主题

2

好友

6404

积分

管理员

Rank: 80Rank: 80Rank: 80Rank: 80Rank: 80

最佳新人 活跃会员 热心会员 推广达人 宣传达人 灌水之王 突出贡献 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-4-25 15:47:57 |只看该作者 |倒序浏览
android系统定义了一些权限,应用通过在AndroidManifest中配置,来申请这些权限,
但是申请了,不一定会被系统批准,因为有些权限,需要检查签名或者申请的进程的
例如android.permission.REBOOT
这个权限需要有系统签名或者系统进程才能申请成功,那么怎么查看一个权限的具体定义呢?
android源代码目录下frameworks/base/core/res/AndroidManifest.xml里面定义了

附件是4.2源代码的AndroidManifest.xml,仅供参考



下面是android系统对各种权限的描述   frameworks/base/core/res/values/attrs_manifest.xml
    <attr name="protectionLevel">
        <!-- A lower-risk permission that gives an application access to isolated
             application-level features, with minimal risk to other applications,
             the system, or the user. The system automatically grants this type
             of permission to a requesting application at installation, without
             asking for the user's explicit approval (though the user always
             has the option to review these permissions before installing). -->
        <flag name="normal" value="0" />
        <!-- A higher-risk permission that would give a requesting application
             access to private user data or control over the device that can
             negatively impact the user.  Because this type of permission
             introduces potential risk, the system may not automatically
             grant it to the requesting application.  For example, any dangerous
             permissions requested by an application may be displayed to the
             user and require confirmation before proceeding, or some other
             approach may be taken to avoid the user automatically allowing
             the use of such facilities.  -->
        <flag name="dangerous" value="1" />
        <!-- A permission that the system is to grant 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. -->
        <flag name="signature" value="2" />
        <!-- A permission that the system is to grant only to packages in the
             Android system image <em>or</em> that are signed with the same
             certificates. Please avoid using this option, as the
             signature protection level should be sufficient for most needs and
             works regardless of exactly where applications are installed.  This
             permission is used for certain special situations where multiple
             vendors have applications built in to a system image which need
             to share specific features explicitly because they are being built
             together. -->
        <flag name="signatureOrSystem" value="3" />
        <!-- Additional flag from base permission type: this permission can also
             be granted to any applications installed on the system image.
             Please avoid using this option, as the
             signature protection level should be sufficient for most needs and
             works regardless of exactly where applications are installed.  This
             permission flag is used for certain special situations where multiple
             vendors have applications built in to a system image which need
             to share specific features explicitly because they are being built
             together. -->
        <flag name="system" value="0x10" />
        <!-- Additional flag from base permission type: this permission can also
             (optionally) be granted to development applications. -->
        <flag name="development" value="0x20" />
    </attr>

PS:development 这个有空需要研究下


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|aSys-帮 ( 京ICP备13033689号 )

GMT+8, 2024-10-5 16:24 , Processed in 0.045638 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部