From 3dcad0dec3ee548224d4be3c1c87469e31c394c2 Mon Sep 17 00:00:00 2001 From: emilchung Date: Mon, 20 Mar 2023 16:30:13 +0800 Subject: [PATCH] Disable hall sensor in normal & factory mode. Bug: 270639066 Test: Set ro.bootmode=normal and see hall sensor is disabled. Test: Set ro.bootmode=factory and see hall sensor is disabled. Change-Id: Id5666e2e74fdaebd2c79ad65046251f025f54afb Signed-off-by: emilchung --- conf/init.comet.rc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conf/init.comet.rc b/conf/init.comet.rc index 2e6c2e4..3569f09 100644 --- a/conf/init.comet.rc +++ b/conf/init.comet.rc @@ -45,6 +45,13 @@ on post-fs-data on post-fs-data chown bluetooth system /proc/bluetooth/timesync +# Hall sensor +on init && property:ro.bootmode=normal + write /sys/devices/platform/hall_sensor/enable 0 + +on init && property:ro.bootmode=factory + write /sys/devices/platform/hall_sensor/enable 0 + # Haptics on property:vendor.all.modules.ready=1 mkdir /mnt/vendor/persist/haptics 0770 system system