From 3431b3798fb47d147b3b7fd49fe6dd35e2adfdda Mon Sep 17 00:00:00 2001 From: nyyu Date: Fri, 2 Dec 2022 21:24:38 +0100 Subject: [PATCH] msm8974-common: Build mock hidl power stats * Fix for hidl power stats errors. - Now with this we fixing both errors: BatteryStatsService: Unable to load Power Hal or power.stats HAL hwservicemanager: getTransport: Cannot find entry android.hardware.power.stats@1.0::IPowerStats/default in either framework or device manifest. hwservicemanager: getTransport: Cannot find entry android.hardware.power@1.0::IPower/default in either framework or device manifest. --- msm8974.mk | 3 ++- sepolicy/common/file_contexts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/msm8974.mk b/msm8974.mk index 8947a7c..22e56a3 100644 --- a/msm8974.mk +++ b/msm8974.mk @@ -168,7 +168,8 @@ PRODUCT_PACKAGES += \ # Power HAL PRODUCT_PACKAGES += \ - android.hardware.power-service-qti + android.hardware.power-service-qti \ + android.hardware.power.stats@1.0-service.mock # RenderScript HAL PRODUCT_PACKAGES += \ diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts index 3693e52..ed594a2 100644 --- a/sepolicy/common/file_contexts +++ b/sepolicy/common/file_contexts @@ -28,6 +28,7 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.ir@1\.0-service\.samsung u:object_r:hal_ir_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.health-service\.samsung u:object_r:hal_health_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.samsung u:object_r:hal_light_default_exec:s0 +/(vendor|system/vendor)/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@1\.0-service.samsung8974 u:object_r:hal_sensors_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_sysfs_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.samsung u:object_r:hal_lineage_touch_default_exec:s0