[TOC]
## 檢測方法
只需提取出所有<uses-permission>標簽中的android:name屬性的值即可,主要采用正則表達式來提取。

## 1 權限簡介
Android構建權限體系的目的是保護Android用戶的隱私。當Android應用請求訪問敏感用戶數據(如聯系人和短信)的權限,以及某些系統功能(如相機和互聯網)時,必須獲得權限許可。根據功能的不同,系統可能會自動授予權限,也可能會提示用戶批準請求。
Android安全體系結構的核心設計點是,默認情況下,任何應用程序都無權執行任何會對其他應用程序,操作系統或用戶產生負面影響的操作。這包括讀取或寫入用戶的私人數據(如聯系人或電子郵件),讀取或寫入其他應用程序的文件,執行網絡訪問,保持設備喚醒等等。
應用必須通過 `<uses-permission>`標簽在AndroidManifest中說明其所需的權限 。例如,需要發送SMS消息的應用程序需要包含以下行:
```
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.snazzyapp">
<uses-permission android:name="android.permission.SEND_SMS"/>
<application ...>
...
</application>
</manifest>
```
這是一個AndroidManifest.xml文件的例子,可以看到它申請了八個權限:

如果您的應用在其清單中列出了**正常**權限(即不會對用戶的隱私或設備操作造成太大風險的權限),系統會自動將這些權限授予您的應用。
如果您的應用在其清單中列出了**危險**權限(即可能影響用戶隱私或設備正常運行的`SEND_SMS`權限),例如上述權限,則用戶必須明確同意授予這些權限。
有關正常和危險權限的詳細信息,請參閱`第二節:權限的詳細清單`的內容。
只有危險權限才需要用戶同意。Android要求用戶授予危險權限的方式取決于用戶設備上運行的Android版本以及應用程序定位的系統版本。
### 運行時請求(Android 6.0及更高版本)
如果設備運行的是Android 6.0(API級別23)或更高版本, 并且應用程序的數量targetSdkVersion 為23或更高,則在安裝時不會通知用戶任何應用程序權限。您的應用必須要求用戶在運行時授予危險權限。當您的應用請求權限時,用戶會看到一個系統對話框(如圖1左側所示),告訴用戶您的應用嘗試訪問哪個權限組。該對話框包括拒絕和允許按鈕。
如果用戶拒絕權限請求,則下次應用請求權限時,該對話框包含一個復選框,選中該復選框后,表示不希望再次提示用戶獲得權限(參見圖1,右)。

圖1.初始權限對話框(左)和次要權限請求以及關閉進一步請求的選項(右)
如果用戶選中“ 永不再詢問”框并點擊 “拒絕”,則系統不再提示用戶以后是否嘗試請求相同的權限。
即使用戶授予您的應用程序所請求的權限,您也不能總是依賴它。用戶還可以選擇在系統設置中逐個啟用和禁用權限。您應該始終在運行時檢查并請求權限以防止運行時錯誤(SecurityException)。
有關如何處理運行時權限請求的詳細信息,請參閱 請求應用程序權限。
### 安裝時請求(Android 5.1.1及更低版本)
如果設備運行Android 5.1.1(API級別22)或更低版本,或者`targetSdkVersion` 在任何版本的Android上運行時 應用程序為22或更低,系統會自動要求用戶在安裝時為您的應用授予所有危險權限(見圖2)。

圖2.安裝時權限對話框
如果用戶單擊“ 接受”,則授予應用程序請求的所有權限。如果用戶拒絕權限請求,系統將取消應用程序的安裝。
如果應用更新包含對其他權限的需求,則會在更新應用之前提示用戶接受這些新權限。
## 2 權限的詳細清單
Android的權限體系,一般是分為四種保護等級:**正常、危險、簽名和簽名|特權**,但是根據實際情況,還需要再附加兩種情況:**不允許被第三方應用使用、已啟用**
| 保護等級 | 英文表示 | 英文簡寫 | 含義|
|---------------------------|---------------------------|---------|------|
| 正常 | normal | N | 默認值。風險較低的權限,允許請求應用程序訪問隔離的應用程序級功能,對其他應用程序,系統或用戶的風險最小。系統會在安裝時自動向請求的應用程序授予此類權限,而不會要求用戶明確批準(盡管用戶始終可以選擇在安裝之前查看這些權限)。 |
| 危險 | dangerous | D | 一種風險較高的權限,可以使請求的應用程序訪問私有用戶數據或控制可能對用戶產生負面影響的設備。由于此類權限會引入潛在風險,因此系統可能不會自動將其授予請求的應用程序。例如,應用程序請求的任何危險許可可以顯示給用戶并且在繼續之前需要確認,或者可以采取一些其他方法以避免用戶自動允許使用這些設施。 |
| 簽名 | signature | S | 僅當請求的應用程序使用與聲明權限的應用程序相同的證書進行簽名時系統授予的權限。如果證書匹配,系統會自動授予權限,而不通知用戶或要求用戶明確批準。 |
| 簽名/特權 | signature/privileged | S/P | *在API級別23后推薦使用"signatureOrSystem"表示*。</br>系統僅授予Android系統映像上專用文件夾中的應用程序*或*使用與聲明權限的應用程序相同的證書進行簽名的權限。應避免使用此選項,因為signature?保護級別應該足以滿足大多數需求,并且無論應用程序的確切安裝位置如何都能正常工作。“?signatureOrSystem”權限用于某些特殊情況,其中多個供應商將應用程序內置到系統映像中,并且需要明確共享特定功能,因為它們是一起構建的。 |
再附加兩種情況:
| 情況 | 英文表示 | 英文簡寫 |
|---------------------------|-------------------------------------------|---------|
| 不允許被第三方應用使用 | Not for Use by third-party applications | NU |
| 已棄用 | out | O |
### 特別注意
這里有必要提及一下**第三方應用**的概念,Android系統自帶的應用以外的,也就是我們開發者開發的Android應用,比如QQ、微博、微信、今日頭條、抖音和王者榮耀等等,都是第三方應用,這些應用都是不能擁有NU標注的權限的。
對于帶有**已棄用**標注的權限,有以下三種情況
1. 從API級別高于某一值廢棄。低于這個數值申請該權限屬于正常,但是高于這個數值,再申請肯定是錯誤的,因為此權限被棄用。我們使用`O-xxx`來表示從API級別xxx以后廢棄該權限。比如O-23表示從API Level為23以后棄用該權限。
2. 該權限被某一權限替代。比如BIND_CARRIER_MESSAGING_SERVICE被BIND_CARRIER_SERVICES取代。
2. 該權限被永久廢棄。我們用`O-all`來表示。
### 所有的權限列表清單
| 類型 | 權限字符串 | 安全等級 |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCEPT_HANDOVER](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCEPT_HANDOVER) </br>允許呼叫應用繼續在另一個應用中啟動的呼叫。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_CHECKIN_PROPERTIES](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_CHECKIN_PROPERTIES) </br>允許對簽入數據庫中的“屬性”表進行讀/寫訪問,以更改上載的值。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_COARSE_LOCATION](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION) </br>允許應用訪問大致位置。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_FINE_LOCATION](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION) </br>允許應用訪問精確位置。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_LOCATION_EXTRA_COMMANDS](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_LOCATION_EXTRA_COMMANDS) </br>允許應用程序訪問額外的位置提供程序命令。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_NETWORK_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_NETWORK_STATE) </br>允許應用程序訪問有關網絡的信息。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_NOTIFICATION_POLICY](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_NOTIFICATION_POLICY) </br>對希望訪問通知政策的應用程序的標記權限。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCESS_WIFI_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_WIFI_STATE) </br>允許應用程序訪問有關Wi-Fi網絡的信息。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ACCOUNT_MANAGER](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCOUNT_MANAGER) </br>允許應用程序調用AccountAuthenticators。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ADD_VOICEMAIL](https://developer.android.google.cn/reference/android/Manifest.permission.html#ADD_VOICEMAIL) </br>允許應用程序將語音郵件添加到系統中。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [ANSWER_PHONE_CALLS](https://developer.android.google.cn/reference/android/Manifest.permission.html#ANSWER_PHONE_CALLS) </br>允許該應用接聽來電。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BATTERY_STATS](https://developer.android.google.cn/reference/android/Manifest.permission.html#BATTERY_STATS) </br>允許應用程序收集電池統計信息 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_ACCESSIBILITY_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_ACCESSIBILITY_SERVICE) </br>必須由AccessibilityService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_APPWIDGET](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_APPWIDGET) </br>允許應用程序告訴AppWidget服務哪個應用程序可以訪問AppWidget的數據。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_AUTOFILL_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_AUTOFILL_SERVICE) </br>必須由a來要求AutofillService,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_CARRIER_MESSAGING_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_CARRIER_MESSAGING_SERVICE) </br>*此常量在API級別23中已棄用。請改為BIND_CARRIER_SERVICES使用* | S/P(O-23) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_CARRIER_SERVICES](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_CARRIER_SERVICES) </br>允許綁定到運營商應用程序中的服務的系統進程將具有此權限。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_CHOOSER_TARGET_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_CHOOSER_TARGET_SERVICE) </br>必須由ChooserTargetService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_CONDITION_PROVIDER_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_CONDITION_PROVIDER_SERVICE) </br>必須由ConditionProviderService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_DEVICE_ADMIN](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_DEVICE_ADMIN) </br>必須由設備管理接收器要求,以確保只有系統可以與之交互。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_DREAM_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_DREAM_SERVICE) </br>必須由DreamService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_INCALL_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_INCALL_SERVICE) </br>必須由InCallService調用,以確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_INPUT_METHOD](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_INPUT_METHOD) </br>必須由InputMethodService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_MIDI_DEVICE_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_MIDI_DEVICE_SERVICE) </br>必須由MidiDeviceService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_NFC_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_NFC_SERVICE) </br>必須由HostApduService或OffHostApduService調用,確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_NOTIFICATION_LISTENER_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_NOTIFICATION_LISTENER_SERVICE) </br>必須由NotificationListenerService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_PRINT_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_PRINT_SERVICE) </br>必須由PrintService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_QUICK_SETTINGS_TILE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_QUICK_SETTINGS_TILE) </br>允許應用程序綁定到第三方快速設置磁貼,只能由系統申請,并且附加TileService的聲明 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_REMOTEVIEWS](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_REMOTEVIEWS) </br>必須由RemoteViewsService調用,以確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_SCREENING_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_SCREENING_SERVICE) </br>必須由CallScreeningService調用,以確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_TELECOM_CONNECTION_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_TELECOM_CONNECTION_SERVICE) </br>必須由ConnectionService調用,以確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_TEXT_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_TEXT_SERVICE) </br>必須由TextService要求(例如 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_TV_INPUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_TV_INPUT) </br>必須由TvInputService調用,確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_VISUAL_VOICEMAIL_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_VISUAL_VOICEMAIL_SERVICE) </br>必須通過鏈接VisualVoicemailService來確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_VOICE_INTERACTION](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_VOICE_INTERACTION) </br>必須由VoiceInteractionService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_VPN_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_VPN_SERVICE) </br>必須由VpnService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_VR_LISTENER_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_VR_LISTENER_SERVICE) </br>必須由VrListenerService調用,以確保只有系統可以綁定它。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BIND_WALLPAPER](https://developer.android.google.cn/reference/android/Manifest.permission.html#BIND_WALLPAPER) </br>必須由WallpaperService調用,以確保只有系統可以綁定它。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BLUETOOTH](https://developer.android.google.cn/reference/android/Manifest.permission.html#BLUETOOTH) </br>允許應用程序連接到配對的藍牙設備。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BLUETOOTH_ADMIN](https://developer.android.google.cn/reference/android/Manifest.permission.html#BLUETOOTH_ADMIN) </br>允許應用程序發現并配對藍牙設備。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BLUETOOTH_PRIVILEGED](https://developer.android.google.cn/reference/android/Manifest.permission.html#BLUETOOTH_PRIVILEGED) </br>允許應用程序在沒有用戶交互的情況下配對藍牙設備,并允許或禁止電話簿訪問或消息訪問。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BODY_SENSORS](https://developer.android.google.cn/reference/android/Manifest.permission.html#BODY_SENSORS) </br>允許應用程序訪問用戶用來測量身體內部情況的傳感器數據,例如心率。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BROADCAST_PACKAGE_REMOVED](https://developer.android.google.cn/reference/android/Manifest.permission.html#BROADCAST_PACKAGE_REMOVED) </br>允許應用程序廣播已刪除應用程序包的通知。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BROADCAST_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#BROADCAST_SMS) </br>允許應用程序廣播SMS收據通知。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BROADCAST_STICKY](https://developer.android.google.cn/reference/android/Manifest.permission.html#BROADCAST_STICKY) </br>允許應用程序廣播粘性意圖。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [BROADCAST_WAP_PUSH](https://developer.android.google.cn/reference/android/Manifest.permission.html#BROADCAST_WAP_PUSH) </br>允許應用程序廣播WAP PUSH收據通知。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CALL_PHONE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CALL_PHONE) </br>允許應用程序在不通過撥號器用戶界面的情況下發起電話呼叫,以便用戶確認呼叫。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CALL_PRIVILEGED](https://developer.android.google.cn/reference/android/Manifest.permission.html#CALL_PRIVILEGED) </br>允許應用程序撥打任何電話號碼(包括緊急號碼),而無需通過撥號器用戶界面以便用戶確認正在撥打的電話。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CAMERA](https://developer.android.google.cn/reference/android/Manifest.permission.html#CAMERA) </br>需要能夠訪問相機設備。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CAPTURE_AUDIO_OUTPUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#CAPTURE_AUDIO_OUTPUT) </br>允許應用程序捕獲音頻輸出。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CAPTURE_SECURE_VIDEO_OUTPUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#CAPTURE_SECURE_VIDEO_OUTPUT) </br>允許應用程序捕獲安全視頻輸出。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CAPTURE_VIDEO_OUTPUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#CAPTURE_VIDEO_OUTPUT) </br>允許應用程序捕獲視頻輸出。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CHANGE_COMPONENT_ENABLED_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CHANGE_COMPONENT_ENABLED_STATE) </br>允許應用程序更改是否啟用了應用程序組件(除了它自己的組件)。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CHANGE_CONFIGURATION](https://developer.android.google.cn/reference/android/Manifest.permission.html#CHANGE_CONFIGURATION) </br>允許應用程序修改當前配置,例如區域設置。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CHANGE_NETWORK_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CHANGE_NETWORK_STATE) </br>允許應用程序更改網絡連接狀態。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CHANGE_WIFI_MULTICAST_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CHANGE_WIFI_MULTICAST_STATE) </br>允許應用程序進入Wi-Fi多播模式。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CHANGE_WIFI_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CHANGE_WIFI_STATE) </br>允許應用程序更改Wi-Fi連接狀態。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CLEAR\_APP\_CACHE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CLEAR_APP_CACHE) </br>允許應用程序清除設備上所有已安裝應用程序的緩存。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CONTROL_LOCATION_UPDATES](https://developer.android.google.cn/reference/android/Manifest.permission.html#CONTROL_LOCATION_UPDATES) </br>允許從收音機啟用/禁用位置更新通知。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [DELETE_CACHE_FILES](https://developer.android.google.cn/reference/android/Manifest.permission.html#DELETE_CACHE_FILES) </br>允許應用程序刪除緩存文件,這是舊的權限,不再使用,但是我們可以簡單地忽略它而不調用它,而不是拋出異常的信號。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [DELETE_PACKAGES](https://developer.android.google.cn/reference/android/Manifest.permission.html#DELETE_PACKAGES) </br>允許應用程序刪除包。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [DIAGNOSTIC](https://developer.android.google.cn/reference/android/Manifest.permission.html#DIAGNOSTIC) </br>允許應用程序將RW轉換為診斷資源。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [DISABLE_KEYGUARD](https://developer.android.google.cn/reference/android/Manifest.permission.html#DISABLE_KEYGUARD) </br>允許應用程序在密鑰保護不安全時禁用它。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [DUMP](https://developer.android.google.cn/reference/android/Manifest.permission.html#DUMP) </br>允許應用程序從系統服務檢索狀態轉儲信息。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [EXPAND_STATUS_BAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#EXPAND_STATUS_BAR) </br>允許應用程序展開或折疊狀態欄。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [FACTORY_TEST](https://developer.android.google.cn/reference/android/Manifest.permission.html#FACTORY_TEST) </br>作為制造商測試應用程序運行,以root用戶身份運行。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [FOREGROUND_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#FOREGROUND_SERVICE) </br>允許常規應用程序使用Service.startForeground。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [GET_ACCOUNTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#GET_ACCOUNTS) </br>允許訪問帳戶服務中的帳戶列表。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [GET_ACCOUNTS_PRIVILEGED](https://developer.android.google.cn/reference/android/Manifest.permission.html#GET_ACCOUNTS_PRIVILEGED) </br>允許訪問帳戶服務中的帳戶列表。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [GET_PACKAGE_SIZE](https://developer.android.google.cn/reference/android/Manifest.permission.html#GET_PACKAGE_SIZE) </br>允許應用程序查找任何包使用的空間。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [GET_TASKS](https://developer.android.google.cn/reference/android/Manifest.permission.html#GET_TASKS) </br>*此常量在API級別21中已棄用。不再強制執行。* | N/O-21 |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [GLOBAL_SEARCH](https://developer.android.google.cn/reference/android/Manifest.permission.html#GLOBAL_SEARCH) </br>此權限可用于內容提供商,以允許全局搜索系統訪問其數據。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [INSTALL_LOCATION_PROVIDER](https://developer.android.google.cn/reference/android/Manifest.permission.html#INSTALL_LOCATION_PROVIDER) </br>允許應用程序將位置提供程序安裝到位置管理器中。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [INSTALL_PACKAGES](https://developer.android.google.cn/reference/android/Manifest.permission.html#INSTALL_PACKAGES) </br>允許應用程序安裝包。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [INSTALL_SHORTCUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#INSTALL_SHORTCUT) </br>允許應用程序在Launcher中安裝快捷方式。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [INSTANT_APP_FOREGROUND_SERVICE](https://developer.android.google.cn/reference/android/Manifest.permission.html#INSTANT_APP_FOREGROUND_SERVICE) </br>允許即時應用創建前臺服務。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [INTERNET](https://developer.android.google.cn/reference/android/Manifest.permission.html#INTERNET) </br>允許應用程序打開網絡套接字。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [KILL_BACKGROUND_PROCESSES](https://developer.android.google.cn/reference/android/Manifest.permission.html#KILL_BACKGROUND_PROCESSES) </br>允許應用程序調用?ActivityManager.killBackgroundProcesses(String)。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [LOCATION_HARDWARE](https://developer.android.google.cn/reference/android/Manifest.permission.html#LOCATION_HARDWARE) 允許應用程序在硬件中使用位置功能,例如geofencing api。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MANAGE_DOCUMENTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#MANAGE_DOCUMENTS) </br>允許應用程序管理對文檔的訪問,通常作為文檔選擇器的一部分。 |S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MANAGE_OWN_CALLS](https://developer.android.google.cn/reference/android/Manifest.permission.html#MANAGE_OWN_CALLS) </br>允許通過自我管理的ConnectionServiceAPI?管理自己的調用的調用應用程序?。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MASTER_CLEAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#MASTER_CLEAR) </br>不適用于第三方應用程序。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MEDIA_CONTENT_CONTROL](https://developer.android.google.cn/reference/android/Manifest.permission.html#MEDIA_CONTENT_CONTROL) </br>允許應用程序知道正在播放的內容并控制其播放。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MODIFY_AUDIO_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#MODIFY_AUDIO_SETTINGS) </br>允許應用程序修改全局音頻設置。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MODIFY_PHONE_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#MODIFY_PHONE_STATE) </br>允許修改電話狀態 - 開機,mmi等 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MOUNT_FORMAT_FILESYSTEMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#MOUNT_FORMAT_FILESYSTEMS) </br>允許格式化可移動存儲的文件系統。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MOUNT_UNMOUNT_FILESYSTEMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#MOUNT_UNMOUNT_FILESYSTEMS) </br>允許安裝和卸載文件系統以進行可移動存儲。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [NFC](https://developer.android.google.cn/reference/android/Manifest.permission.html#NFC) </br>允許應用程序通過NFC執行I / O操作。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [NFC_TRANSACTION_EVENT](https://developer.android.google.cn/reference/android/Manifest.permission.html#NFC_TRANSACTION_EVENT) </br>允許應用程序接收NFC交易事件。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [PACKAGE_USAGE_STATS](https://developer.android.google.cn/reference/android/Manifest.permission.html#PACKAGE_USAGE_STATS) </br>允許應用程序收集組件使用情況統計信息,聲明權限意味著使用API??的意圖,設備用戶可以通過“設置”應用程序授予權限。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [PERSISTENT_ACTIVITY](https://developer.android.google.cn/reference/android/Manifest.permission.html#PERSISTENT_ACTIVITY) </br>*此常量在API級別9中已棄用。此功能將在以后刪除;?請不要使用。允許應用程序使其活動持久。* | O-all |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [PROCESS_OUTGOING_CALLS](https://developer.android.google.cn/reference/android/Manifest.permission.html#PROCESS_OUTGOING_CALLS) </br>允許應用程序查看撥出呼叫期間撥打的號碼,并選擇將呼叫重定向到其他號碼或完全中止呼叫。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_CALENDAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_CALENDAR) </br>允許應用程序讀取用戶的日歷數據。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_CALL_LOG](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_CALL_LOG) </br>允許應用程序讀取用戶的通話記錄。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_CONTACTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_CONTACTS) </br>允許應用程序讀取用戶的聯系人數據。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_EXTERNAL_STORAGE](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE) </br>允許應用程序從外部存儲讀取。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_FRAME_BUFFER](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_FRAME_BUFFER) </br>允許應用程序進行屏幕截圖,更一般地,可以訪問幀緩沖區數據。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_INPUT_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_INPUT_STATE) </br>*此常量在API級別16中已棄用。已刪除使用此權限的API。* | NU/O-16 |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_LOGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_LOGS) </br>允許應用程序讀取低級系統日志文件。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_PHONE_NUMBERS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS) </br>允許讀取設備的電話號碼。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_PHONE_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_PHONE_STATE) </br>允許只讀訪問電話狀態,包括設備的電話號碼,當前的蜂窩網絡信息,任何正在進行的呼叫的狀態以及PhoneAccount在設備上注冊的任何s?的列表?。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_SMS) </br>允許應用程序讀取SMS消息。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_SYNC_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_SYNC_SETTINGS) </br>允許應用程序讀取同步設置。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ_SYNC_STATS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_SYNC_STATS) </br>允許應用程序讀取同步統計信息。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [READ\_VOICEMAIL](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_VOICEMAIL) </br>允許應用程序讀取系統中的語音郵件。 | S/P |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REBOOT](https://developer.android.google.cn/reference/android/Manifest.permission.html#REBOOT) </br>必須能夠重啟設備。 |NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RECEIVE_BOOT_COMPLETED](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_BOOT_COMPLETED) </br>允許應用程序接收Intent.ACTION_BOOT_COMPLETED系統完成引導后廣播的應用程序?。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RECEIVE_MMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_MMS) </br>允許應用程序監控傳入的MMS消息。 |D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RECEIVE_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_SMS) </br>允許應用程序接收SMS消息。 |D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RECEIVE_WAP_PUSH](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_WAP_PUSH) </br>允許應用程序接收WAP推送消息。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RECORD_AUDIO](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECORD_AUDIO) </br>允許應用程序錄制音頻。 |D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REORDER_TASKS](https://developer.android.google.cn/reference/android/Manifest.permission.html#REORDER_TASKS) </br>允許應用程序更改任務的Z-order。 |N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REQUEST_COMPANION_RUN_IN_BACKGROUND](https://developer.android.google.cn/reference/android/Manifest.permission.html#REQUEST_COMPANION_RUN_IN_BACKGROUND) </br>允許隨播應用在后臺運行。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REQUEST_COMPANION_USE_DATA_IN_BACKGROUND](https://developer.android.google.cn/reference/android/Manifest.permission.html#REQUEST_COMPANION_USE_DATA_IN_BACKGROUND) </br>允許配套應用在后臺使用數據。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REQUEST_DELETE_PACKAGES](https://developer.android.google.cn/reference/android/Manifest.permission.html#REQUEST_DELETE_PACKAGES) </br>允許應用程序請求刪除包。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REQUEST_IGNORE_BATTERY_OPTIMIZATIONS](https://developer.android.google.cn/reference/android/Manifest.permission.html#REQUEST_IGNORE_BATTERY_OPTIMIZATIONS) </br>必須持有申請才能使用?Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [REQUEST_INSTALL_PACKAGES](https://developer.android.google.cn/reference/android/Manifest.permission.html#REQUEST_INSTALL_PACKAGES) </br>允許應用程序請求安裝包。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [RESTART\_PACKAGES](https://developer.android.google.cn/reference/android/Manifest.permission.html#RESTART_PACKAGES) </br>*API級別8中不推薦使用此常量ActivityManager.restartPackage(String)?。不再支持API。* | O-all |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SEND_RESPOND_VIA_MESSAGE](https://developer.android.google.cn/reference/android/Manifest.permission.html#SEND_RESPOND_VIA_MESSAGE) </br>允許應用程序(電話)向其他應用程序發送請求,以處理來電期間的響應消息操作。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SEND_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#SEND_SMS) </br>允許應用程序發送短信。 |D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_ALARM](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_ALARM) </br>允許應用程序廣播Intent以為用戶設置警報。 |N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_ALWAYS_FINISH](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_ALWAYS_FINISH) </br>允許應用程序控制在后臺放置活動是否立即完成。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_ANIMATION_SCALE](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_ANIMATION_SCALE) </br>修改全局動畫縮放系數。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_DEBUG_APP](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_DEBUG_APP) </br>配置應用程序以進行調試。 |NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_PREFERRED_APPLICATIONS](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_PREFERRED_APPLICATIONS) </br> *此常量在API級別7中已棄用。不再有用,請參閱?PackageManager.addPackageToPreferred(String)?詳細信息。* | O-all |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_PROCESS_LIMIT](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_PROCESS_LIMIT) </br>允許應用程序設置可以運行的最大(不需要)應用程序進程數。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_TIME](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_TIME) </br> 允許應用程序設置系統時間。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_TIME_ZONE](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_TIME_ZONE) </br>允許應用程序設置系統時區。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_WALLPAPER](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_WALLPAPER) </br>允許應用程序設置壁紙。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SET_WALLPAPER_HINTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#SET_WALLPAPER_HINTS) </br>允許應用程序設置壁紙提示。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SIGNAL_PERSISTENT_PROCESSES](https://developer.android.google.cn/reference/android/Manifest.permission.html#SIGNAL_PERSISTENT_PROCESSES) </br>允許應用程序請求將信號發送到所有持久進程。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [STATUS_BAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#STATUS_BAR) </br>允許應用程序打開,關閉或禁用狀態欄及其圖標。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SYSTEM_ALERT_WINDOW](https://developer.android.google.cn/reference/android/Manifest.permission.html#SYSTEM_ALERT_WINDOW) </br>允許應用使用WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY所有其他應用上顯示的類型創建窗口?。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [TRANSMIT_IR](https://developer.android.google.cn/reference/android/Manifest.permission.html#TRANSMIT_IR) </br>允許使用設備的紅外發射器(如果有)。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [UNINSTALL_SHORTCUT](https://developer.android.google.cn/reference/android/Manifest.permission.html#UNINSTALL_SHORTCUT) </br> **請勿在您的應用中使用此權限。** | O-all |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [UPDATE_DEVICE_STATS](https://developer.android.google.cn/reference/android/Manifest.permission.html#UPDATE_DEVICE_STATS) </br>允許應用程序更新設備統計信息。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [USE_BIOMETRIC](https://developer.android.google.cn/reference/android/Manifest.permission.html#USE_BIOMETRIC) </br>允許應用使用設備支持的生物識別模式。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [USE_FINGERPRINT](https://developer.android.google.cn/reference/android/Manifest.permission.html#USE_FINGERPRINT) </br>*這個常量在API-28已棄用,應用程序應申請權限USE_BIOMETRIC。* | N/O-28 |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [USE_SIP](https://developer.android.google.cn/reference/android/Manifest.permission.html#USE_SIP) </br> 允許應用程序使用SIP服務。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [VIBRATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#VIBRATE) </br>允許訪問振動器。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WAKE_LOCK](https://developer.android.google.cn/reference/android/Manifest.permission.html#WAKE_LOCK) </br>允許使用PowerManager WakeLocks防止處理器休眠或屏幕變暗。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_APN_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_APN_SETTINGS) </br>允許應用程序編寫apn設置。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_CALENDAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_CALENDAR) </br>允許應用程序寫入用戶的日歷數據。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_CALL_LOG](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_CALL_LOG) </br>允許應用程序寫入(但不讀取)用戶的呼叫日志數據。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_CONTACTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_CONTACTS) </br>允許應用程序寫入用戶的聯系人數據。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_EXTERNAL_STORAGE](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE) </br>允許應用程序寫入外部存儲。 | D |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_GSERVICES](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_GSERVICES) </br>許應用修改Google服務地圖。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_SECURE_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_SECURE_SETTINGS) </br>允許應用程序讀取或寫入安全系統設置。 | NU |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_SETTINGS) </br>允許應用程序讀取或寫入系統設置。 | S |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_SYNC_SETTINGS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_SYNC_SETTINGS) </br>允許應用程序寫入同步設置。 | N |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [WRITE_VOICEMAIL](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_VOICEMAIL) </br>允許應用程序修改和刪除系統中的現有語音郵件。 | S/P |
## 3 權限組
權限分組為與設備功能或功能相關的組。在此系統下,權限請求在組級別處理,單個權限組對應于應用程序清單中的多個權限聲明。例如,SMS組包括聲明`READ_SMS`和 `RECEIVE_SMS`聲明。以這種方式對權限進行分組使用戶能夠做出更有意義和更明智的選擇,而不會被復雜和技術許可請求所淹沒。

#### 對permission-group、permission、uses-permission三者的理解
權限組用標簽`<permission-group>`表示,這里需要說明一下`<permission>`標簽和`<uses-permission>`標簽的區別。
我們來看一下某版本的**Android系統的源代碼**,不要奇怪沒有見過`COST_MONEY`這個權限組,因為不同SDK對權限組的定義和劃分可能會有不同。
```
<permission-group
android:name="android.permission-group.COST_MONEY"
android:label="@string/permgrouplab_costMoney"
android:description="@string/permgroupdesc_costMoney"/>
<permission
android:name="android.permission.SEND_SMS"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="dangerous"
android:label="@string/permlab_sendSms"
android:description="@string/permdesc_sendSms"/>
<permission
android:name="android.permission.CALL_PHONE"
android:permissionGroup="android.permission-group.COST_MONEY"
android:protectionLevel="dangerous"
android:label="@string/permlab_callPhone"
android:description="@string/permdesc_callPhone"/>
```
可以看到,這邊先定義了一個permission-group:
* `android.permission-group.COST_MONEY`
然后又定義了兩個permission:
* `android.permission.SEND_SMS`
* `android.permission.CALL_PHONE`
需要注意的是,這兩個權限中都一個`android:permissionGroup`屬性,這個屬性就指定了這個權限所屬的PermissionGroup。
而PermissionGroup在定義時,僅僅制定了label和description,就是說明一下這個權限組的作用,沒什么其他用處。
通過這個Android系統的源碼我們也可以總結出`<permission>`標簽和`<uses-permission>`標簽的區別,Android系統在開發時就預先設計好了若干的權限,也就是Google官方文檔展示的權限清單,我們在開發應用時只需根據需求,申請我們的APP**所需的權限**即可,采用`<uses-permission>`標簽;只有在我們開發的APP類似Android系統(操作系統本質也是一個應用)提供了供其他應用程序調用的代碼或者數據,才需要使用`<permission>`聲明**自己的程序的權限**。
#### 關于危險權限的權限組
所有危險的Android權限都屬于權限組。無論保護級別如何,任何權限都可以屬于權限組。但是,如果權限是危險的,則權限組僅影響用戶體驗。
如果設備運行的是Android 6.0(API級別23)且應用程序`targetSdkVersion`為23或更高,則當您的應用請求危險權限時,以下系統行為適用:
* 如果應用程序當前在權限組中沒有任何權限,系統會向用戶顯示描述應用程序要訪問的權限組的權限請求對話框。該對話框未描述該組中的特定權限。例如,如果某個應用請求了該 `READ_CONTACTS`權限,系統對話框就會說該應用需要訪問該設備的聯系人。如果用戶授予批準,系統將為應用程序提供其請求的權限。
* 如果應用程序已在同一權限組中被授予其他危險權限,則系統會立即授予權限,而不與用戶進行任何交互。例如,如果某個應用程序先前已請求并已獲得該`READ_CONTACTS`權限,然后它會請求`WRITE_CONTACTS`,則系統會立即授予該權限,而不向用戶顯示權限對話框。
警告:未來版本的Android SDK可能會將特定權限從一個組移動到另一個組。因此,請勿將應用程序的邏輯基于這些權限組的結構。
例如,與Android 8.1(API級別27)`READ_CONTACTS`屬于同一權限組 `WRITE_CONTACTS`。如果您的應用請求`READ_CONTACTS` 權限,然后請求 `WRITE_CONTACTS`權限,請不要假設系統可以自動授予 `WRITE_CONTACTS`權限。
如果設備運行Android 5.1(API級別22)或更低版本,或者應用程序 `targetSdkVersion`為22或更低,系統會要求用戶在安裝時授予權限。系統再次告訴用戶應用程序需要哪些權限組,而不是單個權限。例如,當應用程序請求`READ_CONTACTS`安裝對話框時,列出“聯系人”組。用戶接受時,僅`READ_CONTACTS`授予應用程序權限。
注意:即使用戶已在同一組中授予了其他權限,您的應用仍需要明確請求其所需的每個權限。此外,將權限分組到組中可能會在將來的Android版本中發生變化。您的代碼不應具有依賴于同一組中的一組特定權限的邏輯。
#### 權限組列表
| 類型 |權限組字符串 | 權限 |
|-------------|--------------------------|------|
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CALENDAR](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#CALENDAR) 用于與用戶日歷相關的運行時權限。 | [READ_CALENDAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_CALENDAR)</br>[WRITE_CALENDAR](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_CALENDAR) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CALL_LOG](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#CALL_LOG) 用于與電話功能相關聯的權限。 | [READ_CALL_LOG](https://developer.android.google.cn/reference/android/Manifest.permission#READ_CALL_LOG)</br>[WRITE_CALL_LOG](https://developer.android.google.cn/reference/android/Manifest.permission#WRITE_CALL_LOG)</br>[PROCESS_OUTGOING_CALLS](https://developer.android.google.cn/reference/android/Manifest.permission#PROCESS_OUTGOING_CALLS) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CAMERA](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#CAMERA) 用于與訪問攝像頭或從設備捕獲圖像/視頻相關聯的權限。 | [CAMERA](https://developer.android.google.cn/reference/android/Manifest.permission.html#CAMERA) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [CONTACTS](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#CONTACTS) 用于與此設備上的聯系人和配置文件相關的運行時權限。 | [READ_CONTACTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_CONTACTS)</br>[WRITE_CONTACTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_CONTACTS)</br>[GET_ACCOUNTS](https://developer.android.google.cn/reference/android/Manifest.permission.html#GET_ACCOUNTS) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [LOCATION](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#LOCATION) 用于允許訪問設備位置的權限。 | [ACCESS_FINE_LOCATION](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION)</br>[ACCESS_COARSE_LOCATION](https://developer.android.google.cn/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [MICROPHONE](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#MICROPHONE) 用于與從設備訪問麥克風音頻相關聯的權限。 | [RECORD_AUDIO](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECORD_AUDIO) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [PHONE](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#PHONE) 用于與電話功能相關聯的權限。 | [READ_PHONE_STATE](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_PHONE_STATE)</br>[READ_PHONE_NUMBERS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_PHONE_NUMBERS)</br>[CALL_PHONE](https://developer.android.google.cn/reference/android/Manifest.permission.html#CALL_PHONE)</br>[ANSWER_PHONE_CALLS](https://developer.android.google.cn/reference/android/Manifest.permission.html#ANSWER_PHONE_CALLS)</br>[ADD_VOICEMAIL](https://developer.android.google.cn/reference/android/Manifest.permission.html#ADD_VOICEMAIL)</br>[USE_SIP](https://developer.android.google.cn/reference/android/Manifest.permission.html#USE_SIP) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SENSORS](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#SENSORS) 用于與訪問正文或環境傳感器相關聯的權限。 | [BODY_SENSORS](https://developer.android.google.cn/reference/android/Manifest.permission.html#BODY_SENSORS) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [SMS](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#SMS) 用于與用戶的SMS消息相關的運行時權限。 | [SEND_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#SEND_SMS)</br>[RECEIVE_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_SMS)</br>[READ_SMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_SMS)</br>[RECEIVE_WAP_PUSH](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_WAP_PUSH)</br>[RECEIVE_MMS](https://developer.android.google.cn/reference/android/Manifest.permission.html#RECEIVE_MMS) |
| [String](https://developer.android.google.cn/reference/java/lang/String.html) | [STORAGE](https://developer.android.google.cn/reference/android/Manifest.permission_group.html#STORAGE) 用于與共享外部存儲相關的運行時權限。 | [READ_EXTERNAL_STORAGE](https://developer.android.google.cn/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE)</br>[WRITE_EXTERNAL_STORAGE](https://developer.android.google.cn/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE) |
## 4 Google官方文檔鏈接
查閱更多,請查閱Google Android開發文檔。
* 權限介紹<https://developer.android.google.cn/guide/topics/permissions/overview>
* 權限清單<https://developer.android.google.cn/reference/android/Manifest.permission>
* 權限組<https://developer.android.google.cn/reference/android/Manifest.permission_group>