DEVICE_MANIFEST_FILE := device/generic/common/manifest.xml
-BOARD_SEPOLICY_DIRS += device/generic/common/sepolicy \
+BOARD_SEPOLICY_DIRS += device/generic/common/sepolicy/nonplat \
system/bt/vendor_libs/linux/sepolicy \
+
+BOARD_PLAT_PRIVATE_SEPOLICY_DIR := device/generic/common/sepolicy/plat_private
--- /dev/null
+# surfaceflinger
+/dev/dri(/.*)? u:object_r:gpu_device:s0
+/dev/tty0 u:object_r:gpu_device:s0
--- /dev/null
+allow surfaceflinger surfaceflinger_tmpfs:file { map };
+allow surfaceflinger tmpfs:lnk_file { read };
+allow surfaceflinger self:capability { sys_tty_config };
+
+allowxperm surfaceflinger gpu_device:chr_file ioctl {
+ 0x5605
+ 0x6409
+ 0x640a
+ 0x640b
+ 0x641e
+ 0x641f
+ 0x6457
+ 0x6458
+ 0x645b
+ 0x645e
+ 0x645f
+ 0x6461
+ 0x6462
+ 0x6469
+ 0x6466
+ 0x646c
+ 0x64a2
+ 0x64b0
+};
--- /dev/null
+allow zygote surfaceflinger:binder call;
+allow zygote surfaceflinger:unix_stream_socket { read };