From 3171e2372e8080a01ef59959f8b9445366fc4786 Mon Sep 17 00:00:00 2001 From: samou Date: Fri, 4 Oct 2024 08:41:51 +0000 Subject: [PATCH 1/2] sepolicy: remove irregular policy Flag: EXEMPT refactor Bug: 364989823 Signed-off-by: samou (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1822201a0c6a91d84627c6b59fcd21b223285dac) Merged-In: I4cced2ae29591425a5bfcb971be6bd2db6b19c66 Change-Id: I4cced2ae29591425a5bfcb971be6bd2db6b19c66 --- .../sepolicy/vendor/dumpstate.te | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/battery_mitigation/sepolicy/vendor/dumpstate.te b/battery_mitigation/sepolicy/vendor/dumpstate.te index bb84ff2..b3bb1d4 100644 --- a/battery_mitigation/sepolicy/vendor/dumpstate.te +++ b/battery_mitigation/sepolicy/vendor/dumpstate.te @@ -1,21 +1,3 @@ # To call battery_mitigation hal allow dumpstate hal_battery_mitigation_service:service_manager find; binder_call(dumpstate, battery_mitigation); - -allow hal_dumpstate_default sysfs_acpm_stats:dir { read open search }; -allow hal_dumpstate_default sysfs_acpm_stats:file { read open getattr }; -allow hal_dumpstate_default sysfs_cpu:file { read open getattr }; -allow hal_dumpstate_default sysfs_batteryinfo:dir { read open search }; -allow hal_dumpstate_default sysfs_batteryinfo:file { read open getattr }; -allow hal_dumpstate_default logbuffer_device:chr_file { read open getattr }; -allow hal_dumpstate_default mitigation_vendor_data_file:file { read open getattr }; -allow hal_dumpstate_default mitigation_vendor_data_file:dir { search }; -allow hal_dumpstate_default sysfs_bcl:dir { read open search }; -allow hal_dumpstate_default sysfs_bcl:file { read open getattr }; -allow hal_dumpstate_default vendor_file:file { execute_no_trans }; -allow hal_dumpstate_default battery_history_device:chr_file { read }; - - -userdebug_or_eng(` - allow hal_dumpstate_default vendor_pm_genpd_debugfs:file { read open getattr }; -') From 1d50676e3feb0df643e93bce5f5634a53af10641 Mon Sep 17 00:00:00 2001 From: Tommy Chiu Date: Wed, 9 Oct 2024 05:05:34 +0000 Subject: [PATCH 2/2] gsc: Change the criteria for building GSC targets There can be a case where vendor directory exists but vendor/google_nos does not. Bug: 371059500 Test: manual Flag: EXEMPT refactor (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8af77ef94228bf37bd7be4d8db496f7084e0333d) Merged-In: I96f429ec3284114868ad220ea308a6920930c065 Change-Id: I96f429ec3284114868ad220ea308a6920930c065 --- dauntless/gsc.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dauntless/gsc.mk b/dauntless/gsc.mk index c1cf0e0..b563cc4 100644 --- a/dauntless/gsc.mk +++ b/dauntless/gsc.mk @@ -1,6 +1,6 @@ # Dauntless BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dauntless/sepolicy -ifneq ($(wildcard vendor),) +ifneq ($(wildcard vendor/google_nos),) PRODUCT_SOONG_NAMESPACES += vendor/google_nos/init/dauntless PRODUCT_PACKAGES += \ @@ -92,4 +92,4 @@ endif $(call dist-for-goals,droid,vendor/google_nos/prebuilts/dauntless/intermediate_images/d3m2_intermediate.ec.bin) endif -endif # $(wildcard vendor) +endif # $(wildcard vendor/google_nos)