From 2e0de404b4d5e344cf0e3423d476fc68ab39e21d Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sat, 4 Mar 2023 23:40:10 +0100 Subject: [PATCH] Add vibration settings --- package_vibration.sh | 22 ++++++++++++++++++++++ vibration.files/service.sh | 2 ++ 2 files changed, 24 insertions(+) create mode 100755 package_vibration.sh create mode 100644 vibration.files/service.sh diff --git a/package_vibration.sh b/package_vibration.sh new file mode 100755 index 0000000..89afde9 --- /dev/null +++ b/package_vibration.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +dir=vibration + +rm -rf "$dir" +mkdir -p "$dir" + +cat > "$dir/module.prop" << EOF +id=vibration +name=Vibration intensity setting +version=1 +versionCode=1 +author=me +description= +EOF + +install -Dm755 vibration.files/service.sh \ + "$dir/service.sh" + +./package.sh "$dir" +rm -rf "$dir" diff --git a/vibration.files/service.sh b/vibration.files/service.sh new file mode 100644 index 0000000..010c4b3 --- /dev/null +++ b/vibration.files/service.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo 2000 > /sys/class/leds/vibrator/vmax_mv