common: Add rild
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 8 Apr 2020 16:45:32 +0000 (18:45 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 8 Apr 2020 16:55:40 +0000 (18:55 +0200)
Change-Id: I13f5bda8b3225beac12012586e1cffc4225378c4

common/vendor/device.te
common/vendor/file.te
common/vendor/file_contexts
common/vendor/rild.te [new file with mode: 0644]

index 1ebf5ad2e483ee93fb70fdbe7e783ed1f4ec6ef4..6c8864249ec1d621b81d4a03f85b3f453e71f07c 100644 (file)
@@ -8,6 +8,7 @@ type omr_block_device, dev_type;
 type radio_block_device, dev_type;
 type sec_efs_block_device, dev_type;
 
+type drb_device, dev_type;
 type fp_sensor_device, dev_type;
 type io_device, dev_type;
 type ssp_device, dev_type;
index 9136362dc7b8fa3569634d6d5a75640ee5efc4ec..8eec4a1f9bc30a15c8d7629efc5e3aff32e7a9b9 100644 (file)
@@ -5,6 +5,7 @@ type biometrics_vendor_data_file, file_type, data_file_type;
 type conn_vendor_data_file, file_type, data_file_type;
 type log_vendor_data_file, file_type, data_file_type;
 type log_cbd_vendor_data_file, file_type, data_file_type;
+type radio_vendor_data_file, file_type, data_file_type;
 type wifi_vendor_data_file, file_type, data_file_type;
 
 # EFS
index c5fc2f60a5a7ef273ff8a2d6a9331248c90b10c3..736c024f6f962ee170c3bd5caf49eb0313a2263a 100644 (file)
@@ -6,6 +6,7 @@
 /data/vendor/wifi(/.*)?                      u:object_r:wifi_vendor_data_file:s0
 /data/vendor/log(/.*)?                       u:object_r:log_vendor_data_file:s0
 /data/vendor/log/cbd(/.*)?                   u:object_r:log_cbd_vendor_data_file:s0
+/data/vendor/secradio(/.*)?                  u:object_r:radio_vendor_data_file:s0
 
 ### DEV
 /dev/block/platform/.+/by-name/cache         u:object_r:cache_block_device:s0
 /dev/batch_io                                u:object_r:io_device:s0
 /dev/ssp_sensorhub                           u:object_r:ssp_device:s0
 
+### radio
+# DRB
+/dev/drb                                     u:object_r:drb_device:s0
+
+# UMTS
 /dev/umts_boot0                              u:object_r:vendor_radio_device:s0
 /dev/umts_cass                               u:object_r:vendor_radio_device:s0
 /dev/umts_ipc[0-1]                           u:object_r:vendor_radio_device:s0
diff --git a/common/vendor/rild.te b/common/vendor/rild.te
new file mode 100644 (file)
index 0000000..6f425e8
--- /dev/null
@@ -0,0 +1,66 @@
+# rild.te
+
+allow rild block_device:dir search;
+allow rild mnt_vendor_file:dir { getattr search };
+
+# audio hal
+allow rild hal_audio_default:dir search;
+allow rild hal_audio_default:file r_file_perms;
+
+# gps
+allow rild gpsd:dir search;
+allow rild gpsd:file r_file_perms;
+
+# /data
+allow rild system_data_file:dir getattr;
+
+# /data/vendor/log
+allow rild log_vendor_data_file:dir rw_dir_perms;
+allow rild log_vendor_data_file:file create_file_perms;
+
+# /dev/block/platform/.+/by-name/radio
+allow rild radio_block_device:blk_file r_file_perms;
+
+# /dev/drb
+allow rild drb_device:chr_file rw_file_perms;
+
+# /dev/umts_*
+# /dev/umts_ipc*
+allow rild vendor_radio_device:chr_file rw_file_perms;
+
+# /data/vendor/secradio
+allow rild radio_vendor_data_file:dir rw_dir_perms;
+allow rild radio_vendor_data_file:file create_file_perms;
+
+# /efs/FactoryApp/
+# /mnt/vendor/efs/root
+allow rild app_efs_file:dir r_dir_perms;
+allow rild app_efs_file:file { rw_file_perms setattr };
+
+# /efs/imei
+allow rild imei_efs_file:dir r_dir_perms;
+allow rild imei_efs_file:file r_file_perms;
+
+# /mnt/vendor/efs/
+allow rild prov_efs_file:dir r_dir_perms;
+allow rild prov_efs_file:file r_file_perms;
+
+# /mnt/vendor/efs/nv_data.bin
+allow rild bin_nv_data_efs_file:file { rw_file_perms setattr unlink };
+
+# /proc/net/xt_qtaguid/iface_stat_fmt
+allow rild proc_qtaguid_stat:file r_file_perms;
+
+# /proc/sys/net/ipv6/conf/*/accept_ra_defrtr
+allow rild proc_net:file rw_file_perms;
+
+# mdc.
+# persist.sys.omc_support
+# ro.csc.
+get_prop(rild, exported_config_prop);
+
+# ro.boot.cpboot, ril.NwNmId[0-9]
+get_prop(rild, exported_radio_prop)
+
+# vendor.cbd.
+set_prop(rild, vendor_cbd_prop)