1# storaged daemon 2type storaged, domain, coredomain, mlstrustedsubject; 3type storaged_exec, system_file_type, exec_type, file_type; 4 5init_daemon_domain(storaged) 6 7# Read access to pseudo filesystems 8r_dir_file(storaged, domain) 9 10# Read /proc/uid_io/stats 11allow storaged proc_uid_io_stats:file r_file_perms; 12 13# Read /data/system/packages.list 14allow storaged system_data_file:file r_file_perms; 15allow storaged packages_list_file:file r_file_perms; 16 17# Store storaged proto file 18allow storaged storaged_data_file:dir rw_dir_perms; 19allow storaged storaged_data_file:file create_file_perms; 20 21userdebug_or_eng(` 22 # Read access to debugfs 23 allow storaged debugfs_mmc:dir search; 24 allow storaged debugfs_mmc:file r_file_perms; 25') 26 27# Needed to provide debug dump output via dumpsys pipes. 28allow storaged shell:fd use; 29allow storaged shell:fifo_file write; 30 31# Needed for GMScore to call dumpsys storaged 32allow storaged priv_app:fd use; 33allow storaged { privapp_data_file app_data_file }:file write; 34allow storaged permission_service:service_manager find; 35 36# Binder permissions 37add_service(storaged, storaged_service) 38 39binder_use(storaged) 40binder_call(storaged, system_server) 41 42hal_client_domain(storaged, hal_health) 43 44# Implements a dumpsys interface. 45allow storaged dumpstate:fd use; 46 47# use a subset of the package manager service 48allow storaged package_native_service:service_manager find; 49 50# Kernel does extra check on CAP_DAC_OVERRIDE for libbinder when storaged is 51# running as root. See b/35323867 #3. 52dontaudit storaged self:global_capability_class_set { dac_override dac_read_search }; 53 54# For collecting bugreports. 55allow storaged dumpstate:fifo_file write; 56 57### 58### neverallow 59### 60neverallow storaged domain:process ptrace; 61neverallow storaged self:capability_class_set *; 62