From 72e86dc39f8e985856b2e5e56908459d280f0173 Mon Sep 17 00:00:00 2001 From: Nahush Gondhalekar Date: Thu, 8 Aug 2019 10:11:55 -0700 Subject: [PATCH] Removing usf for treble compliance. Change-Id: I5771a191610adb8ca968902e2c7b6eac1830874c --- legacy/vendor/common/device.te | 3 -- legacy/vendor/common/file.te | 2 -- legacy/vendor/common/file_contexts | 11 ------ legacy/vendor/common/init_shell.te | 5 --- legacy/vendor/common/property.te | 3 -- legacy/vendor/common/property_contexts | 2 -- legacy/vendor/common/qti_logkit_app.te | 1 - legacy/vendor/common/service.te | 1 - legacy/vendor/common/service_contexts | 1 - legacy/vendor/common/system_app.te | 4 --- legacy/vendor/common/system_server.te | 10 ------ legacy/vendor/common/usf.te | 50 -------------------------- 12 files changed, 93 deletions(-) delete mode 100644 legacy/vendor/common/usf.te diff --git a/legacy/vendor/common/device.te b/legacy/vendor/common/device.te index 5aea8003..d7141219 100644 --- a/legacy/vendor/common/device.te +++ b/legacy/vendor/common/device.te @@ -151,9 +151,6 @@ type rng_device, dev_type; #Define system health monitor devices type system_health_monitor_device, dev_type; -#Define usf device -type usf_device, dev_type; - #Define qbt device - ultrasonic fingperprint sensor type qbt_device, dev_type; diff --git a/legacy/vendor/common/file.te b/legacy/vendor/common/file.te index 88dcbbbc..0e13e7a8 100644 --- a/legacy/vendor/common/file.te +++ b/legacy/vendor/common/file.te @@ -227,8 +227,6 @@ type hbtp_cfg_file, file_type, vendor_file_type; type hbtp_log_file, file_type, data_file_type; type hbtp_kernel_sysfs, fs_type, sysfs_type; -type persist_usf_file, file_type, vendor_persist_type; - #qfp-daemon type qfp-daemon_data_file, file_type, data_file_type; type persist_qti_fp_file, file_type, vendor_persist_type; diff --git a/legacy/vendor/common/file_contexts b/legacy/vendor/common/file_contexts index d6252b4b..82fb7a2a 100644 --- a/legacy/vendor/common/file_contexts +++ b/legacy/vendor/common/file_contexts @@ -40,7 +40,6 @@ /dev/msm_aac_in u:object_r:msm_aac_in_device:s0 /dev/wcd_dsp0_control u:object_r:audio_device:s0 /dev/wcd-dsp-glink u:object_r:audio_device:s0 -/dev/usf1 u:object_r:usf_device:s0 /dev/msm_dsps u:object_r:sensors_device:s0 /dev/msm_thermal_query u:object_r:thermal_device:s0 /dev/nfc-nci u:object_r:nfc_device:s0 @@ -308,15 +307,6 @@ /(vendor|system/vendor)/bin/wifidisplayhalservice u:object_r:wifidisplayhalservice_qti_exec:s0 /(vendor|system/vendor)/bin/wfdhdcphalservice u:object_r:wfdhdcphalservice_qti_exec:s0 /(vendor|system/vendor)/bin/wfdvndservice u:object_r:wfdvndservice_exec:s0 -/(vendor|system/vendor)/bin/usf_epos u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_gesture u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_hovering u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_p2p u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_proximity u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_sync_gesture u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_sw_calib u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_pairing u:object_r:usf_exec:s0 -/(vendor|system/vendor)/bin/usf_tester u:object_r:usf_exec:s0 /(vendor|system/vendor)/bin/LKCore u:object_r:qti_logkit_exec:s0 /(vendor|system/vendor)/bin/tbaseLoader u:object_r:tbaseLoader_exec:s0 /(vendor|system/vendor)/bin/mcStarter u:object_r:mcStarter_exec:s0 @@ -593,7 +583,6 @@ /mnt/vendor/persist/data/tz(/.*)? u:object_r:persist_drm_file:s0 /mnt/vendor/persist/data/sfs(/.*)? u:object_r:persist_drm_file:s0 /mnt/vendor/persist/qti_fp(/.*)? u:object_r:persist_qti_fp_file:s0 -/mnt/vendor/persist/usf(/.*)? u:object_r:persist_usf_file:s0 /mnt/vendor/persist/hlos_rfs(/.*)? u:object_r:persist_rfs_shared_hlos_file:s0 /mnt/vendor/persist/display(/.*)? u:object_r:persist_display_file:s0 /mnt/vendor/persist/rfs.* u:object_r:persist_rfs_file:s0 diff --git a/legacy/vendor/common/init_shell.te b/legacy/vendor/common/init_shell.te index fb429ffb..8d80ba93 100644 --- a/legacy/vendor/common/init_shell.te +++ b/legacy/vendor/common/init_shell.te @@ -98,7 +98,6 @@ set_prop(qti_init_shell, scr_enabled_prop) set_prop(qti_init_shell, vendor_opengles_prop) set_prop(qti_init_shell, vendor_mdm_helper_prop) set_prop(qti_init_shell, fm_prop) -set_prop(qti_init_shell, usf_prop) set_prop(qti_init_shell, vendor_alarm_boot_prop) set_prop(qti_init_shell, vendor_gralloc_prop) set_prop(qti_init_shell, vendor_audio_prop) @@ -155,10 +154,6 @@ r_dir_file(qti_init_shell, persist_bluetooth_file) allow qti_init_shell sensors_persist_file:file setattr; allow qti_init_shell sensors_persist_file:dir setattr; -# To start of selected USF based calculators -r_dir_file(qti_init_shell, persist_usf_file) -allow qti_init_shell persist_usf_file:dir w_dir_perms; - # To check if /system/bin/msm_irqbalance is persent in the device allow qti_init_shell msm_irqbalanced_exec:file getattr; diff --git a/legacy/vendor/common/property.te b/legacy/vendor/common/property.te index c7228525..32883bd7 100644 --- a/legacy/vendor/common/property.te +++ b/legacy/vendor/common/property.te @@ -37,9 +37,6 @@ type ctl_vendor_rild_prop, property_type; # property for LKCore ctl start type ctl_LKCore_prop, property_type; -# properties for usf daemons -type usf_prop, property_type; - type freq_prop, property_type; type vm_bms_prop, property_type; #To start vm_bms type vendor_dataqti_prop, property_type; diff --git a/legacy/vendor/common/property_contexts b/legacy/vendor/common/property_contexts index 4c7042a7..31872f80 100644 --- a/legacy/vendor/common/property_contexts +++ b/legacy/vendor/common/property_contexts @@ -39,8 +39,6 @@ vendor.service.qti.ims.enabled u:object_r:qcom_ims_prop:s0 persist.vendor.ims. u:object_r:qcom_ims_prop:s0 persist.vendor.qti.telephony.vt_cam_interface u:object_r:qcom_ims_prop:s0 vendor.hw.fm. u:object_r:fm_prop:s0 -sys.usf. u:object_r:usf_prop:s0 -ro.qc.sdk.us. u:object_r:usf_prop:s0 ctl.vendor.qmuxd u:object_r:ctl_vendor_qmuxd_prop:s0 ctl.vendor.netmgrd u:object_r:ctl_vendor_netmgrd_prop:s0 ctl.vendor.port-bridge u:object_r:ctl_vendor_port-bridge_prop:s0 diff --git a/legacy/vendor/common/qti_logkit_app.te b/legacy/vendor/common/qti_logkit_app.te index f94c280c..1ce9c05d 100644 --- a/legacy/vendor/common/qti_logkit_app.te +++ b/legacy/vendor/common/qti_logkit_app.te @@ -33,7 +33,6 @@ binder_use(qti_logkit_app) # allow set prop to start lkcore set_prop(qti_logkit_app, ctl_LKCore_prop) set_prop(qti_logkit_app, fm_prop) -set_prop(qti_logkit_app, usf_prop) allow qti_logkit_app app_api_service:service_manager find; allow qti_logkit_app surfaceflinger_service:service_manager find; diff --git a/legacy/vendor/common/service.te b/legacy/vendor/common/service.te index 8b003f11..4414a412 100644 --- a/legacy/vendor/common/service.te +++ b/legacy/vendor/common/service.te @@ -35,7 +35,6 @@ type wbc_service, service_manager_type; type dun_service, service_manager_type; type imsrcs_service, service_manager_type; type improve_touch_service, service_manager_type; -type usf_service, service_manager_type; type dtseagleservice_service, service_manager_type; type gba_auth_service, service_manager_type; type qtitetherservice_service, service_manager_type; diff --git a/legacy/vendor/common/service_contexts b/legacy/vendor/common/service_contexts index 17aa3f22..75623a64 100644 --- a/legacy/vendor/common/service_contexts +++ b/legacy/vendor/common/service_contexts @@ -38,7 +38,6 @@ improveTouch.TouchService u:object_r:improve_touch_service: improveTouch.TouchManagerService u:object_r:improve_touch_service:s0 improveTouch.GestureManagerService u:object_r:improve_touch_service:s0 improveTouch.HandBiometricManagerService u:object_r:improve_touch_service:s0 -DigitalPen u:object_r:usf_service:s0 dts_eagle_service u:object_r:dtseagleservice_service:s0 com.qualcomm.qti.secota.service.SecotaNService u:object_r:secotad_service:s0 qtitetherservice u:object_r:qtitetherservice_service:s0 diff --git a/legacy/vendor/common/system_app.te b/legacy/vendor/common/system_app.te index 3e293d52..4c393063 100644 --- a/legacy/vendor/common/system_app.te +++ b/legacy/vendor/common/system_app.te @@ -29,10 +29,6 @@ typeattribute system_app system_writes_vendor_properties_violators; allow system_app fm_radio_device:chr_file r_file_perms; r_dir_file(system_app, bluetooth_data_file); -allow system_app { - usf_prop -}:property_service set; - allow system_app { atfwd_service dun_service diff --git a/legacy/vendor/common/system_server.te b/legacy/vendor/common/system_server.te index f0abe60a..ab0999fb 100644 --- a/legacy/vendor/common/system_server.te +++ b/legacy/vendor/common/system_server.te @@ -47,17 +47,11 @@ allow system_server { # For wifistatemachine wbc_service # Allow system_server to add digital pen system service - usf_service #dpmservice }:service_manager add; allow system_server qtitetherservice_service:service_manager find; -#For ANT tty communication and to set wc_transport prop -allow system_server { - usf_prop -}:property_service set; - # required for ANT App to connectto wcnss_filter sockets allow system_server bluetooth:unix_stream_socket connectto; # access to iop @@ -96,10 +90,6 @@ allow system_server { bt_device }:chr_file rw_file_perms; -# Allow system server access to usf resources -allow system_server usf:process signal; -#allow system_server usf:unix_stream_socket connectto; - hal_client_domain(system_server, hal_dataconnection_qti) #Allow access to netmgrd socket diff --git a/legacy/vendor/common/usf.te b/legacy/vendor/common/usf.te deleted file mode 100644 index 6a8013c4..00000000 --- a/legacy/vendor/common/usf.te +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (c) 2019, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Policy for usf daemons -type usf, domain; -type usf_exec, exec_type, vendor_file_type, file_type; - -# Started by init -init_daemon_domain(usf) -net_domain(usf) - -# Ultrasound device -allow usf usf_device:chr_file rw_file_perms; - -# Audio -#allow usf mediaserver:unix_stream_socket connectto; -allow usf audio_device:chr_file rw_file_perms; -allow usf proc_audiod:file r_file_perms; -allow usf audio_device:dir r_dir_perms; - -# Data files and persist storage -r_dir_file(usf, mnt_vendor_file) -r_dir_file(usf, persist_usf_file) - -# Properties -set_prop(usf, usf_prop)