diff --git a/chre/sepolicy/hal_contexthub_default.te b/chre/sepolicy/hal_contexthub_default.te index 542d383..87e3a42 100644 --- a/chre/sepolicy/hal_contexthub_default.te +++ b/chre/sepolicy/hal_contexthub_default.te @@ -32,3 +32,6 @@ wakelock_use(hal_contexthub_default) # Allow context hub HAL to block suspend, which is required to use EPOLLWAKEUP allow hal_contexthub_default self:global_capability2_class_set block_suspend; + +# Allow binder calls with clients +binder_call(hal_contexthub_default, hal_sensors_default) diff --git a/gyotaku_app/dump/gyotaku_app.te b/gyotaku_app/dump/gyotaku_app.te new file mode 100644 index 0000000..6816080 --- /dev/null +++ b/gyotaku_app/dump/gyotaku_app.te @@ -0,0 +1,5 @@ +userdebug_or_eng(` + # For access /data/vendor/gyotaku folder + allow gyotaku_app gyotaku_vendor_data_file:dir create_dir_perms; + allow gyotaku_app gyotaku_vendor_data_file:file create_file_perms; +') diff --git a/sensors/sepolicy/hal_sensors_default.te b/sensors/sepolicy/hal_sensors_default.te index 85a8262..846b016 100644 --- a/sensors/sepolicy/hal_sensors_default.te +++ b/sensors/sepolicy/hal_sensors_default.te @@ -63,6 +63,11 @@ unix_socket_connect(hal_sensors_default, chre, chre) ## TODO(b/248615564): Remove above rule after CHRE multiclient HAL is launched. unix_socket_connect(hal_sensors_default, chre, hal_contexthub_default) +# Allow access to CHRE multiclient HAL. +get_prop(hal_sensors_default, vendor_chre_hal_prop) +binder_call(hal_sensors_default, hal_contexthub_default) +allow hal_sensors_default hal_contexthub_service:service_manager find; + # Allow access to the power supply files for MagCC. r_dir_file(hal_sensors_default, sysfs_batteryinfo)