From a05cd829dd426d83c0b027bae5761e925baa331b Mon Sep 17 00:00:00 2001 From: linanson Date: Fri, 22 Dec 2023 00:40:01 +0800 Subject: [PATCH 1/2] Remove the diagnosticsTool domain for SeLinux access. Bug: 318308424 Test: Local Rom build and manul test for the diagnosticstool app Change-Id: Ib0a79fb91a5546922caab64d9ebbb2da103d7b07 --- diagnosticstool/diagnosticstool.mk | 1 - diagnosticstool/sepolicy/diagnosticstool_app.te | 4 ---- diagnosticstool/sepolicy/seapp_contexts | 2 -- 3 files changed, 7 deletions(-) delete mode 100644 diagnosticstool/diagnosticstool.mk delete mode 100644 diagnosticstool/sepolicy/diagnosticstool_app.te delete mode 100644 diagnosticstool/sepolicy/seapp_contexts diff --git a/diagnosticstool/diagnosticstool.mk b/diagnosticstool/diagnosticstool.mk deleted file mode 100644 index 67fbd88..0000000 --- a/diagnosticstool/diagnosticstool.mk +++ /dev/null @@ -1 +0,0 @@ -PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/diagnosticstool/sepolicy diff --git a/diagnosticstool/sepolicy/diagnosticstool_app.te b/diagnosticstool/sepolicy/diagnosticstool_app.te deleted file mode 100644 index d1874e6..0000000 --- a/diagnosticstool/sepolicy/diagnosticstool_app.te +++ /dev/null @@ -1,4 +0,0 @@ -type diagnosticstool_app, domain; -app_domain(diagnosticstool_app) - -allow diagnosticstool_app app_api_service:service_manager find; diff --git a/diagnosticstool/sepolicy/seapp_contexts b/diagnosticstool/sepolicy/seapp_contexts deleted file mode 100644 index 3c601cd..0000000 --- a/diagnosticstool/sepolicy/seapp_contexts +++ /dev/null @@ -1,2 +0,0 @@ -# Diagnostics Tool -user=_app seinfo=platform name=com.google.android.apps.diagnosticstool domain=diagnosticstool_app isPrivApp=true levelFrom=user From 27017fb06a33f80340a2d74fd11b689579eecd58 Mon Sep 17 00:00:00 2001 From: George Lee Date: Mon, 8 Jan 2024 20:26:46 +0000 Subject: [PATCH 2/2] bm: Remove thermal dependency (gs-common) Bug: 319136643 Test: Confirm battery_mitigation loaded Change-Id: I250a1d9c1354bd4d53909d71935af1fc264f936f Signed-off-by: George Lee --- battery_mitigation/battery_mitigation.rc | 58 ++++++++++++------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/battery_mitigation/battery_mitigation.rc b/battery_mitigation/battery_mitigation.rc index bc95fd3..2719541 100644 --- a/battery_mitigation/battery_mitigation.rc +++ b/battery_mitigation/battery_mitigation.rc @@ -1,91 +1,91 @@ -on property:vendor.thermal.link_ready=1 +on property:vendor.all.modules.ready=1 mkdir /data/vendor/mitigation 0755 system system chown system system /data/vendor/mitigation chown system system /sys/devices/virtual/pmic/mitigation/br_stats/enable_br_stats start vendor.battery_mitigation -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,if && property:sys.boot.reason=reboot,uvlo,pmic,if +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,if && property:sys.boot.reason=reboot,uvlo,pmic,if setprop vendor.brownout_reason "uvlo,pmic,if" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,pmic,if && property:sys.boot.reason=reboot,ocp,pmic,if +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,pmic,if && property:sys.boot.reason=reboot,ocp,pmic,if setprop vendor.brownout_reason "ocp,pmic,if" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,main && property:sys.boot.reason=reboot,uvlo,pmic,main +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,main && property:sys.boot.reason=reboot,uvlo,pmic,main setprop vendor.brownout_reason "uvlo,pmic,main" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,sub && property:sys.boot.reason=reboot,uvlo,pmic,sub +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,uvlo,pmic,sub && property:sys.boot.reason=reboot,uvlo,pmic,sub setprop vendor.brownout_reason "uvlo,pmic,sub" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1M && property:sys.boot.reason=reboot,ocp,buck1m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1M && property:sys.boot.reason=reboot,ocp,buck1m setprop vendor.brownout_reason "ocp,buck1m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2M && property:sys.boot.reason=reboot,ocp,buck2m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2M && property:sys.boot.reason=reboot,ocp,buck2m setprop vendor.brownout_reason "ocp,buck2m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3M && property:sys.boot.reason=reboot,ocp,buck3m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3M && property:sys.boot.reason=reboot,ocp,buck3m setprop vendor.brownout_reason "ocp,buck3m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4M && property:sys.boot.reason=reboot,ocp,buck4m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4M && property:sys.boot.reason=reboot,ocp,buck4m setprop vendor.brownout_reason "ocp,buck4m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5M && property:sys.boot.reason=reboot,ocp,buck5m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5M && property:sys.boot.reason=reboot,ocp,buck5m setprop vendor.brownout_reason "ocp,buck5m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6M && property:sys.boot.reason=reboot,ocp,buck6m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6M && property:sys.boot.reason=reboot,ocp,buck6m setprop vendor.brownout_reason "ocp,buck6m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7M && property:sys.boot.reason=reboot,ocp,buck7m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7M && property:sys.boot.reason=reboot,ocp,buck7m setprop vendor.brownout_reason "ocp,buck7m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8M && property:sys.boot.reason=reboot,ocp,buck8m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8M && property:sys.boot.reason=reboot,ocp,buck8m setprop vendor.brownout_reason "ocp,buck8m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9M && property:sys.boot.reason=reboot,ocp,buck9m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9M && property:sys.boot.reason=reboot,ocp,buck9m setprop vendor.brownout_reason "ocp,buck9m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10M && property:sys.boot.reason=reboot,ocp,buck10m +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10M && property:sys.boot.reason=reboot,ocp,buck10m setprop vendor.brownout_reason "ocp,buck10m" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1S && property:sys.boot.reason=reboot,ocp,buck1s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK1S && property:sys.boot.reason=reboot,ocp,buck1s setprop vendor.brownout_reason "ocp,buck1s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2S && property:sys.boot.reason=reboot,ocp,buck2s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK2S && property:sys.boot.reason=reboot,ocp,buck2s setprop vendor.brownout_reason "ocp,buck2s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3S && property:sys.boot.reason=reboot,ocp,buck3s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK3S && property:sys.boot.reason=reboot,ocp,buck3s setprop vendor.brownout_reason "ocp,buck3s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4S && property:sys.boot.reason=reboot,ocp,buck4s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK4S && property:sys.boot.reason=reboot,ocp,buck4s setprop vendor.brownout_reason "ocp,buck4s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5S && property:sys.boot.reason=reboot,ocp,buck5s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK5S && property:sys.boot.reason=reboot,ocp,buck5s setprop vendor.brownout_reason "ocp,buck5s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6S && property:sys.boot.reason=reboot,ocp,buck6s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK6S && property:sys.boot.reason=reboot,ocp,buck6s setprop vendor.brownout_reason "ocp,buck6s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7S && property:sys.boot.reason=reboot,ocp,buck7s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK7S && property:sys.boot.reason=reboot,ocp,buck7s setprop vendor.brownout_reason "ocp,buck7s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8S && property:sys.boot.reason=reboot,ocp,buck8s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK8S && property:sys.boot.reason=reboot,ocp,buck8s setprop vendor.brownout_reason "ocp,buck8s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9S && property:sys.boot.reason=reboot,ocp,buck9s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK9S && property:sys.boot.reason=reboot,ocp,buck9s setprop vendor.brownout_reason "ocp,buck9s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10S && property:sys.boot.reason=reboot,ocp,buck10s +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCK10S && property:sys.boot.reason=reboot,ocp,buck10s setprop vendor.brownout_reason "ocp,buck10s" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKDS && property:sys.boot.reason=reboot,ocp,buckds +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKDS && property:sys.boot.reason=reboot,ocp,buckds setprop vendor.brownout_reason "ocp,buckds" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKAS && property:sys.boot.reason=reboot,ocp,buckas +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKAS && property:sys.boot.reason=reboot,ocp,buckas setprop vendor.brownout_reason "ocp,buckas" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKCS && property:sys.boot.reason=reboot,ocp,buckcs +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKCS && property:sys.boot.reason=reboot,ocp,buckcs setprop vendor.brownout_reason "ocp,buckcs" -on property:vendor.thermal.link_ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKBS && property:sys.boot.reason=reboot,ocp,buckbs +on property:vendor.all.modules.ready=1 && property:ro.boot.bootreason=reboot,ocp,BUCKBS && property:sys.boot.reason=reboot,ocp,buckbs setprop vendor.brownout_reason "ocp,buckbs" on property:vendor.brownout.br.feasible=1