1allow hal_graphics_composer_default video_device:chr_file rw_file_perms;
2add_service(hal_graphics_composer_default, vendor_surfaceflinger_vndservice)
3hal_client_domain(hal_graphics_composer_default, hal_graphics_allocator)
4allow hal_graphics_composer_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
5vndbinder_use(hal_graphics_composer_default)
6
7userdebug_or_eng(`
8    allow hal_graphics_composer_default vendor_log_file:dir create_dir_perms;
9
10    # For HWC/libdisplaycolor to generate calibration file.
11    allow hal_graphics_composer_default persist_display_file:file create_file_perms;
12    allow hal_graphics_composer_default persist_display_file:dir rw_dir_perms;
13')
14
15# allow HWC/libdisplaycolor to read calibration data
16allow hal_graphics_composer_default mnt_vendor_file:dir search;
17allow hal_graphics_composer_default persist_file:dir search;
18allow hal_graphics_composer_default persist_display_file:file r_file_perms;
19allow hal_graphics_composer_default persist_display_file:dir search;
20
21# allow HWC to r/w backlight
22allow hal_graphics_composer_default sysfs_leds:dir r_dir_perms;
23allow hal_graphics_composer_default sysfs_leds:file rw_file_perms;
24
25# allow HWC to get vendor_persist_sys_default_prop
26get_prop(hal_graphics_composer_default, vendor_persist_sys_default_prop)
27
28# allow HWC to get/set vendor_display_prop
29set_prop(hal_graphics_composer_default, vendor_display_prop)
30
31# allow HWC to get device_config_surface_flinger_native_boot_prop for adpf flags
32get_prop(hal_graphics_composer_default, device_config_surface_flinger_native_boot_prop)
33
34# allow HWC to access vendor_displaycolor_service
35add_service(hal_graphics_composer_default, vendor_displaycolor_service)
36
37add_service(hal_graphics_composer_default, hal_pixel_display_service)
38binder_use(hal_graphics_composer_default)
39get_prop(hal_graphics_composer_default, boot_status_prop);
40
41# allow HWC to access vendor log file
42allow hal_graphics_composer_default vendor_log_file:file create_file_perms;
43
44# allow HWC to output to dumpstate via pipe fd
45allow hal_graphics_composer_default hal_dumpstate_default:fifo_file { append write };
46allow hal_graphics_composer_default hal_dumpstate_default:fd use;
47