From 5570b50a52804335ec05543c29f1157ed1873593 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sun, 9 Sep 2018 21:38:33 +0200 Subject: [PATCH] Samsung has two android.hardware.power HAL. Take appropriate one. Samsung includes both stock AOSP android.hardware.power service, and their own vendor.samsung.hardware.miscpower. Since the two HALs define the same full-qualified name, hwservicemanager takes whichever comes last. Using proper power HAL is needed for Samsung device to have proper sleep of the touchscreen, and better power handling. --- rw-system.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index 6d2474d..f5dabcb 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -138,3 +138,8 @@ done mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk || true mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkThemeOverlay.apk || true + +#If we have both Samsung and AOSP power hal, take Samsung's +if [ -f /vendor/bin/hw/vendor.samsung.hardware.miscpower@1.0-service ];then + mount -o bind /system/phh/empty /vendor/bin/hw/android.hardware.power@1.0-service +fi