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