From bf333ce566675360acd412007a63a93a967c221f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 18 Dec 2021 07:39:38 -0500 Subject: [PATCH] Fix headset buttons for Xiaomi Mi 11 Lite 5G --- rw-system.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rw-system.sh b/rw-system.sh index 9b7b1b6..157b0bb 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -127,6 +127,7 @@ fixSPL() { } changeKeylayout() { + mpk="/mnt/phh/keylayout" cp -a /system/usr/keylayout /mnt/phh/keylayout changed=false if grep -q vendor.huawei.hardware.biometrics.fingerprint /vendor/etc/vintf/manifest.xml; then @@ -160,7 +161,6 @@ changeKeylayout() { fi if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/daisy; then - mpk="/mnt/phh/keylayout" cp /system/phh/daisy-buttonJack.kl ${mpk}/msm8953-snd-card-mtp_Button_Jack.kl changed=true if [ ! -f /mnt/phh/keylayout/uinput-goodix.kl ]; then @@ -174,6 +174,13 @@ changeKeylayout() { chmod 0644 ${mpk}/uinput* ${mpk}/msm8953* fi + if getprop ro.vendor.build.fingerprint | grep -iq -e xiaomi/renoir; then + mpk="/mnt/phh/keylayout" + cp /system/phh/daisy-buttonJack.kl ${mpk}/lahaina-shimaidp-snd-card_Button_Jack.kl + chmod 0644 ${mpk}/lahaina-shimaidp-snd-card_Button_Jack.kl + changed=true + fi + if getprop ro.vendor.build.fingerprint | grep -qi oneplus/oneplus6/oneplus6; then cp /system/phh/oneplus6-synaptics_s3320.kl /mnt/phh/keylayout/synaptics_s3320.kl chmod 0644 /mnt/phh/keylayout/synaptics_s3320.kl