1 # Mount debugfs on /sys/kernel/debug.
2 allow init debugfs:dir mounton;
5 allow init efs_file:dir mounton;
7 # Mount CPEFS on /cpefs
8 allow init sec_efs_file:dir mounton;
10 # /dev/block/mmcblk0p[0-9]
11 allow init emmcblk_device:blk_file rw_file_perms;
13 allow init block_device:lnk_file setattr;
14 allow init tmpfs:lnk_file create_file_perms;
16 # /sys/class/power_supply/battery and /sys/class/android_usb/android0
17 allow init sysfs_usb_supply:file { rw_file_perms setattr };
20 allow init sdcardd_exec:file r_file_perms;
22 # sysfs iio:device[0-9]
23 allow init sysfs:lnk_file setattr;
26 allow init sysfs_ion:file setattr;
29 allow init sysfs_android_usb:file setattr;
31 # read/chown mDNIE symlinks
32 allow init sysfs_mdnie:lnk_file { r_file_perms setattr };
33 allow init sysfs_mdnie:file rw_file_perms;
35 # read/chown camera firmware
36 allow init sysfs_camera:file { relabelto setattr };
37 allow init sysfs_camera:filesystem associate;
39 # WiFi firmware permissions
40 allow init sysfs_wifi:file setattr;
43 allow init sysfs_input:file { rw_file_perms setattr };
46 allow init sysfs_bluetooth_writable:file setattr;
49 allow init sysfs_gps:lnk_file read;
50 allow init sysfs_gps:file { rw_file_perms setattr };
51 allow init gps_data_file:fifo_file write;
52 allow init gps_data_file:file lock;
53 allow init gps_device:chr_file { open read write };
56 allow init sysfs_devices_system_cpu:file rw_file_perms;
59 allow init mif_device:chr_file rw_file_perms;
62 allow init sswap_device:blk_file write;
63 allow init sysfs_sswap:file { open write };
66 allow init sysfs_block:file rw_file_perms;
69 allow init sysfs_jack:file setattr;
71 unix_socket_connect(init, property, rild)
73 # Allow access to /proc/device-tree nodes
74 r_dir_file(init, proc_dt_firmware)
76 allow init sysfs_mmc:file { w_file_perms setattr };
77 allow init sysfs_net:file rw_file_perms;
78 allow init sysfs_graphics:file { rw_file_perms setattr };
79 allow init sysfs_light:file { rw_file_perms setattr };
80 allow init sysfs_light:lnk_file { rw_file_perms setattr };
81 allow init sysfs_mdnie:file setattr;
82 allow init sysfs_sec:file { rw_file_perms setattr };
83 allow init sysfs_sec:lnk_file read;
84 allow init sysfs_sensors:file { rw_file_perms setattr };
85 allow init sysfs_sensors:lnk_file read;
86 allow init sysfs_multipdp:file setattr;
89 allow init proc_reset_reason:file { rw_file_perms setattr };
90 allow init proc_vm:file rw_file_perms;
91 allow init proc_simslot_count:file rw_file_perms;
92 allow init proc_sec:file { rw_file_perms setattr };
95 allow init socket_device:sock_file { read write getattr setattr create unlink };