--- /dev/null
+allow adbd proc_last_kmsg:file { getattr read };
--- /dev/null
+allow bootanim device:chr_file { getattr ioctl };
--- /dev/null
+allow crash_dump hwservicemanager_prop:file { getattr open };
--- /dev/null
+type batch_io_device, dev_type;
+
+# sysfs types
+type sysfs_graphics, fs_type, sysfs_type;
/cpefs(/.*)? u:object_r:efs_file:s0
+/dev/mali0 u:object_r:gpu_device:s0
+/dev/umts_ipc0 u:object_r:radio_device:s0
+/dev/fimg2d u:object_r:video_device:s0
+
+# Sensors
+/dev/batch_io u:object_r:batch_io_device:s0
--- /dev/null
+# LED
+genfscon sysfs /devices/virtual/sec/led/led_blink u:object_r:sysfs_graphics:s0
--- /dev/null
+allow hal_audio_default efs_file:dir search;
+allow hal_audio_default efs_file:file { open read };
+allow hal_audio_default property_socket:sock_file write;
--- /dev/null
+allow hal_bluetooth_default efs_file:file { open read };
--- /dev/null
+allow hal_camera_default vndbinder_device:chr_file read;
--- /dev/null
+allow hal_gatekeeper_default efs_file:file { open read };
+allow hal_gatekeeper_default tee_device:chr_file { open read write };
--- /dev/null
+allow hal_graphics_composer_default self:netlink_kobject_uevent_socket { create read };
+allow hal_graphics_composer_default servicemanager:binder call;
+allow hal_graphics_composer_default sysfs:file read;
+allow hal_graphics_composer_default vendor_data_file:file append;
+allow hal_graphics_composer_default vndbinder_device:chr_file read;
+
+# /dev/fimg2d
+allow hal_graphics_composer_default video_device:chr_file ioctl;
--- /dev/null
+allow hal_health_default sysfs:file { getattr open read };
--- /dev/null
+allow hal_keymaster_default device:chr_file ioctl;
--- /dev/null
+allow hal_sensors_default efs_file:dir search;
+allow hal_sensors_default sysfs:file { read write getattr open };
+
+# sensor_device
+allow hal_sensors_default sensor_device:chr_file rw_file_perms;
--- /dev/null
+allow init device:chr_file ioctl;
+allow init rild:unix_stream_socket connectto;
+allow init self:netlink_kobject_uevent_socket { create setopt };
+allow init socket_device:sock_file create;
+allow init sysfs_devices_system_cpu:file write;
+allow init vendor_data_file:fifo_file write;
+allow init vendor_data_file:file append;
+allow init dnsproxyd_socket:sock_file write;
+allow init fwk_sensor_hwservice:hwservice_manager find;
+allow init hwservicemanager:binder call;
+allow init netd:unix_stream_socket connectto;
+allow init self:tcp_socket create;
+
+# LED
+allow init sysfs_graphics:file { open read write };
--- /dev/null
+allow installd device:file write;
--- /dev/null
+allow kernel device:dir write;
+allow kernel efs_file:file open;
--- /dev/null
+allow mediacodec sysfs:file { getattr open read };
--- /dev/null
+allow netd device:file write;
+allow netd self:capability sys_module;
+allow netd init:tcp_socket { read write };
--- /dev/null
+# /dev/mali0
+allow platform_app gpu_device:chr_file { ioctl read write };
--- /dev/null
+# /dev/mali0
+allow priv_app gpu_device:chr_file { ioctl read write };
--- /dev/null
+allow rild init:file read;
+allow rild proc_net:file write;
+allow rild vendor_data_file:file { getattr read write open };
+
+# /dev/umts_ipc0
+allow rild radio_device:chr_file ioctl;
--- /dev/null
+allow shell proc:file getattr;
--- /dev/null
+# /dev/mali0
+allow surfaceflinger gpu_device:chr_file { ioctl read write };
--- /dev/null
+allow system_app proc_pagetypeinfo:file { getattr open read };
+
+# /dev/mali0
+allow system_app gpu_device:chr_file { ioctl read write };
--- /dev/null
+# /sys/kernel/debug/mali/mem
+# allow system_server debugfs:dir { open read };
+# allow system_server debugfs:file { open read };
+
+# /dev/mali0
+allow system_server gpu_device:chr_file { ioctl read write };
+
+# memtrack HAL
+allow system_server debugfs:dir r_dir_perms;
+allow system_server debugfs_mali:dir r_dir_perms;
+allow system_server debugfs_mali:file r_file_perms;
--- /dev/null
+allow toolbox ram_device:blk_file { open read write };
\ No newline at end of file
--- /dev/null
+# /dev/mali0
+allow untrusted_app gpu_device:chr_file { ioctl open read write };
--- /dev/null
+# /dev/mali0
+allow untrusted_app_25 gpu_device:chr_file ioctl;
--- /dev/null
+# /dev/mali0
+allow untrusted_app_27 gpu_device:chr_file { ioctl read write };
--- /dev/null
+allow zygote device:file { open write };