1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- Copyright (C) 2008 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17 <!-- This file is used to define the mappings between lower-level system 18 user and group IDs and the higher-level permission names managed 19 by the platform. 20 21 Be VERY careful when editing this file! Mistakes made here can open 22 big security holes. 23 --> 24 <permissions> 25 26 <!-- ================================================================== --> 27 <!-- ================================================================== --> 28 <!-- ================================================================== --> 29 30 <!-- The following tags are associating low-level group IDs with 31 permission names. By specifying such a mapping, you are saying 32 that any application process granted the given permission will 33 also be running with the given group ID attached to its process, 34 so it can perform any filesystem (read, write, execute) operations 35 allowed for that group. --> 36 37 <permission name="android.permission.BLUETOOTH_ADMIN" > 38 <group gid="net_bt_admin" /> 39 </permission> 40 41 <permission name="android.permission.BLUETOOTH" > 42 <group gid="net_bt" /> 43 </permission> 44 45 <permission name="android.permission.BLUETOOTH_STACK" > 46 <group gid="bluetooth" /> 47 <group gid="wakelock" /> 48 <group gid="uhid" /> 49 </permission> 50 51 <permission name="android.permission.NET_TUNNELING" > 52 <group gid="vpn" /> 53 </permission> 54 55 <permission name="android.permission.INTERNET" > 56 <group gid="inet" /> 57 </permission> 58 59 <permission name="android.permission.READ_LOGS" > 60 <group gid="log" /> 61 </permission> 62 63 <permission name="android.permission.WRITE_MEDIA_STORAGE" > 64 <group gid="media_rw" /> 65 <group gid="sdcard_rw" /> 66 </permission> 67 68 <permission name="android.permission.ACCESS_MTP" > 69 <group gid="mtp" /> 70 </permission> 71 72 <permission name="android.permission.NET_ADMIN" > 73 <group gid="net_admin" /> 74 </permission> 75 76 <!-- The group that /cache belongs to, linked to the permission 77 set on the applications that can access /cache --> 78 <permission name="android.permission.ACCESS_CACHE_FILESYSTEM" > 79 <group gid="cache" /> 80 </permission> 81 82 <!-- RW permissions to any system resources owned by group 'diag'. 83 This is for carrier and manufacture diagnostics tools that must be 84 installable from the framework. Be careful. --> 85 <permission name="android.permission.DIAGNOSTIC" > 86 <group gid="input" /> 87 <group gid="diag" /> 88 </permission> 89 90 <!-- Group that can read detailed network usage statistics --> 91 <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"> 92 <group gid="net_bw_stats" /> 93 </permission> 94 95 <!-- Group that can modify how network statistics are accounted --> 96 <permission name="android.permission.UPDATE_DEVICE_STATS"> 97 <group gid="net_bw_acct" /> 98 </permission> 99 100 <permission name="android.permission.LOOP_RADIO" > 101 <group gid="loop_radio" /> 102 </permission> 103 104 <!-- Hotword training apps sometimes need a GID to talk with low-level 105 hardware; give them audio for now until full HAL support is added. --> 106 <permission name="android.permission.MANAGE_VOICE_KEYPHRASES"> 107 <group gid="audio" /> 108 </permission> 109 110 <permission name="android.permission.ACCESS_BROADCAST_RADIO" > 111 <!-- /dev/fm is gid media, not audio --> 112 <group gid="media" /> 113 </permission> 114 115 <!-- These are permissions that were mapped to gids but we need 116 to keep them here until an upgrade from L to the current 117 version is to be supported. These permissions are built-in 118 and in L were not stored in packages.xml as a result if they 119 are not defined here while parsing packages.xml we would 120 ignore these permissions being granted to apps and not 121 propagate the granted state. From N we are storing the 122 built-in permissions in packages.xml as the saved storage 123 is negligible (one tag with the permission) compared to 124 the fragility as one can remove a built-in permission which 125 no longer needs to be mapped to gids and break grant propagation. --> 126 <permission name="android.permission.READ_EXTERNAL_STORAGE" /> 127 <permission name="android.permission.WRITE_EXTERNAL_STORAGE" /> 128 129 <!-- ================================================================== --> 130 <!-- ================================================================== --> 131 <!-- ================================================================== --> 132 133 <!-- The following tags are assigning high-level permissions to specific 134 user IDs. These are used to allow specific core system users to 135 perform the given operations with the higher-level framework. For 136 example, we give a wide variety of permissions to the shell user 137 since that is the user the adb shell runs under and developers and 138 others should have a fairly open environment in which to 139 interact with the system. --> 140 141 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" /> 142 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" /> 143 <assign-permission name="android.permission.WAKE_LOCK" uid="media" /> 144 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" /> 145 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" /> 146 <assign-permission name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE" uid="media" /> 147 148 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="audioserver" /> 149 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="audioserver" /> 150 <assign-permission name="android.permission.WAKE_LOCK" uid="audioserver" /> 151 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="audioserver" /> 152 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="audioserver" /> 153 154 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="cameraserver" /> 155 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="cameraserver" /> 156 <assign-permission name="android.permission.WAKE_LOCK" uid="cameraserver" /> 157 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="cameraserver" /> 158 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="cameraserver" /> 159 <assign-permission name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE" uid="cameraserver" /> 160 161 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" /> 162 163 <!-- This is a list of all the libraries available for application 164 code to link against. --> 165 166 <library name="android.test.mock" 167 file="/system/framework/android.test.mock.jar" /> 168 <library name="android.test.runner" 169 file="/system/framework/android.test.runner.jar" /> 170 <library name="javax.obex" 171 file="/system/framework/javax.obex.jar" /> 172 <library name="org.apache.http.legacy" 173 file="/system/framework/org.apache.http.legacy.jar" /> 174 175 <!-- These are the standard packages that are white-listed to always have internet 176 access while in power save mode, even if they aren't in the foreground. --> 177 <allow-in-power-save package="com.android.providers.downloads" /> 178 179 <!-- These are the standard packages that are white-listed to always have internet 180 access while in data mode, even if they aren't in the foreground. --> 181 <allow-in-data-usage-save package="com.android.providers.downloads" /> 182 183 <!-- This is a core platform component that needs to freely run in the background --> 184 <allow-in-power-save package="com.android.cellbroadcastreceiver" /> 185 <allow-in-power-save package="com.android.shell" /> 186 187 <!-- These are the packages that are white-listed to be able to run as system user --> 188 <system-user-whitelisted-app package="com.android.settings" /> 189 190 <!-- These are the packages that shouldn't run as system user --> 191 <system-user-blacklisted-app package="com.android.wallpaper.livepicker" /> 192 </permissions> 193