为什么这些权限会被拒绝? [英] Why are these permissions being refused?

查看:18
本文介绍了为什么这些权限会被拒绝?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是为了见鬼,我从我的应用程序 (hello world) 中请求了所有权限,以查看授予的权限类型和拒绝的权限类型!令我高兴的是,我发现大约有 40 个未授予权限!两个作为未知权限返回.

Just for the Heck of it, I requested all the permissions from my application (hello world), to see what are the types of permissions that are granted and what are those that are refused! To my amusement I found about 40 of the permissions not granted! Two were returned as unknown permissions.

这里是所有拒绝给我的权限的日志 -

Here is the log of all the permissions that were denied to me -

W/PackageManager(   61): Not granting permission android.permission.ACCESS_CHECKIN_PROPERTIES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.ACCESS_SURFACE_FLINGER to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.ACCOUNT_MANAGER to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BIND_APPWIDGET to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BIND_DEVICE_ADMIN to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BIND_INPUT_METHOD to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BIND_WALLPAPER to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BRICK to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BROADCAST_PACKAGE_REMOVED to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BROADCAST_SMS to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.BROADCAST_WAP_PUSH to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.CALL_PRIVILEGED to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.CHANGE_COMPONENT_ENABLED_STATE to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.CLEAR_APP_USER_DATA to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.CONTROL_LOCATION_UPDATES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.DELETE_CACHE_FILES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.DELETE_PACKAGES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.DEVICE_POWER to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.DIAGNOSTIC to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.FACTORY_TEST to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.FORCE_BACK to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.GLOBAL_SEARCH to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.HARDWARE_TEST to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.INJECT_EVENTS to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.INSTALL_LOCATION_PROVIDER to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.INSTALL_PACKAGES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.INTERNAL_SYSTEM_WINDOW to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.MANAGE_APP_TOKENS to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.MASTER_CLEAR to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.READ_FRAME_BUFFER to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Unknown permission android.permission.READ_HISTORY_BOOKMARKS in package com.robosoft.linuxtop
W/PackageManager(   61): Not granting permission android.permission.READ_INPUT_STATE to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.REBOOT to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.SET_ACTIVITY_WATCHER to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.SET_ORIENTATION to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.SET_PREFERRED_APPLICATIONS to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.SET_TIME to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.STATUS_BAR to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.UPDATE_DEVICE_STATS to package com.robosoft.linuxtop (protectionLevel=2 flags=0x8444)
W/PackageManager(   61): Not granting permission android.permission.WRITE_GSERVICES to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)
W/PackageManager(   61): Unknown permission android.permission.WRITE_HISTORY_BOOKMARKS in package com.robosoft.linuxtop
W/PackageManager(   61): Not granting permission android.permission.WRITE_SECURE_SETTINGS to package com.robosoft.linuxtop (protectionLevel=3 flags=0x8444)

事实上,我知道二级权限不授予第三方应用程序开发人员,仅保留给 OEM.但我很惊讶,因为我拒绝了很多三级权限(如果不是全部!).因此,我的问题是为什么会这样,我是否需要在清单中添加其他内容才能接受这些权限?系统也不应该授予我对模拟器的权限,因为毕竟它是用于开发的吗?它是否智能,因为它会拒绝它认为对我的应用程序不合理的权限?android系统先进到它理解代码吗?

Now for a fact I know level two permissions are not granted to third party application developers and are reserved only for OEMs. But I am surprised as a lot of level three permissions have been denied to me (if not all!). Hence my question would be why is it so, do I need to add something else to my manifest for those permissions to be accepted? Also is not the system supposed to grant my permissions on the emulator because after all its for development? And is it intelligent as in it would reject permissions that it deems unreasonable of my application? Is android system that advanced that it understands code?

如果您能用几行文字向我解释这个概念,而不是将我指向常规权限和安全文档,我将不胜感激.我已经通读了几次,我想我的理解在某些方面有所欠缺.因此,我更愿意阅读其他一些向我解释它的尝试.谢谢

I would much appreciate it if you could actually explain me this concept in a couple of lines instead of pointing me to the regular permissions and security documentations. I have read through it a couple of times and I guess my understanding is lacking in some perspective. Hence I would much prefer to read some other attempt at explaining it to me. Thanks

推荐答案

Android 权限分为四组:
- 常规
- 危险
- 系统或签名
- 签名

Android permissions are separated to four groups:
- Regular
- Dangerous
- System or Signed
- Signed

前两个组中的权限可以授予任何应用程序.
最后两个只能由系统的应用程序获得 - 预装在设备的固件中,或者使用平台密钥"签名,即使用的相同密钥签署固件.

Permissions in the first two groups can be granted to any application.
The last two can be obtained only by applications which are system - preinstalled in the device's firmware or which are signed with the "platform key", i.e. the same key that was used to sign the firmware.

这篇关于为什么这些权限会被拒绝?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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