Android权限分类及保护级别

Android权限分类及保护级别,第1张

概述Android权限分类及保护级别 1、正常类(属于安装时)--------下表中自己查询后标记:灰白色背景--------防护等级:正常normal(防护等级:又称保护级别),见https://developer.android.com/guideopics/permissions/overview#install-time,只需在AndroidManifest.xml中显式的声明(或在IDE中 AndroID权限分类及保护级别

 

1、正常类(属于安装时)--------下表中自己查询后标记:灰白色背景--------防护等级:正常normal(防护等级:又称保护级别),见https://developer.android.com/guide/topics/permissions/overview#install-time,只需在AndroIDManifest.xml中显式的声明(或在IDE中勾选),它不会在运行时被自动拉起或被你的代码动态拉起。

2、特殊类(属于安装时)--------下表中自己查询后标记:紫色背景--------防护等级:签名signature(防护等级:又称保护级别),它会被你的代码动态拉起。其下包含子等级签名|特权|开发,|特权|开发:只有平台和原始设备制造商 (OEM) 可以定义特殊权限。此外,如果平台和 OEM 想要防止有人执行功能特别强大的 *** 作(例如通过其他应用绘图),通常会定义特殊权限--------防护等级:应用 *** 作appop。

3、运行时类(又称“危险类”,属于运行时)-------下表中自己查询后标记:-黄色背景--------防护等级:危险dangerous(防护等级:又称保护级别),必须在AndroIDManifest.xml中显式的声明,并在App中需要使用的代码位置动态调用权限申请。App在首次安装或运行时,这些权限会被自动拉起,之后必须在需要的时机被代码再次动态调用以让机主确认。见https://developer.android.com/training/permissions/requesting

上述是关键,下面这个清单,你具体查询https://developer.android.com/reference/android/Manifest.permission中描述的关于防护等级的具体阐述后,根据自己的需要做标记后使用:

 

Constants权限常量
StringACCEPT_HANDOVER

Allows a calling app to continue a call which was started in another app.

StringACCESS_BACKGROUND_LOCATION

Allows an app to access location in the background.

StringACCESS_CHECKIN_PROPERTIES

Allows read/write access to the "propertIEs" table in the checkin database, to change values that get uploaded.

StringACCESS_COARSE_LOCATION

Allows an app to access approximate location.

StringACCESS_FINE_LOCATION

Allows an app to access precise location.

StringACCESS_LOCATION_EXTRA_COMMANDS

Allows an application to access extra location provIDer commands.

StringACCESS_MEDIA_LOCATION

Allows an application to access any geographic locations persisted in the user's shared collection.允许应用访问用户共享集合中保留的任何地理位置。
在API级别29中添加,防护等级:危险,常数值:“ androID.permission.ACCESS_MEDIA_LOCATION”

StringACCESS_NETWORK_STATE

Allows applications to access information about networks.允许应用程序访问有关网络的信息。

在API级别1中添加,防护等级:正常,常数值:“ androID.permission.ACCESS_NETWORK_STATE”

StringACCESS_NOTIFICATION_POLICY

Marker permission for applications that wish to access notification policy.

StringACCESS_WIFI_STATE

Allows applications to access information about Wi-Fi networks.

StringACCOUNT_MANAGER

Allows applications to call into AccountAuthenticators.

StringACTIVITY_RECOGNITION

Allows an application to recognize physical activity.

StringADD_VOICEMAIL

Allows an application to add voicemails into the system.

StringANSWER_PHONE_CALLS

Allows the app to answer an incoming phone call.

StringBATTERY_STATS

Allows an application to collect battery statistics

Protection level: signature|privileged|development

StringBIND_ACCESSIBILITY_SERVICE

Must be required by an AccessibilityService, to ensure that only the system can bind to it.必须带有AccessibilityService,以确保只有系统可以绑定到它。

在API级别16中添加,防护等级:签名

StringBIND_APPWIDGET

Allows an application to tell the App@R_403_5537@ service which application can access App@R_403_5537@'s data.

StringBIND_AUTOFILL_SERVICE

Must be required by a AutofillService, to ensure that only the system can bind to it.

StringBIND_CALL_REDIRECTION_SERVICE

Must be required by a @L_502_47@, to ensure that only the system can bind to it.

StringBIND_CARRIER_MESSAGING_CLIENT_SERVICE

A subclass of CarrierMessagingClientService must be protected with this permission.

StringBIND_CARRIER_MESSAGING_SERVICE

This constant was deprecated in API level 23. Use BIND_CARRIER_SERVICES instead

StringBIND_CARRIER_SERVICES

The system process that is allowed to bind to services in carrIEr apps will have this permission.

StringBIND_CHOOSER_TARGET_SERVICE

This constant was deprecated in API level 30. For publishing direct share targets, please follow the instructions in https://developer.androID.com/training/sharing/receive.HTML#provIDing-direct-share-targets instead.

StringBIND_COMPANION_DEVICE_SERVICE

Must be required by any CompanionDeviceServices to ensure that only the system can bind to it.

StringBIND_CONDITION_PROVIDER_SERVICE

Must be required by a ConditionProviderService, to ensure that only the system can bind to it.

StringBIND_CONTROLS

Allows systemUI to request third party controls.

StringBIND_DEVICE_ADMIN

Must be required by device administration receiver, to ensure that only the system can interact with it.

StringBIND_DREAM_SERVICE

Must be required by an DreamService, to ensure that only the system can bind to it.

StringBIND_INCALL_SERVICE

Must be required by a InCallService, to ensure that only the system can bind to it.

StringBIND_INPUT_METHOD

Must be required by an InputMethodService, to ensure that only the system can bind to it.

StringBIND_MIDI_DEVICE_SERVICE

Must be required by an MidiDeviceService, to ensure that only the system can bind to it.

StringBIND_NFC_SERVICE

Must be required by a HostApduService or OffHostApduService to ensure that only the system can bind to it.

StringBIND_NOTIFICATION_LISTENER_SERVICE

Must be required by an NotificationListenerService, to ensure that only the system can bind to it.

StringBIND_PRINT_SERVICE

Must be required by a PrintService, to ensure that only the system can bind to it.

StringBIND_QUICK_ACCESS_WALLET_SERVICE

Must be required by a QuickAccessWalletService to ensure that only the system can bind to it.

StringBIND_QUICK_SETTINGS_TILE

Allows an application to bind to third party quick settings tiles.

StringBIND_REMOTEVIEWS

Must be required by a RemoteViewsService, to ensure that only the system can bind to it.

StringBIND_SCREENING_SERVICE

Must be required by a CallScreeningService, to ensure that only the system can bind to it.

StringBIND_TELECOM_CONNECTION_SERVICE

Must be required by a ConnectionService, to ensure that only the system can bind to it.

StringBIND_TEXT_SERVICE

Must be required by a TextService (e.g. SpellCheckerService) to ensure that only the system can bind to it.

StringBIND_TV_INPUT

Must be required by a TvInputService to ensure that only the system can bind to it.

StringBIND_VISUAL_VOICEMAIL_SERVICE

Must be required by a link VisualVoicemailService to ensure that only the system can bind to it.

StringBIND_VOICE_INTERACTION

Must be required by a VoiceInteractionService, to ensure that only the system can bind to it.

StringBIND_VPN_SERVICE

Must be required by a VpnService, to ensure that only the system can bind to it.

StringBIND_VR_LISTENER_SERVICE

Must be required by an VrListenerService, to ensure that only the system can bind to it.

StringBIND_WALLPAPER

Must be required by a WallpaperService, to ensure that only the system can bind to it.

StringBLUETOOTH

Allows applications to connect to paired bluetooth devices.

StringBLUETOOTH_ADMIN

Allows applications to discover and pair bluetooth devices.

StringBLUETOOTH_CONNECT

required to be able to connect to paired Bluetooth devices.

StringBLUETOOTH_PRIVILEGED

Allows applications to pair bluetooth devices without user interaction, and to allow or disallow phonebook access or message access.

StringBLUETOOTH_SCAN

required to be able to discover and pair nearby Bluetooth devices.

StringBODY_SENSORS

Allows an application to access data from sensors that the user uses to measure what is happening insIDe their body, such as heart rate.

StringBROADCAST_PACKAGE_REMOVED

Allows an application to broadcast a notification that an application package has been removed.

StringBROADCAST_SMS

Allows an application to broadcast an SMS receipt notification.

StringBROADCAST_STICKY

Allows an application to broadcast sticky intents.

StringBROADCAST_WAP_PUSH

Allows an application to broadcast a WAP PUSH receipt notification.

StringCALL_COMPANION_APP

Allows an app which implements the InCallService API to be eligible to be enabled as a calling companion app.

StringCALL_PHONE

Allows an application to initiate a phone call without going through the Dialer user interface for the user to confirm the call.

StringCALL_PRIVILEGED

Allows an application to call any phone number, including emergency numbers, without going through the Dialer user interface for the user to confirm the call being placed.

StringCAMERA

required to be able to access the camera device.

StringCAPTURE_AUDIO_OUTPUT

Allows an application to capture audio output.

StringCHANGE_COMPONENT_ENABLED_STATE

Allows an application to change whether an application component (other than its own) is enabled or not.

StringCHANGE_CONFIGURATION

Allows an application to modify the current configuration, such as locale.

StringCHANGE_NETWORK_STATE

Allows applications to change network connectivity state.

StringCHANGE_WIFI_MULTICAST_STATE

Allows applications to enter Wi-Fi Multicast mode.

StringCHANGE_WIFI_STATE

Allows applications to change Wi-Fi connectivity state.

StringCLEAR_APP_CACHE

Allows an application to clear the caches of all installed applications on the device.

StringCONTROL_LOCATION_UPDATES

Allows enabling/disabling location update notifications from the radio.

StringDELETE_CACHE_FILES

old permission for deleting an app's cache files, no longer used, but signals for us to quIEtly ignore calls instead of throwing an exception.

StringDELETE_PACKAGES

Allows an application to delete packages.

StringDIAGNOSTIC

Allows applications to RW to diagnostic resources.

StringDISABLE_KEYGUARD

Allows applications to disable the keyguard if it is not secure.

StringDUMP

Allows an application to retrIEve state dump information from system services.

StringEXPAND_STATUS_BAR

Allows an application to expand or collapse the status bar.

StringFACTORY_TEST

Run as a manufacturer test application, running as the root user.

StringFOREGROUND_SERVICE

Allows a regular application to use Service.startForeground.

StringGET_ACCOUNTS

Allows access to the List of accounts in the Accounts Service.

StringGET_ACCOUNTS_PRIVILEGED

Allows access to the List of accounts in the Accounts Service.

StringGET_PACKAGE_SIZE

Allows an application to find out the space used by any package.

StringGET_TASKS

This constant was deprecated in API level 21. No longer enforced.

StringGLOBAL_SEARCH

This permission can be used on content provIDers to allow the global search system to access their data.

StringHIDE_OVERLAY_WINDOWS

Allows an app to prevent non-system-overlay windows from being drawn on top of it

StringHIGH_SAMPLING_RATE_SENSORS

Allows an app to access sensor data with a sampling rate greater than 200 Hz.

StringINSTALL_LOCATION_PROVIDER

Allows an application to install a location provIDer into the Location Manager.

StringINSTALL_PACKAGES

Allows an application to install packages.

StringINSTALL_SHORTCUT

Allows an application to install a shortcut in Launcher.

StringINSTANT_APP_FOREGROUND_SERVICE

Allows an instant app to create foreground services.

StringINTERACT_ACROSS_PROFILES

Allows interaction across profiles in the same profile group.

StringINTERNET

Allows applications to open network sockets.

StringKILL_BACKGROUND_PROCESSES

Allows an application to call ActivityManager.killBackgroundProcesses(String).

StringLOADER_USAGE_STATS

Allows a data loader to read a package's access logs.

StringLOCATION_HARDWARE

Allows an application to use location features in harDWare, such as the geofencing API.

StringMANAGE_DOCUMENTS

Allows an application to manage access to documents, usually as part of a document picker.

StringMANAGE_EXTERNAL_STORAGE

Allows an application a broad access to external storage in scoped storage.

StringMANAGE_MEDIA

Allows an application to modify and delete media files on this device or any connected storage device without user confirmation.

StringMANAGE_ONGOING_CALLS

Allows to query ongoing call details and manage ongoing calls

Protection level: signature|appop

StringMANAGE_OWN_CALLS

Allows a calling application which manages its own calls through the self-managed ConnectionService APIs.

StringMASTER_CLEAR

Not for use by third-party applications.

StringMEDIA_CONTENT_CONTROL

Allows an application to kNow what content is playing and control its playback.

StringMODIFY_AUDIO_SETTINGS

Allows an application to modify global audio settings.

StringMODIFY_PHONE_STATE

Allows modification of the telephony state - power on, mmi, etc.

StringMOUNT_FORMAT_FILESYSTEMS

Allows formatting file systems for removable storage.

StringMOUNT_UNMOUNT_FILESYSTEMS

Allows mounting and unmounting file systems for removable storage.

StringNFC

Allows applications to perform I/O operations over NFC.

StringNFC_PREFERRED_PAYMENT_INFO

Allows applications to receive NFC preferred payment service information.

StringNFC_TRANSACTION_EVENT

Allows applications to receive NFC transaction events.

StringPACKAGE_USAGE_STATS

Allows an application to collect component usage statistics

Declaring the permission implIEs intention to use the API and the user of the device can grant permission through the Settings application.

StringPERSISTENT_ACTIVITY

This constant was deprecated in API level 15. This functionality will be removed in the future; please do not use. Allow an application to make its activitIEs persistent.

StringPROCESS_OUTGOING_CALLS

This constant was deprecated in API level 29. Applications should use @L_502_47@ instead of the Intent.ACTION_NEW_OUTGOING_CALL broadcast.

StringQUERY_ALL_PACKAGES

Allows query of any normal app on the device, regardless of manifest declarations.

StringREAD_CALENDAR

Allows an application to read the user's calendar data.

StringREAD_CALL_LOG

Allows an application to read the user's call log.

StringREAD_CONTACTS

Allows an application to read the user's contacts data.

StringREAD_EXTERNAL_STORAGE

Allows an application to read from external storage.允许应用程序从外部存储读取。声明了WRITE_EXTERNAL_STORAGE权限的任何应用都将会被隐式授予此权限。

在API级别16中,防护等级:危险,常数值:“ androID.permission.READ_EXTERNAL_STORAGE”

StringREAD_INPUT_STATE

This constant was deprecated in API level 16. The API that used this permission has been removed.

StringREAD_LOGS

Allows an application to read the low-level system log files.

StringREAD_PHONE_NUMBERS

Allows read access to the device's phone number(s).

StringREAD_PHONE_STATE

Allows read only access to phone state, including the current cellular network information, the status of any ongoing calls, and a List of any PhoneAccounts registered on the device.

StringREAD_PRECISE_PHONE_STATE

Allows read only access to precise phone state.

StringREAD_SMS

Allows an application to read SMS messages.

StringREAD_SYNC_SETTINGS

Allows applications to read the sync settings.

StringREAD_SYNC_STATS

Allows applications to read the sync stats.

StringREAD_VOICEMAIL

Allows an application to read voicemails in the system.

StringREBOOT

required to be able to reboot the device.

StringRECEIVE_BOOT_COMPLETED

Allows an application to receive the Intent.ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting.

StringRECEIVE_MMS

Allows an application to monitor incoming MMS messages.

StringRECEIVE_SMS

Allows an application to receive SMS messages.

StringRECEIVE_WAP_PUSH

Allows an application to receive WAP push messages.

StringRECORD_AUDIO

Allows an application to record audio.

String@L_549_301@

Allows an application to change the Z-order of tasks.

StringREQUEST_COMPANION_PROFILE_WATCH

Allows app to request to be associated with a device via CompanionDeviceManager as a "watch"

Protection level: normal

StringREQUEST_COMPANION_RUN_IN_BACKGROUND

Allows a companion app to run in the background.

StringREQUEST_COMPANION_USE_DATA_IN_BACKGROUND

Allows a companion app to use data in the background.

StringREQUEST_DELETE_PACKAGES

Allows an application to request deleting packages.

StringREQUEST_IGNORE_BATTERY_OPTIMIZATIONS

Permission an application must hold in order to use Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS.

StringREQUEST_INSTALL_PACKAGES

Allows an application to request installing packages.

StringREQUEST_OBSERVE_COMPANION_DEVICE_PRESENCE

Allows an application to subscribe to notifications about the presence status change of their associated companion device

StringREQUEST_PASSWORD_COMPLEXITY

Allows an application to request the screen lock complexity and prompt users to update the screen lock to a certain complexity level.

StringRESTART_PACKAGES

This constant was deprecated in API level 15. The ActivityManager.restartPackage(String) API is no longer supported.

StringSCHEDULE_EXACT_ALARM

Allows an app to use exact alarm scheduling APIs to perform timing sensitive background work.

StringSEND_RESPOND_VIA_MESSAGE

Allows an application (Phone) to send a request to other applications to handle the respond-via-message action during incoming calls.

StringSEND_SMS

Allows an application to send SMS messages.

StringSET_ALARM

Allows an application to broadcast an Intent to set an alarm for the user.

StringSET_ALWAYS_FINISH

Allows an application to control whether activitIEs are immediately finished when put in the background.

StringSET_ANIMATION_SCALE

Modify the global animation scaling factor.

StringSET_DEBUG_APP

Configure an application for deBUGging.

StringSET_PREFERRED_APPLICATIONS

This constant was deprecated in API level 15. No longer useful, see PackageManager.addPackageToPreferred(String) for details.

StringSET_PROCESS_LIMIT

Allows an application to set the maximum number of (not needed) application processes that can be running.

StringSET_TIME

Allows applications to set the system time directly.

StringSET_TIME_ZONE

Allows applications to set the system time zone directly.

StringSET_WALLPAPER

Allows applications to set the wallpaper.

StringSET_WALLPAPER_HINTS

Allows applications to set the wallpaper hints.

StringSIGNAL_PERSISTENT_PROCESSES

Allow an application to request that a signal be sent to all persistent processes.

StringSMS_FINANCIAL_TRANSACTIONS

This constant was deprecated in API level S. The API that used this permission is no longer functional.

StringSTART_FOREGROUND_SERVICES_FROM_BACKGROUND

Allows an application to start foreground services from background, can only be granted to privileged apps or app that is SMS/EMERGENCY/SYstem galLERY roles.

StringSTART_VIEW_PERMISSION_USAGE

Allows the holder to start the permission usage screen for an app.

StringSTATUS_BAR

Allows an application to open, close, or disable the status bar and its icons.

StringSYSTEM_ALERT_WINDOW

Allows an app to create windows using the type WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY, shown on top of all other apps.

StringTRANSMIT_IR

Allows using the device's IR transmitter, if available.

StringUNINSTALL_SHORTCUT

 

Don't use this permission in your app.

StringUPDATE_DEVICE_STATS

Allows an application to update device statistics.

StringUSE_BIOMETRIC

Allows an app to use device supported biometric modalitIEs.

StringUSE_FINGERPRINT

This constant was deprecated in API level 28. Applications should request USE_BIOMETRIC instead

StringUSE_FULL_SCREEN_INTENT

required for apps targeting Build.VERSION_CODES.Q that want to use notification full screen intents.

StringUSE_ICC_AUTH_WITH_DEVICE_IDENTIFIER

Allows to read device IDentifIErs and use ICC based authentication like EAP-AKA.

StringUSE_SIP

Allows an application to use SIP service.

StringVIBRATE

Allows access to the vibrator.

StringWAKE_LOCK

Allows using PowerManager WakeLocks to keep processor from sleePing or screen from dimming.

StringWRITE_APN_SETTINGS

Allows applications to write the apn settings and read sensitive fIElds of an existing apn settings like user and password.

StringWRITE_CALENDAR

Allows an application to write the user's calendar data.

StringWRITE_CALL_LOG

Allows an application to write (but not read) the user's call log data.

StringWRITE_CONTACTS

Allows an application to write the user's contacts data.

StringWRITE_EXTERNAL_STORAGE

Allows an application to write to external storage.允许应用程序写入外部存储。声明该权限的任何应用都将隐式授予androID.permission.READ_EXTERNAL_STORAGE从外部存储读取的权限。

在API级别4中添加,防护等级:危险,常数值:“ androID.permission.WRITE_EXTERNAL_STORAGE”

StringWRITE_GSERVICES

Allows an application to modify the Google service map.

StringWRITE_SECURE_SETTINGS

Allows an application to read or write the secure system settings.

StringWRITE_SETTINGS

Allows an application to read or write the system settings.

String@L_653_404@

Allows applications to write the sync settings.

StringWRITE_VOICEMAIL

Allows an application to modify and remove existing voicemails in the system.

 

 

 

 

总结

以上是内存溢出为你收集整理的Android权限分类及保护级别全部内容,希望文章能够帮你解决Android权限分类及保护级别所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1017540.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存