只是出于好奇,我申请了我的应用程序(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)
我知道第二级权限不会授予第三方应用程序开发人员,只保留给原始设备制造商。但我很惊讶,因为我被拒绝了很多三级权限(如果不是全部的话!)。因此我的问题是为什么会这样,我需要在清单文件中添加其他内容才能接受这些权限吗?此外,系统不应该授予模拟器上的权限吗?毕竟这是用于开发的?并且它是否聪明到会拒绝它认为不合理的应用程序权限?Android系统那么先进,它能理解代码吗?
如果您能用几句话解释这个概念,而不是指向常规的权限和安全文档,我将不胜感激。我已经阅读了几遍,但从某些角度来看我的理解还有欠缺。因此,我更希望阅读其他人尝试解释它的文章。谢谢