Yakun Xu | 07429e3 | 2023-06-02 03:36:01 +0000 | [diff] [blame] | 1 | # |
| 2 | # ot_daemon is the native Thread network stack on the host (Android) side. |
| 3 | # Refer to https://www.threadgroup.org for Thread network knowledge. |
| 4 | # |
| 5 | |
| 6 | # ot_daemon |
| 7 | type ot_daemon, domain, coredomain; |
| 8 | type ot_daemon_exec, exec_type, file_type, system_file_type; |
| 9 | |
| 10 | # Allow init ot_daemon |
| 11 | init_daemon_domain(ot_daemon) |
| 12 | # Allow the ot_daemon to use the net domain. |
| 13 | net_domain(ot_daemon) |
| 14 | |
| 15 | # Allow the ot_daemon to access the folder "/data/misc/threadnetwork". |
| 16 | allow ot_daemon threadnetwork_data_file:dir rw_dir_perms; |
| 17 | allow ot_daemon threadnetwork_data_file:file create_file_perms; |
| 18 | allow ot_daemon threadnetwork_data_file:sock_file {create unlink}; |
| 19 | |
Kangping Dong | 0b3e8c6 | 2022-10-28 15:56:02 +0800 | [diff] [blame^] | 20 | # Allow OT daemon to read/write the Thread tunnel interface |
| 21 | allow ot_daemon tun_device:chr_file {read write}; |
| 22 | |
Zhanglong Xia | b2d1fbb | 2023-06-14 05:26:15 +0000 | [diff] [blame] | 23 | hal_client_domain(ot_daemon, hal_threadnetwork) |
Kangping Dong | 0b3e8c6 | 2022-10-28 15:56:02 +0800 | [diff] [blame^] | 24 | |
| 25 | # Only ot_daemon can publish the binder service |
| 26 | binder_use(ot_daemon) |
| 27 | add_service(ot_daemon, ot_daemon_service) |
| 28 | binder_call(ot_daemon, system_server) |