diff --git a/public/attributes b/public/attributes index aafafa6c87df96dbe68c2d6fc2ca9064f42c4b1b..c14365cf4fc5001a539a23dde70d047bc0813767 100644 --- a/public/attributes +++ b/public/attributes @@ -125,6 +125,7 @@ attribute hal_light; attribute hal_memtrack; attribute hal_nfc; attribute hal_power; +attribute hal_telephony; attribute hal_thermal; attribute hal_vibrator; attribute hal_vr; diff --git a/public/bluetooth.te b/public/bluetooth.te index 75a11f43ea02a271fe10f5e195b8094370412f4a..9f21676a76e2a7e0fe0c5572b600625e22faf917 100644 --- a/public/bluetooth.te +++ b/public/bluetooth.te @@ -58,6 +58,10 @@ unix_socket_connect(bluetooth, sap_uim, rild) # /data/data/com.android.shell/files/bugreports/bugreport-*. allow bluetooth shell_data_file:file read; +# Perform HwBinder IPC. +hwbinder_use(bluetooth) +binder_call(bluetooth, hal_telephony) + ### ### Neverallow rules ### diff --git a/public/hal_telephony.te b/public/hal_telephony.te new file mode 100644 index 0000000000000000000000000000000000000000..6f3a38fa24b1283460ae08f65a5e9a32dc0764b5 --- /dev/null +++ b/public/hal_telephony.te @@ -0,0 +1,5 @@ +# Perform HwBinder IPC. +hwbinder_use(hal_telephony) +binder_call(hal_telephony, radio) +binder_call(hal_telephony, bluetooth) + diff --git a/public/radio.te b/public/radio.te index d46fc89694e27a031c47924badf6b1897975749b..f510a96f9ea7a3ffa922f6de2faf9b435ee9020f 100644 --- a/public/radio.te +++ b/public/radio.te @@ -37,6 +37,7 @@ allow radio surfaceflinger_service:service_manager find; allow radio app_api_service:service_manager find; allow radio system_api_service:service_manager find; -# Allow access to hwservicemanager for binderized hal -binder_call(radio, hwservicemanager) -binder_call(radio, rild) +# Perform HwBinder IPC. +hwbinder_use(radio) +binder_call(radio, hal_telephony) + diff --git a/public/rild.te b/public/rild.te index 687118232cb071bb4877c8f4b7e970e0509e1b81..3981676016fbdb40317caf04670a1071123442d3 100644 --- a/public/rild.te +++ b/public/rild.te @@ -1,5 +1,5 @@ # rild - radio interface layer daemon -type rild, domain, domain_deprecated; +type rild, domain, domain_deprecated, hal_telephony; type rild_exec, exec_type, file_type; net_domain(rild) @@ -51,6 +51,3 @@ r_dir_file(rild, system_file) # granting the ioctl permission for rild should be device specific allow rild self:socket create_socket_perms_no_ioctl; -# Allow access to hwservicemanager for binderized hal -binder_call(rild, hwservicemanager) -binder_call(rild, radio)