From e064c6f3107ad92f8b19891a93104d80e8482935 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rw-system.sh b/rw-system.sh index b303962..89d3357 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -145,3 +145,7 @@ if grep -qF 'PowerVR Rogue GE8100' /vendor/lib/egl/GLESv1_CM_mtk.so;then setprop debug.hwui.renderer opengl fi +#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