xref: /aosp_15_r20/system/sepolicy/prebuilts/api/34.0/public/hal_telephony.te (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1# HwBinder IPC from client to server, and callbacks
2binder_call(hal_telephony_client, hal_telephony_server)
3binder_call(hal_telephony_server, hal_telephony_client)
4
5hal_attribute_hwservice(hal_telephony, hal_telephony_hwservice)
6hal_attribute_service(hal_telephony, hal_radio_service)
7
8allowxperm hal_telephony_server self:udp_socket ioctl priv_sock_ioctls;
9
10allow hal_telephony_server self:netlink_route_socket nlmsg_write;
11allow hal_telephony_server kernel:system module_request;
12allow hal_telephony_server self:global_capability_class_set { setpcap setgid setuid net_admin net_raw };
13allow hal_telephony_server cgroup:dir create_dir_perms;
14allow hal_telephony_server cgroup:{ file lnk_file } r_file_perms;
15allow hal_telephony_server cgroup_v2:dir create_dir_perms;
16allow hal_telephony_server cgroup_v2:{ file lnk_file } r_file_perms;
17allow hal_telephony_server radio_device:chr_file rw_file_perms;
18allow hal_telephony_server radio_device:blk_file r_file_perms;
19allow hal_telephony_server efs_file:dir create_dir_perms;
20allow hal_telephony_server efs_file:file create_file_perms;
21allow hal_telephony_server vendor_shell_exec:file rx_file_perms;
22allow hal_telephony_server bluetooth_efs_file:file r_file_perms;
23allow hal_telephony_server bluetooth_efs_file:dir r_dir_perms;
24
25# property service
26get_prop(hal_telephony_server, telephony_config_prop)
27set_prop(hal_telephony_server, radio_control_prop)
28set_prop(hal_telephony_server, radio_prop)
29set_prop(hal_telephony_server, telephony_status_prop)
30
31allow hal_telephony_server tty_device:chr_file rw_file_perms;
32
33# Allow hal_telephony_server to create and use netlink sockets.
34allow hal_telephony_server self:netlink_socket create_socket_perms_no_ioctl;
35allow hal_telephony_server self:netlink_generic_socket create_socket_perms_no_ioctl;
36allow hal_telephony_server self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
37
38# Access to wake locks
39wakelock_use(hal_telephony_server)
40
41r_dir_file(hal_telephony_server, proc_net_type)
42r_dir_file(hal_telephony_server, sysfs_type)
43
44# granting the ioctl permission for hal_telephony_server should be device specific
45allow hal_telephony_server self:socket create_socket_perms_no_ioctl;
46
47# Allow AIDL HAL shim to call HIDL HAL implementation
48binder_call(hal_telephony_server, hal_telephony_server)
49