1# HwBinder IPC from client to server, and callbacks 2binder_call(hal_neuralnetworks_client, hal_neuralnetworks_server) 3binder_call(hal_neuralnetworks_server, hal_neuralnetworks_client) 4 5hal_attribute_hwservice(hal_neuralnetworks, hal_neuralnetworks_hwservice) 6allow hal_neuralnetworks hidl_memory_hwservice:hwservice_manager find; 7allow hal_neuralnetworks hal_allocator:fd use; 8 9# Allow NN HAL service to use a client-provided fd residing in /data/data/. 10allow hal_neuralnetworks_server app_data_file:file { read write getattr map }; 11allow hal_neuralnetworks_server privapp_data_file:file { read write getattr map }; 12 13# Allow NN HAL service to use a client-provided fd residing in /data/local/tmp/. 14allow hal_neuralnetworks_server shell_data_file:file { read write getattr map }; 15 16# Allow NN HAL client to check the ro.nnapi.extensions.deny_on_product 17# property to determine whether to deny NNAPI extensions use for apps 18# on product partition (apps in GSI are not allowed to use NNAPI extensions). 19get_prop(hal_neuralnetworks_client, nnapi_ext_deny_product_prop); 20# This property is only expected to be found in /product/build.prop, 21# allow to be set only by init. 22neverallow { domain -init } nnapi_ext_deny_product_prop:property_service set; 23