• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1type sdcardd, domain;
2type sdcardd_exec, system_file_type, exec_type, file_type;
3
4allow sdcardd cgroup:dir create_dir_perms;
5allow sdcardd fuse_device:chr_file rw_file_perms;
6allow sdcardd rootfs:dir mounton;  # TODO: deprecated in M
7allow sdcardd sdcardfs:filesystem remount;
8allow sdcardd tmpfs:dir r_dir_perms;
9allow sdcardd mnt_media_rw_file:dir r_dir_perms;
10allow sdcardd storage_file:dir search;
11allow sdcardd storage_stub_file:dir { search mounton };
12allow sdcardd sdcard_type:filesystem { mount unmount };
13allow sdcardd self:global_capability_class_set { setuid setgid dac_override dac_read_search sys_admin sys_resource };
14
15allow sdcardd sdcard_type:dir create_dir_perms;
16allow sdcardd sdcard_type:file create_file_perms;
17
18allow sdcardd media_rw_data_file:dir create_dir_perms;
19allow sdcardd media_rw_data_file:file create_file_perms;
20
21# Read /data/system/packages.list.
22allow sdcardd system_data_file:file r_file_perms;
23allow sdcardd packages_list_file:file r_file_perms;
24
25# Read /data/misc/installd/layout_version
26allow sdcardd install_data_file:file r_file_perms;
27allow sdcardd install_data_file:dir search;
28
29# Allow stdin/out back to vold
30allow sdcardd vold:fd use;
31allow sdcardd vold:fifo_file { read write getattr };
32
33# Allow running on top of expanded storage
34allow sdcardd mnt_expand_file:dir search;
35
36# access /proc/filesystems
37allow sdcardd proc_filesystems:file r_file_perms;
38
39###
40### neverallow rules
41###
42
43# The sdcard daemon should no longer be started from init
44neverallow init sdcardd_exec:file execute;
45neverallow init sdcardd:process { transition dyntransition };
46