blob: c6fcf8e12cda6c7a7984b456c7e85a1b450eee90 [file] [log] [blame]
Alex Klyubinb5853c32017-01-05 17:18:32 -08001###
2### Apps that run with the system UID, e.g. com.android.system.ui,
3### com.android.settings. These are not as privileged as the system
4### server.
5###
6
Alex Klyubinf5446eb2017-03-23 14:27:32 -07007typeattribute system_app coredomain;
Alex Klyubinb5853c32017-01-05 17:18:32 -08008
dcashman3e8dbf02016-12-08 11:23:34 -08009app_domain(system_app)
Alex Klyubinb5853c32017-01-05 17:18:32 -080010net_domain(system_app)
11binder_service(system_app)
12
Jeff Vander Stoepa12aad42017-07-10 20:39:50 -070013# android.ui and system.ui
14allow system_app rootfs:dir getattr;
15
Alex Klyubinb5853c32017-01-05 17:18:32 -080016# Read and write /data/data subdirectory.
17allow system_app system_app_data_file:dir create_dir_perms;
18allow system_app system_app_data_file:{ file lnk_file } create_file_perms;
19
20# Read and write to /data/misc/user.
21allow system_app misc_user_data_file:dir create_dir_perms;
22allow system_app misc_user_data_file:file create_file_perms;
23
24# Access to vold-mounted storage for measuring free space
25allow system_app mnt_media_rw_file:dir search;
26
27# Read wallpaper file.
28allow system_app wallpaper_file:file r_file_perms;
29
30# Read icon file.
31allow system_app icon_file:file r_file_perms;
32
33# Write to properties
34set_prop(system_app, bluetooth_prop)
35set_prop(system_app, debug_prop)
36set_prop(system_app, system_prop)
37set_prop(system_app, logd_prop)
38set_prop(system_app, net_radio_prop)
39set_prop(system_app, system_radio_prop)
40set_prop(system_app, log_tag_prop)
41userdebug_or_eng(`set_prop(system_app, logpersistd_logging_prop)')
42auditallow system_app net_radio_prop:property_service set;
43auditallow system_app system_radio_prop:property_service set;
44
45# ctl interface
46set_prop(system_app, ctl_default_prop)
47set_prop(system_app, ctl_bugreport_prop)
48
49# Create /data/anr/traces.txt.
50allow system_app anr_data_file:dir ra_dir_perms;
51allow system_app anr_data_file:file create_file_perms;
52
53# Settings need to access app name and icon from asec
54allow system_app asec_apk_file:file r_file_perms;
55
Joe Onorato41f93db2016-11-20 23:23:04 -080056# Allow system apps to interact with incidentd
57binder_call(system_app, incidentd)
58
Alex Klyubinb5853c32017-01-05 17:18:32 -080059allow system_app servicemanager:service_manager list;
60# TODO: scope this down? Too broad?
Daniel Nicoara6907e392017-03-14 16:26:17 -040061allow system_app { service_manager_type -netd_service -dumpstate_service -installd_service -virtual_touchpad_service -vr_hwc_service }:service_manager find;
Alex Klyubinb5853c32017-01-05 17:18:32 -080062
63allow system_app keystore:keystore_key {
64 get_state
65 get
66 insert
67 delete
68 exist
69 list
70 reset
71 password
72 lock
73 unlock
74 is_empty
75 sign
76 verify
77 grant
78 duplicate
79 clear_uid
80 user_changed
81};
82
83# /sys access
84r_dir_file(system_app, sysfs_type)
85
Jeff Vander Stoepc15d54e2017-07-25 16:43:49 -070086# settings app reads /proc/version and /proc/pagetypeinfo
87allow system_app proc:file r_file_perms;
88
Alex Klyubinb5853c32017-01-05 17:18:32 -080089control_logd(system_app)
Mark Salyzynd33a9a12016-11-07 15:11:39 -080090read_runtime_log_tags(system_app)
Nick Kralevich45766d42017-04-26 11:40:48 -070091
92###
93### Neverallow rules
94###
95
96# app domains which access /dev/fuse should not run as system_app
97neverallow system_app fuse_device:chr_file *;