1#access to /sys/devices/soc0/hw_platform and /sys/devices/soc0/soc_id
2allow hal_gnss self:socket { create read write ioctl } ;
3allowxperm hal_gnss self:socket ioctl { IPC_ROUTER_IOCTL_BIND_CONTROL_PORT
4                                        IPC_ROUTER_IOCTL_LOOKUP_SERVER } ;
5allow hal_gnss self:netlink_socket { create bind read };
6
7r_dir_file(hal_gnss, sysfs_msm_subsys);
8
9userdebug_or_eng(`
10  allow hal_gnss diag_device:chr_file { read write open ioctl};
11')
12
13# access to /sys/bus/esoc/devices
14allow hal_gnss sysfs:dir { read open };
15
16# access to /sys/devices/soc0/soc_id and /sys/devices/soc0/hw_platform
17allow hal_gnss sysfs_soc:dir search;
18allow hal_gnss sysfs_soc:file { read open getattr };
19
20# read access to sys/module/diagchar/parameters/timestamp_switch
21allow hal_gnss sysfs_timestamp_switch:file r_file_perms;
22