From d5fd2bf4ab2a300c5c9b1431866ed40a8c7e72e2 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Fri, 19 Jun 2020 12:44:50 -0700 Subject: Initial commit. --- META-INF/com/google/android/update-binary | 23 +++++++++++++++++++++++ META-INF/com/google/android/updater-script | 1 + module.prop | 6 ++++++ service.sh | 10 ++++++++++ 4 files changed, 40 insertions(+) create mode 100755 META-INF/com/google/android/update-binary create mode 100755 META-INF/com/google/android/updater-script create mode 100644 module.prop create mode 100755 service.sh 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 @@ +#!/system/bin/sh + +umask 022 + +OUTFD="$2" +ZIPFILE="$3" + +echo "OUTFD=$OUTFD" +echo "ZIPFILE=$ZIPFILE" + +ui_print() { echo "$*"; } + +set -x + +mount /data 2>/dev/null + +source /data/adb/magisk/util_functions.sh + +ui_print "Verifying that Magisk is new enough" +[ "$MAGISK_VER_CODE" -ge 20400 ] || exit 1 + +ui_print "Installing module" +install_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 @@ +id=jblake-disable-hall-sensor +name=disable hall sensor +version=1 +versionCode=1 +author=jblake +description=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 @@ +#!/system/bin/sh + +set -eux + +export MODDIR="${0%/*}" + +for EVENT in /sys/bus/platform/drivers/hall/*/input/*/event*; do + NODE="$(basename "$EVENT")" + rm -rf "/dev/input/$NODE" +done -- cgit v1.2.3