只是为了它的Heck,我请求了我的应用程序(hello world)的所有权限,以查看授予的权限类型以及被拒绝的权限是什么!令我高兴的是,我发现大约有40个权限未被授予!其中两个作为未知权限返回。
以下是拒绝给我的所有权限的日志 -
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系统是先进的,它能理解代码吗?
如果您能够在几行中向我解释这个概念而不是指向常规权限和安全文档,我将非常感激。我已经读完了几次,我想我的理解是缺乏某种观点。因此,我更愿意阅读其他一些尝试向我解释。感谢
答案 0 :(得分:32)
Android权限分为四组:
- 定期
- 危险
- 系统或签名
- 签名
前两组的权限可以授予任何申请 最后两个只能通过 system 的应用程序获得 - 预先安装在设备的固件中或使用“平台密钥”进行签名,即使用的相同密钥签署固件。
答案 1 :(得分:9)