Make the script run every 500 ms and check every time if the screen is on, add vendor overlay

This commit is contained in:
2025-08-09 11:53:13 +02:00
parent c93cb83991
commit b3dd2165a5
3 changed files with 3 additions and 6 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
id=XC5_GSI_Fixes
name=Samsung XCover 5 GSI Fixes
version=0.3
versionCode=3
version=0.4
versionCode=4
author=Emil Kosz
description=Fixes touchscreen bug in XCover 5 and likely other Samsung phones with GSIs
+1 -4
View File
@@ -1,18 +1,15 @@
#!/system/bin/sh
FREQ=500 # How often to update, in ms.
TS_CHECKED=false
while true; do
SCREEN_ON="$(/system/bin/dumpsys deviceidle | /system/bin/grep mScreenOn | /system/bin/cut -d '=' -f2)"
if [ "${SCREEN_ON}" = true ] && [ "${TS_CHECKED}" = false ]; then
if [ "${SCREEN_ON}" = true ]; then
/system/bin/log -t Magisk -p i "[XC5_GSI_Fixes] Checking touchscreen connection."
/system/bin/echo check_connection > /sys/class/sec/tsp/cmd
RESULT="$(/system/bin/cat /sys/class/sec/tsp/cmd_result | /system/bin/cut -d ':' -f2)"
/system/bin/log -t Magisk -p i "[XC5_GSI_Fixes] Result: ${RESULT}"
TS_CHECKED=true
fi
[ "${SCREEN_ON}" = false ] && TS_CHECKED=false
/system/bin/usleep "${FREQ}"
done
Binary file not shown.