blob: 44d71e269a957c27b862491617231e4c7beb9a2e [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001<?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
Chien-Yu Chen75cade02016-01-11 10:56:21 -08007
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08008 http://www.apache.org/licenses/LICENSE-2.0
Chien-Yu Chen75cade02016-01-11 10:56:21 -08009
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080010 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
Matthew Xiefca9d632012-10-04 12:25:28 -070045 <permission name="android.permission.BLUETOOTH_STACK" >
Ajay Panicker35cb6982016-09-20 11:18:14 -070046 <group gid="bluetooth" />
Pavlin Radoslavov70166252015-11-23 17:13:25 -080047 <group gid="wakelock" />
Siarhei Vishniakou9e089562017-05-08 15:42:14 -070048 <group gid="uhid" />
Matthew Xiefca9d632012-10-04 12:25:28 -070049 </permission>
50
fredc0f420372012-04-12 00:02:00 -070051 <permission name="android.permission.NET_TUNNELING" >
52 <group gid="vpn" />
53 </permission>
54
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080055 <permission name="android.permission.INTERNET" >
56 <group gid="inet" />
57 </permission>
58
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080059 <permission name="android.permission.READ_LOGS" >
60 <group gid="log" />
61 </permission>
62
Mike Lockwood1e23db42011-04-22 07:05:21 -070063 <permission name="android.permission.WRITE_MEDIA_STORAGE" >
Jeff Sharkey5517b732017-03-07 14:20:03 -070064 <group gid="media_rw" />
Mike Lockwood1e23db42011-04-22 07:05:21 -070065 </permission>
66
Mike Lockwood10bc1112011-01-10 08:24:08 -050067 <permission name="android.permission.ACCESS_MTP" >
68 <group gid="mtp" />
69 </permission>
70
Ramesh Sudini0e7b5a02011-03-28 09:18:31 -050071 <permission name="android.permission.NET_ADMIN" >
72 <group gid="net_admin" />
73 </permission>
74
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080075 <!-- The group that /cache belongs to, linked to the permission
76 set on the applications that can access /cache -->
77 <permission name="android.permission.ACCESS_CACHE_FILESYSTEM" >
78 <group gid="cache" />
79 </permission>
80
81 <!-- RW permissions to any system resources owned by group 'diag'.
82 This is for carrier and manufacture diagnostics tools that must be
83 installable from the framework. Be careful. -->
84 <permission name="android.permission.DIAGNOSTIC" >
85 <group gid="input" />
86 <group gid="diag" />
87 </permission>
88
Jeff Sharkey9e18fd12011-05-02 17:51:29 -070089 <!-- Group that can read detailed network usage statistics -->
90 <permission name="android.permission.READ_NETWORK_USAGE_HISTORY">
91 <group gid="net_bw_stats" />
92 </permission>
93
94 <!-- Group that can modify how network statistics are accounted -->
Jeff Sharkey9f09e6a72017-06-26 11:24:47 -060095 <permission name="android.permission.UPDATE_DEVICE_STATS">
Jeff Sharkey9e18fd12011-05-02 17:51:29 -070096 <group gid="net_bw_acct" />
97 </permission>
98
Doug Zongkerb616f0c2013-01-29 09:05:21 -080099 <permission name="android.permission.LOOP_RADIO" >
100 <group gid="loop_radio" />
101 </permission>
102
Jeff Sharkey270e1f42014-10-01 16:02:05 -0700103 <!-- Hotword training apps sometimes need a GID to talk with low-level
104 hardware; give them audio for now until full HAL support is added. -->
105 <permission name="android.permission.MANAGE_VOICE_KEYPHRASES">
106 <group gid="audio" />
107 </permission>
108
Tomasz Wasilczykdf776432017-07-21 14:07:09 -0700109 <permission name="android.permission.ACCESS_BROADCAST_RADIO" >
Andy Hunged0ea402015-10-30 14:11:46 -0700110 <!-- /dev/fm is gid media, not audio -->
Benson Huang981258e2014-09-23 10:57:40 +0800111 <group gid="media" />
112 </permission>
113
Jeff Sharkey4a539442018-01-05 17:09:52 -0700114 <permission name="android.permission.USE_RESERVED_DISK">
115 <group gid="reserved_disk" />
116 </permission>
117
Svet Ganove5313a82016-04-11 09:59:56 -0700118 <!-- These are permissions that were mapped to gids but we need
119 to keep them here until an upgrade from L to the current
120 version is to be supported. These permissions are built-in
121 and in L were not stored in packages.xml as a result if they
122 are not defined here while parsing packages.xml we would
123 ignore these permissions being granted to apps and not
124 propagate the granted state. From N we are storing the
125 built-in permissions in packages.xml as the saved storage
126 is negligible (one tag with the permission) compared to
127 the fragility as one can remove a built-in permission which
128 no longer needs to be mapped to gids and break grant propagation. -->
129 <permission name="android.permission.READ_EXTERNAL_STORAGE" />
130 <permission name="android.permission.WRITE_EXTERNAL_STORAGE" />
131
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800132 <!-- ================================================================== -->
133 <!-- ================================================================== -->
134 <!-- ================================================================== -->
135
136 <!-- The following tags are assigning high-level permissions to specific
137 user IDs. These are used to allow specific core system users to
138 perform the given operations with the higher-level framework. For
139 example, we give a wide variety of permissions to the shell user
140 since that is the user the adb shell runs under and developers and
141 others should have a fairly open environment in which to
142 interact with the system. -->
143
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800144 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="media" />
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800145 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="media" />
Eric Laurent6dbdc402011-07-22 09:04:31 -0700146 <assign-permission name="android.permission.WAKE_LOCK" uid="media" />
Marco Nelissend983ba52013-10-03 08:49:36 -0700147 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="media" />
Eino-Ville Talvala788717c2013-02-15 18:30:15 -0800148 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="media" />
Chong Zhang8e4f4b32015-12-02 12:18:52 -0800149 <assign-permission name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE" uid="media" />
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800150
Andy Hunged0ea402015-10-30 14:11:46 -0700151 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="audioserver" />
152 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="audioserver" />
153 <assign-permission name="android.permission.WAKE_LOCK" uid="audioserver" />
154 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="audioserver" />
155 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="audioserver" />
Svet Ganov14ab9672017-11-22 18:49:32 -0800156 <assign-permission name="android.permission.PACKAGE_USAGE_STATS" uid="audioserver" />
Andy Hunged0ea402015-10-30 14:11:46 -0700157
Chien-Yu Chen75cade02016-01-11 10:56:21 -0800158 <assign-permission name="android.permission.MODIFY_AUDIO_SETTINGS" uid="cameraserver" />
159 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="cameraserver" />
160 <assign-permission name="android.permission.WAKE_LOCK" uid="cameraserver" />
161 <assign-permission name="android.permission.UPDATE_DEVICE_STATS" uid="cameraserver" />
162 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="cameraserver" />
Emilian Peevbd885102017-02-01 16:07:31 +0000163 <assign-permission name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE" uid="cameraserver" />
Svet Ganov82f09bc2018-01-12 22:08:40 -0800164 <assign-permission name="android.permission.PACKAGE_USAGE_STATS" uid="cameraserver" />
Svetoslav Ganov2d20fb42018-02-08 15:52:10 -0800165 <assign-permission name="android.permission.WATCH_APPOPS" uid="cameraserver" />
Chien-Yu Chen75cade02016-01-11 10:56:21 -0800166
Mathias Agopian627e7b52009-05-21 19:21:59 -0700167 <assign-permission name="android.permission.ACCESS_SURFACE_FLINGER" uid="graphics" />
168
Yi Jin4bab3a12018-01-10 16:50:59 -0800169 <assign-permission name="android.permission.DUMP" uid="incidentd" />
170 <assign-permission name="android.permission.PACKAGE_USAGE_STATS" uid="incidentd" />
Yi Jinfae17732018-06-06 18:08:01 -0700171 <assign-permission name="android.permission.INTERACT_ACROSS_USERS" uid="incidentd" />
Joe Onoratoe21ab7e2018-12-18 15:00:25 -0800172 <assign-permission name="android.permission.REQUEST_INCIDENT_REPORT_APPROVAL" uid="incidentd" />
Yi Jin4bab3a12018-01-10 16:50:59 -0800173
Robert Quattlebaumdf41b3e2017-08-14 18:34:03 -0700174 <assign-permission name="android.permission.ACCESS_LOWPAN_STATE" uid="lowpan" />
175 <assign-permission name="android.permission.MANAGE_LOWPAN_INTERFACES" uid="lowpan" />
176
Bookatz75ee6042018-11-09 12:27:37 -0800177 <assign-permission name="android.permission.BATTERY_STATS" uid="statsd" />
Yi Jin974e56f2018-01-22 10:48:04 -0800178 <assign-permission name="android.permission.DUMP" uid="statsd" />
179 <assign-permission name="android.permission.PACKAGE_USAGE_STATS" uid="statsd" />
Yao Chen0f217102018-01-09 10:33:15 -0800180 <assign-permission name="android.permission.STATSCOMPANION" uid="statsd" />
Jeff Sharkey6b649252018-04-16 09:50:22 -0600181 <assign-permission name="android.permission.UPDATE_APP_OPS_STATS" uid="statsd" />
Yao Chen0f217102018-01-09 10:33:15 -0800182
Zimuzocc2932f2018-10-29 16:04:41 +0000183 <split-permission name="android.permission.WRITE_EXTERNAL_STORAGE">
184 <new-permission name="android.permission.READ_EXTERNAL_STORAGE" />
185 </split-permission>
186 <split-permission name="android.permission.READ_CONTACTS"
187 targetSdk="16">
188 <new-permission name="android.permission.READ_CALL_LOG" />
189 </split-permission>
190 <split-permission name="android.permission.WRITE_CONTACTS"
191 targetSdk="16">
192 <new-permission name="android.permission.WRITE_CALL_LOG" />
193 </split-permission>
Zimuzo2efeecc2018-11-02 17:47:13 +0000194 <!-- STOPSHIP(b/118882117): change targetSdk to Q when SDK version finalised -->
Zimuzocc2932f2018-10-29 16:04:41 +0000195 <split-permission name="android.permission.ACCESS_FINE_LOCATION"
Zimuzo2efeecc2018-11-02 17:47:13 +0000196 targetSdk="10000">
Zimuzocc2932f2018-10-29 16:04:41 +0000197 <new-permission name="android.permission.ACCESS_BACKGROUND_LOCATION" />
198 </split-permission>
Zimuzo2efeecc2018-11-02 17:47:13 +0000199 <!-- STOPSHIP(b/118882117): change targetSdk to Q when SDK version finalised -->
Zimuzocc2932f2018-10-29 16:04:41 +0000200 <split-permission name="android.permission.ACCESS_COARSE_LOCATION"
Zimuzo2efeecc2018-11-02 17:47:13 +0000201 targetSdk="10000">
Zimuzocc2932f2018-10-29 16:04:41 +0000202 <new-permission name="android.permission.ACCESS_BACKGROUND_LOCATION" />
203 </split-permission>
204
Jeff Sharkey9787a9452018-11-18 17:53:02 -0700205 <!-- Apps holding either the legacy READ or WRITE permissions will inherit
206 the ability to <em>read</em> new typed permissions in the Q release; they
207 won't gain the ability to <em>write</em> that content. -->
208 <!-- STOPSHIP(b/112545973): change targetSdk to Q when SDK version finalised -->
209 <split-permission name="android.permission.READ_EXTERNAL_STORAGE"
210 targetSdk="10000">
211 <new-permission name="android.permission.READ_MEDIA_AUDIO" />
212 <new-permission name="android.permission.READ_MEDIA_VIDEO" />
213 <new-permission name="android.permission.READ_MEDIA_IMAGES" />
214 </split-permission>
215 <!-- STOPSHIP(b/112545973): change targetSdk to Q when SDK version finalised -->
216 <split-permission name="android.permission.WRITE_EXTERNAL_STORAGE"
217 targetSdk="10000">
218 <new-permission name="android.permission.READ_MEDIA_AUDIO" />
219 <new-permission name="android.permission.READ_MEDIA_VIDEO" />
220 <new-permission name="android.permission.READ_MEDIA_IMAGES" />
221 </split-permission>
222
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800223 <!-- This is a list of all the libraries available for application
224 code to link against. -->
225
Paul Duffina3b69212018-01-25 09:58:32 +0000226 <library name="android.test.base"
Sundong Ahnb7540bf2018-11-08 19:06:45 +0900227 file="/system/framework/android.test.base.jar" />
Paul Duffin6ed04552017-07-07 12:12:06 +0100228 <library name="android.test.mock"
Sundong Ahnb7540bf2018-11-08 19:06:45 +0900229 file="/system/framework/android.test.mock.jar"
Ben Lin71c16d72018-12-06 18:34:51 -0800230 dependency="android.test.base" />
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800231 <library name="android.test.runner"
Sundong Ahnb7540bf2018-11-08 19:06:45 +0900232 file="/system/framework/android.test.runner.jar"
Ben Lin71c16d72018-12-06 18:34:51 -0800233 dependency="android.test.base:android.test.mock" />
Narayan Kamath1ed78fb2015-01-20 13:44:23 +0000234
Steven Morelandf36ad622018-09-04 13:20:22 -0700235 <!-- In BOOT_JARS historically, and now added to legacy applications. -->
236 <library name="android.hidl.base-V1.0-java"
237 file="/system/framework/android.hidl.base-V1.0-java.jar" />
238 <library name="android.hidl.manager-V1.0-java"
Ben Lin71c16d72018-12-06 18:34:51 -0800239 file="/system/framework/android.hidl.manager-V1.0-java.jar"
240 dependency="android.hidl.base-V1.0-java" />
Steven Morelandf36ad622018-09-04 13:20:22 -0700241
Dianne Hackbornbe7c50e2014-06-30 14:43:28 -0700242 <!-- These are the standard packages that are white-listed to always have internet
243 access while in power save mode, even if they aren't in the foreground. -->
Felipe Leme05515ae2016-05-31 17:50:39 -0700244 <allow-in-power-save package="com.android.providers.downloads" />
Dianne Hackbornbe7c50e2014-06-30 14:43:28 -0700245
Felipe Leme1d0fbed2016-04-27 17:11:37 -0700246 <!-- These are the standard packages that are white-listed to always have internet
247 access while in data mode, even if they aren't in the foreground. -->
248 <allow-in-data-usage-save package="com.android.providers.downloads" />
249
Dianne Hackborn3f13c542017-02-09 11:05:11 -0800250 <!-- This is a core platform component that needs to freely run in the background -->
251 <allow-in-power-save package="com.android.cellbroadcastreceiver" />
Christopher Tate32830792017-02-10 11:23:43 -0800252 <allow-in-power-save package="com.android.shell" />
Dianne Hackborn3f13c542017-02-09 11:05:11 -0800253
Makoto Onukifb263322018-01-17 13:23:50 -0800254 <!-- Whitelist system providers -->
255 <allow-in-power-save-except-idle package="com.android.providers.calendar" />
256 <allow-in-power-save-except-idle package="com.android.providers.contacts" />
257
Luis Hector Chavezd2f1ca82018-08-15 07:17:03 -0700258 <!-- The PAC proxy process must have network access, otherwise no app will
259 be able to connect to the internet when such a proxy is in use, since
260 all outgoing connections originate from this app. -->
261 <allow-in-power-save-except-idle package="com.android.proxyhandler" />
262
Xiaohui Chen9c990c12015-11-23 12:03:08 -0800263 <!-- These are the packages that are white-listed to be able to run as system user -->
264 <system-user-whitelisted-app package="com.android.settings" />
265
Fyodor Kupolov7db5af12015-07-31 16:50:27 -0700266 <!-- These are the packages that shouldn't run as system user -->
267 <system-user-blacklisted-app package="com.android.wallpaper.livepicker" />
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800268</permissions>