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