blob: ccd8b5bb534718de790d8001807d35641c6ad01a [file] [log] [blame]
Bookatz04d7ae52019-08-05 14:07:12 -07001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2019 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<!--
18This XML file declares which system packages should be initially installed for new users based on
19the type of user. All system packages on the device should ideally have an entry in an xml file
20(keys by its manifest name).
21
22Main user-types (every user will be at least one of these types) are:
23 SYSTEM (user 0)
24 FULL (any non-profile human user)
25 PROFILE (profile human user)
26
27Additional optional types are: GUEST, RESTRICTED, MANAGED_PROFILE, EPHEMERAL, DEMO
28
29The meaning of each of these user types is delineated by flags in
30frameworks/base/core/java/android/content/pm/UserInfo.java.
31See frameworks/base/services/core/java/com/android/server/pm/UserSystemPackageInstaller#getFlagsFromUserTypes
32
33The following three examples should cover most normal cases:
34
351. For a system package to be pre-installed only in user 0:
36
37 <install-in-user-type package="com.android.example">
38 <install-in user-type="SYSTEM">
39 </install-in-user-type>
40
41
422. For a system package to be pre-installed on all human users (e.g. a web browser), i.e. to be
43installed on any user of type type FULL or PROFILE (since this covers all human users):
44
45 <install-in-user-type package="com.android.example">
46 <install-in user-type="FULL">
47 <install-in user-type="PROFILE">
48 </install-in-user-type>
49
50
513. For a system package to be pre-installed on all human users except for profile users (e.g. a
52wallpaper app, since profiles cannot display wallpaper):
53
54 <install-in-user-type package="com.android.example">
55 <install-in user-type="FULL">
56 </install-in-user-type>
57
58
59Some system packages truly are required to be on all users, regardless of type, in which case use:
60 <install-in-user-type package="com.android.example">
61 <install-in user-type="SYSTEM">
62 <install-in user-type="FULL">
63 <install-in user-type="PROFILE">
64 </install-in-user-type>
65
66More fine-grained options are also available (see below). Additionally, packages can blacklist
67user types. Blacklists override any whitelisting (in any file).
68E.g.
69 <install-in-user-type package="com.android.example">
70 <install-in user-type="FULL" />
71 <do-not-install-in user-type="GUEST" />
72 </install-in-user-type>
73
74If a user is of type FULL and GUEST, this package will NOT be installed, because the
75'do-not-install-in' takes precedence over 'install-in'.
76
77The way that a device treats system packages that do not have any entry (for any user type) at all
78is determined by the config resource value config_userTypePackageWhitelistMode.
79See frameworks/base/core/res/res/values/config.xml#config_userTypePackageWhitelistMode.
80
81Changes to the whitelist during system updates can result in installing new system packages
82to pre-existing users, but cannot uninstall system packages from pre-existing users.
83-->
84<config>
85 <install-in-user-type package="com.android.providers.settings">
86 <install-in user-type="SYSTEM" />
87 <install-in user-type="FULL" />
88 <install-in user-type="PROFILE" />
89 </install-in-user-type>
90</config>