summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Blake Kongslie2020-06-19 12:44:50 -0700
committerJulian Blake Kongslie2020-06-19 12:44:50 -0700
commitd5fd2bf4ab2a300c5c9b1431866ed40a8c7e72e2 (patch)
tree17e0b77036524a149289100a935f36e1378b767d
downloadmagisk-disable-hall-sensor-main.tar.xz
Initial commit.HEADmain
-rwxr-xr-xMETA-INF/com/google/android/update-binary23
-rwxr-xr-xMETA-INF/com/google/android/updater-script1
-rw-r--r--module.prop6
-rwxr-xr-xservice.sh10
4 files changed, 40 insertions, 0 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary
new file mode 100755
index 0000000..3d2e088
--- /dev/null
+++ b/META-INF/com/google/android/update-binary
@@ -0,0 +1,23 @@
1#!/system/bin/sh
2
3umask 022
4
5OUTFD="$2"
6ZIPFILE="$3"
7
8echo "OUTFD=$OUTFD"
9echo "ZIPFILE=$ZIPFILE"
10
11ui_print() { echo "$*"; }
12
13set -x
14
15mount /data 2>/dev/null
16
17source /data/adb/magisk/util_functions.sh
18
19ui_print "Verifying that Magisk is new enough"
20[ "$MAGISK_VER_CODE" -ge 20400 ] || exit 1
21
22ui_print "Installing module"
23install_module || exit 1
diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script
new file mode 100755
index 0000000..11d5c96
--- /dev/null
+++ b/META-INF/com/google/android/updater-script
@@ -0,0 +1 @@
#MAGISK
diff --git a/module.prop b/module.prop
new file mode 100644
index 0000000..39f7c10
--- /dev/null
+++ b/module.prop
@@ -0,0 +1,6 @@
1id=jblake-disable-hall-sensor
2name=disable hall sensor
3version=1
4versionCode=1
5author=jblake
6description=Because the cover shouldn't be a power button
diff --git a/service.sh b/service.sh
new file mode 100755
index 0000000..2022216
--- /dev/null
+++ b/service.sh
@@ -0,0 +1,10 @@
1#!/system/bin/sh
2
3set -eux
4
5export MODDIR="${0%/*}"
6
7for EVENT in /sys/bus/platform/drivers/hall/*/input/*/event*; do
8 NODE="$(basename "$EVENT")"
9 rm -rf "/dev/input/$NODE"
10done