61670b8623
Test: adb shell dumpsys storaged Bug: 33086174 Bug: 34198239 Change-Id: I85d6bd05192a205662f69466d7d6208e8b834eff
39 lines
952 B
Text
39 lines
952 B
Text
# storaged daemon
|
|
type storaged, domain, mlstrustedsubject;
|
|
type storaged_exec, exec_type, file_type;
|
|
|
|
init_daemon_domain(storaged)
|
|
|
|
# Read access to pseudo filesystems
|
|
r_dir_file(storaged, sysfs_type)
|
|
r_dir_file(storaged, proc_net)
|
|
r_dir_file(storaged, domain)
|
|
|
|
# Read /proc/uid_io/stats
|
|
allow storaged proc_uid_io_stats:file r_file_perms;
|
|
|
|
# Read /data/system/packages.list
|
|
allow storaged system_data_file:file r_file_perms;
|
|
|
|
allow storaged self:capability { setgid setuid sys_nice sys_ptrace };
|
|
|
|
userdebug_or_eng(`
|
|
# Read access to debugfs
|
|
allow storaged debugfs_mmc:dir search;
|
|
allow storaged debugfs_mmc:file r_file_perms;
|
|
')
|
|
|
|
# Binder permissions
|
|
add_service(storaged, storaged_service)
|
|
|
|
binder_use(storaged)
|
|
binder_call(storaged, system_server)
|
|
|
|
# use batteryproperties service
|
|
allow storaged batteryproperties_service:service_manager find;
|
|
binder_call(storaged, healthd)
|
|
|
|
###
|
|
### neverallow
|
|
###
|
|
neverallow storaged domain:process ptrace;
|