From 948098bcd63f958c7db5d4a291f575b291fb2105 Mon Sep 17 00:00:00 2001 From: Adam Shih Date: Wed, 8 Sep 2021 10:52:40 +0800 Subject: [PATCH] review hal_radioext_default Bug: 198532074 Test: boot with hal_radioext_default started Change-Id: I083fd55749f0d82cabe527e7fa611ad2633d0ecd --- legacy/file.te | 1 - legacy/genfs_contexts | 6 ------ legacy/grilservice_app.te | 4 ---- legacy/hwservice.te | 3 --- legacy/hwservice_contexts | 3 --- legacy/seapp_contexts | 3 --- whitechapel_pro/file.te | 1 + whitechapel_pro/genfs_contexts | 4 ++++ whitechapel_pro/grilservice_app.te | 4 ++++ {legacy => whitechapel_pro}/hal_radioext_default.te | 3 --- whitechapel_pro/hwservice.te | 3 +++ whitechapel_pro/hwservice_contexts | 3 +++ whitechapel_pro/seapp_contexts | 3 +++ 13 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 whitechapel_pro/grilservice_app.te rename {legacy => whitechapel_pro}/hal_radioext_default.te (80%) diff --git a/legacy/file.te b/legacy/file.te index 4d8c9e05..f2726328 100644 --- a/legacy/file.te +++ b/legacy/file.te @@ -85,7 +85,6 @@ type vendor_camera_tuning_file, vendor_file_type, file_type; type vendor_camera_data_file, file_type, data_file_type; # Display -type sysfs_display, sysfs_type, fs_type; type persist_display_file, file_type, vendor_persist_type; # Backlight diff --git a/legacy/genfs_contexts b/legacy/genfs_contexts index e5ff5673..cbc266d7 100644 --- a/legacy/genfs_contexts +++ b/legacy/genfs_contexts @@ -102,12 +102,6 @@ genfscon proc /fts/driver_test genfscon proc /fts_ext/driver_test u:object_r:proc_touch:s0 genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0 -# Display -genfscon sysfs /devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/gamma u:object_r:sysfs_display:s0 -genfscon sysfs /devices/platform/1c2d0000.drmdsim/1c2d0000.drmdsim.0/gamma u:object_r:sysfs_display:s0 -genfscon sysfs /devices/platform/1c2c0000.drmdsim/hs_clock u:object_r:sysfs_display:s0 -genfscon sysfs /devices/platform/1c2d0000.drmdsim/hs_clock u:object_r:sysfs_display:s0 - # TODO(b/184768835): remove this once the bug is fixed # Display / LHBM (Local High Brightness Mode) genfscon sysfs /devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/backlight/panel0-backlight/local_hbm_mode u:object_r:sysfs_lhbm:s0 diff --git a/legacy/grilservice_app.te b/legacy/grilservice_app.te index 50ff22a5..7c059ff3 100644 --- a/legacy/grilservice_app.te +++ b/legacy/grilservice_app.te @@ -1,7 +1,3 @@ -type grilservice_app, domain; -app_domain(grilservice_app) - -allow grilservice_app app_api_service:service_manager find; allow grilservice_app hal_bluetooth_coexistence_hwservice:hwservice_manager find; allow grilservice_app hal_radioext_hwservice:hwservice_manager find; allow grilservice_app hal_wifi_ext_hwservice:hwservice_manager find; diff --git a/legacy/hwservice.te b/legacy/hwservice.te index eb8e6211..b72da6e8 100644 --- a/legacy/hwservice.te +++ b/legacy/hwservice.te @@ -4,9 +4,6 @@ type hal_vendor_surfaceflinger_hwservice, hwservice_manager_type; # rild service type hal_exynos_rild_hwservice, hwservice_manager_type; -# GRIL service -type hal_radioext_hwservice, hwservice_manager_type; - # WLC type hal_wlc_hwservice, hwservice_manager_type; diff --git a/legacy/hwservice_contexts b/legacy/hwservice_contexts index d9777f05..901c6af8 100644 --- a/legacy/hwservice_contexts +++ b/legacy/hwservice_contexts @@ -6,9 +6,6 @@ vendor.samsung_slsi.hardware.configstore::IExynosHWCConfigs u:object_r:hal_conf android.hardware.media.c2::IComponentStore u:object_r:hal_codec2_hwservice:s0 android.hardware.media.c2::IConfigurable u:object_r:hal_codec2_hwservice:s0 -# GRIL HAL -vendor.google.radioext::IRadioExt u:object_r:hal_radioext_hwservice:s0 - # Wireless charger hal vendor.google.wireless_charger::IWirelessCharger u:object_r:hal_wlc_hwservice:s0 diff --git a/legacy/seapp_contexts b/legacy/seapp_contexts index 3033a973..7a003c90 100644 --- a/legacy/seapp_contexts +++ b/legacy/seapp_contexts @@ -2,9 +2,6 @@ user=system seinfo=platform name=com.google.SSRestartDetector domain=ssr_detector_app type=system_app_data_file levelFrom=user user=_app seinfo=platform name=com.android.ramdump domain=ramdump_app type=app_data_file levelFrom=all -# grilservice -user=_app isPrivApp=true name=com.google.android.grilservice domain=grilservice_app levelFrom=all - # HbmSVManager user=_app seinfo=platform name=com.android.hbmsvmanager domain=hbmsvmanager_app type=app_data_file levelFrom=all diff --git a/whitechapel_pro/file.te b/whitechapel_pro/file.te index 8391c9a7..e12181d1 100644 --- a/whitechapel_pro/file.te +++ b/whitechapel_pro/file.te @@ -17,6 +17,7 @@ type vendor_fw_file, vendor_file_type, file_type; type sysfs_chosen, sysfs_type, fs_type; type sysfs_ota, sysfs_type, fs_type; type bootdevice_sysdev, dev_type; +type sysfs_display, sysfs_type, fs_type; # vendor extra images type modem_img_file, contextmount_type, file_type, vendor_file_type; diff --git a/whitechapel_pro/genfs_contexts b/whitechapel_pro/genfs_contexts index cd5986d7..3cd39732 100644 --- a/whitechapel_pro/genfs_contexts +++ b/whitechapel_pro/genfs_contexts @@ -3,3 +3,7 @@ genfscon sysfs /firmware/devicetree/base/chosen u # OTA genfscon sysfs /devices/platform/14700000.ufs/pixel/boot_lun_enabled u:object_r:sysfs_ota:s0 +# Display +genfscon sysfs /devices/platform/1c2c0000.drmdsim/1c2c0000.drmdsim.0/gamma u:object_r:sysfs_display:s0 +genfscon sysfs /devices/platform/1c2c0000.drmdsim/hs_clock u:object_r:sysfs_display:s0 + diff --git a/whitechapel_pro/grilservice_app.te b/whitechapel_pro/grilservice_app.te new file mode 100644 index 00000000..0a090cd4 --- /dev/null +++ b/whitechapel_pro/grilservice_app.te @@ -0,0 +1,4 @@ +type grilservice_app, domain; +app_domain(grilservice_app) + +allow grilservice_app app_api_service:service_manager find; diff --git a/legacy/hal_radioext_default.te b/whitechapel_pro/hal_radioext_default.te similarity index 80% rename from legacy/hal_radioext_default.te rename to whitechapel_pro/hal_radioext_default.te index eef71cf6..a5a0f3e8 100644 --- a/legacy/hal_radioext_default.te +++ b/whitechapel_pro/hal_radioext_default.te @@ -7,7 +7,6 @@ get_prop(hal_radioext_default, hwservicemanager_prop) add_hwservice(hal_radioext_default, hal_radioext_hwservice) binder_call(hal_radioext_default, grilservice_app) -binder_call(hal_radioext_default, hal_bluetooth_btlinux) # RW /dev/oem_ipc0 allow hal_radioext_default radio_device:chr_file rw_file_perms; @@ -17,5 +16,3 @@ allow hal_radioext_default radio_vendor_data_file:dir create_dir_perms; allow hal_radioext_default radio_vendor_data_file:file create_file_perms; allow hal_radioext_default sysfs_display:file rw_file_perms; -# Bluetooth -allow hal_radioext_default hal_bluetooth_coexistence_hwservice:hwservice_manager find; diff --git a/whitechapel_pro/hwservice.te b/whitechapel_pro/hwservice.te index f6d18508..9c041ba7 100644 --- a/whitechapel_pro/hwservice.te +++ b/whitechapel_pro/hwservice.te @@ -1,3 +1,6 @@ # dmd servcie type hal_vendor_oem_hwservice, hwservice_manager_type; +# GRIL service +type hal_radioext_hwservice, hwservice_manager_type; + diff --git a/whitechapel_pro/hwservice_contexts b/whitechapel_pro/hwservice_contexts index f89299c1..6453a566 100644 --- a/whitechapel_pro/hwservice_contexts +++ b/whitechapel_pro/hwservice_contexts @@ -3,3 +3,6 @@ vendor.samsung_slsi.telephony.hardware.oemservice::IOemService # rild HAL vendor.samsung_slsi.telephony.hardware.radioExternal::IOemSlsiRadioExternal u:object_r:hal_exynos_rild_hwservice:s0 + +# GRIL HAL +vendor.google.radioext::IRadioExt u:object_r:hal_radioext_hwservice:s0 diff --git a/whitechapel_pro/seapp_contexts b/whitechapel_pro/seapp_contexts index ca109ea3..d72e7744 100644 --- a/whitechapel_pro/seapp_contexts +++ b/whitechapel_pro/seapp_contexts @@ -5,6 +5,9 @@ user=_app isPrivApp=true name=com.shannon.qualifiednetworksservice domain=vendor user=_app isPrivApp=true name=com.shannon.rcsservice domain=vendor_rcs_app levelFrom=all user=_app isPrivApp=true name=com.shannon.rcsservice:shannonrcsservice domain=vendor_rcs_service_app levelFrom=all +# grilservice +user=_app isPrivApp=true name=com.google.android.grilservice domain=grilservice_app levelFrom=all + # Domain for connectivity monitor user=_app isPrivApp=true seinfo=platform name=com.google.android.connectivitymonitor domain=con_monitor_app type=app_data_file levelFrom=all