From 1fb124f8d30fc2a0bf0ddce2ff5d9d89453c64a1 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Sat, 20 Jun 2020 20:11:04 +0200 Subject: [PATCH] Add Redmagic 5G DT2Z KL --- base.mk | 3 ++- files/nubia-nubia_synaptics_dsx.kl | 1 + rw-system.sh | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 files/nubia-nubia_synaptics_dsx.kl diff --git a/base.mk b/base.mk index a8b81e5..28325b4 100644 --- a/base.mk +++ b/base.mk @@ -120,7 +120,8 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/moto-uinput-egis.kl:system/phh/moto-uinput-egis.kl \ device/phh/treble/files/daisy-buttonJack.kl:system/phh/daisy-buttonJack.kl \ device/phh/treble/files/daisy-uinput-fpc.kl:system/phh/daisy-uinput-fpc.kl \ - device/phh/treble/files/daisy-uinput-goodix.kl:system/phh/daisy-uinput-goodix.kl + device/phh/treble/files/daisy-uinput-goodix.kl:system/phh/daisy-uinput-goodix.kl \ + device/phh/treble/files/nubia-nubia_synaptics_dsx.kl:system/phh/nubia-nubia_synaptics_dsx.kl SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/nubia-nubia_synaptics_dsx.kl b/files/nubia-nubia_synaptics_dsx.kl new file mode 100644 index 0000000..fbc5173 --- /dev/null +++ b/files/nubia-nubia_synaptics_dsx.kl @@ -0,0 +1 @@ +key 0x44 POWER diff --git a/rw-system.sh b/rw-system.sh index 81cc487..c57273e 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -169,6 +169,12 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.build.fingerprint |grep -q -e nubia/NX659;then + cp /system/phh/nubia-nubia_synaptics_dsx.kl /mnt/phh/keylayout/nubia_synaptics_dsx.kl + chmod 0644 /mnt/phh/keylayout/nubia_synaptics_dsx.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout