Version 0.3
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
#!/sbin/sh
|
||||||
|
|
||||||
|
#################
|
||||||
|
# Initialization
|
||||||
|
#################
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
# echo before loading util_functions
|
||||||
|
ui_print() { echo "$1"; }
|
||||||
|
|
||||||
|
require_new_magisk() {
|
||||||
|
ui_print "*******************************"
|
||||||
|
ui_print " Please install Magisk v20.4+! "
|
||||||
|
ui_print "*******************************"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# Load util_functions.sh
|
||||||
|
#########################
|
||||||
|
|
||||||
|
OUTFD=$2
|
||||||
|
ZIPFILE=$3
|
||||||
|
|
||||||
|
mount /data 2>/dev/null
|
||||||
|
|
||||||
|
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
|
||||||
|
. /data/adb/magisk/util_functions.sh
|
||||||
|
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
||||||
|
|
||||||
|
install_module
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#MAGISK
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# Samsung XCover 5 GSI Fixes
|
||||||
|
|
||||||
|
This module does the following:
|
||||||
|
- Works around touchscreen bug, where the touchscreen disables after
|
||||||
|
the screen is locked. This is done using a service script which
|
||||||
|
periodically checks if the screen is on and checks touchscreen
|
||||||
|
connection. Workaround originally conceived by febeslmeisl
|
||||||
|
[here](https://github.com/phhusson/treble_experimentations/issues/2205#issuecomment-1079981168).
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
1. Clone this repo and run `pack_module.sh`
|
||||||
|
2. Install the ZIP via Magisk.
|
||||||
|
3. Reboot and enjoy.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
id=XC5_GSI_Fixes
|
||||||
|
name=Samsung XCover 5 GSI Fixes
|
||||||
|
version=0.3
|
||||||
|
versionCode=3
|
||||||
|
author=Emil Kosz
|
||||||
|
description=Fixes touchscreen bug in XCover 5 and likely other Samsung phones with GSIs
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
MODULE_NAME="XC5_GSI_fixes"
|
||||||
|
EXCLUDE="LICENSE README.md pack_module.sh"
|
||||||
|
|
||||||
|
rm -f "${MODULE_NAME}.zip"
|
||||||
|
zip -9 --recurse-paths "${MODULE_NAME}.zip" --exclude $EXCLUDE -- * >/dev/null
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#!/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
|
||||||
|
/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
|
||||||
|
usleep "${FREQ}"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user