Alex Klyubin | b5853c3 | 2017-01-05 17:18:32 -0800 | [diff] [blame] | 1 | ### |
| 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 | |
| 7 | typeattribute system_app domain_deprecated; |
| 8 | |
dcashman | 3e8dbf0 | 2016-12-08 11:23:34 -0800 | [diff] [blame] | 9 | app_domain(system_app) |
Alex Klyubin | b5853c3 | 2017-01-05 17:18:32 -0800 | [diff] [blame] | 10 | net_domain(system_app) |
| 11 | binder_service(system_app) |
| 12 | |
| 13 | # Read and write /data/data subdirectory. |
| 14 | allow system_app system_app_data_file:dir create_dir_perms; |
| 15 | allow system_app system_app_data_file:{ file lnk_file } create_file_perms; |
| 16 | |
| 17 | # Read and write to /data/misc/user. |
| 18 | allow system_app misc_user_data_file:dir create_dir_perms; |
| 19 | allow system_app misc_user_data_file:file create_file_perms; |
| 20 | |
| 21 | # Access to vold-mounted storage for measuring free space |
| 22 | allow system_app mnt_media_rw_file:dir search; |
| 23 | |
| 24 | # Read wallpaper file. |
| 25 | allow system_app wallpaper_file:file r_file_perms; |
| 26 | |
| 27 | # Read icon file. |
| 28 | allow system_app icon_file:file r_file_perms; |
| 29 | |
| 30 | # Write to properties |
| 31 | set_prop(system_app, bluetooth_prop) |
| 32 | set_prop(system_app, debug_prop) |
Steven Moreland | cd597cd | 2017-01-13 11:37:38 -0800 | [diff] [blame] | 33 | set_prop(system_app, hal_binderization_prop) |
Alex Klyubin | b5853c3 | 2017-01-05 17:18:32 -0800 | [diff] [blame] | 34 | set_prop(system_app, system_prop) |
| 35 | set_prop(system_app, logd_prop) |
| 36 | set_prop(system_app, net_radio_prop) |
| 37 | set_prop(system_app, system_radio_prop) |
| 38 | set_prop(system_app, log_tag_prop) |
| 39 | userdebug_or_eng(`set_prop(system_app, logpersistd_logging_prop)') |
| 40 | auditallow system_app net_radio_prop:property_service set; |
| 41 | auditallow system_app system_radio_prop:property_service set; |
| 42 | |
| 43 | # ctl interface |
| 44 | set_prop(system_app, ctl_default_prop) |
| 45 | set_prop(system_app, ctl_bugreport_prop) |
| 46 | |
| 47 | # Create /data/anr/traces.txt. |
| 48 | allow system_app anr_data_file:dir ra_dir_perms; |
| 49 | allow system_app anr_data_file:file create_file_perms; |
| 50 | |
| 51 | # Settings need to access app name and icon from asec |
| 52 | allow system_app asec_apk_file:file r_file_perms; |
| 53 | |
Joe Onorato | 41f93db | 2016-11-20 23:23:04 -0800 | [diff] [blame] | 54 | # Allow system apps to interact with incidentd |
| 55 | binder_call(system_app, incidentd) |
| 56 | |
Alex Klyubin | b5853c3 | 2017-01-05 17:18:32 -0800 | [diff] [blame] | 57 | allow system_app servicemanager:service_manager list; |
| 58 | # TODO: scope this down? Too broad? |
| 59 | allow system_app { service_manager_type -netd_service -dumpstate_service -installd_service }:service_manager find; |
| 60 | |
| 61 | allow system_app keystore:keystore_key { |
| 62 | get_state |
| 63 | get |
| 64 | insert |
| 65 | delete |
| 66 | exist |
| 67 | list |
| 68 | reset |
| 69 | password |
| 70 | lock |
| 71 | unlock |
| 72 | is_empty |
| 73 | sign |
| 74 | verify |
| 75 | grant |
| 76 | duplicate |
| 77 | clear_uid |
| 78 | user_changed |
| 79 | }; |
| 80 | |
| 81 | # /sys access |
| 82 | r_dir_file(system_app, sysfs_type) |
| 83 | |
| 84 | control_logd(system_app) |
Mark Salyzyn | d33a9a1 | 2016-11-07 15:11:39 -0800 | [diff] [blame] | 85 | read_runtime_log_tags(system_app) |