From d4b624fda4f189bcab81d5925218fc4b21dccec2 Mon Sep 17 00:00:00 2001 From: CrisBal <74150843+CBG-leeco@users.noreply.github.com> Date: Wed, 26 May 2021 08:19:23 +0200 Subject: [PATCH] sdm710-common: Build aidl power stats and label it * Fix for aidl power stats errors. * New updated legacy-um sepolicy solved the android.hardware.power@1.0::IPower/default error - 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. --- sdm710.mk | 1 + sepolicy/vendor/file_contexts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sdm710.mk b/sdm710.mk index a6315b2..253469d 100644 --- a/sdm710.mk +++ b/sdm710.mk @@ -343,6 +343,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.power@1.2 \ android.hardware.power@1.2.vendor \ + android.hardware.power.stats@1.0-service.mock \ android.hardware.power-service.lenovo-sdm710-libperfmgr PRODUCT_COPY_FILES += \ diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index eb2222a..c376549 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -24,3 +24,6 @@ /sys/ontim_bootinfo/gps_lna u:object_r:sysfs_gps:s0 /sys/ontim_bootinfo/gps_reset u:object_r:sysfs_gps:s0 /dev/ttyHS1 u:object_r:gps_device:s0 + +# Power aidl stats +/(vendor|system/vendor)/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0