Enable DT2W on Tecno KD7

This commit is contained in:
Pierre-Hugues Husson 2022-07-07 12:12:53 -04:00
parent 6335412007
commit bbc2268788
3 changed files with 11 additions and 1 deletions

View File

@ -133,7 +133,8 @@ PRODUCT_COPY_FILES += \
device/phh/treble/files/zf6-googlekey_input.kl:system/phh/zf6-googlekey_input.kl \
device/phh/treble/files/teracube2e-mtk-kpd.kl:system/phh/teracube2e-mtk-kpd.kl \
device/phh/treble/files/bv9500plus-mtk-kpd.kl:system/phh/bv9500plus-mtk-kpd.kl \
device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl
device/phh/treble/files/moto-liber-gpio-keys.kl:system/phh/moto-liber-gpio-keys.kl \
device/phh/treble/files/tecno-touchpanel.kl:system/phh/tecno-touchpanel.kl \
SELINUX_IGNORE_NEVERALLOWS := true

View File

@ -0,0 +1 @@
key 183 WAKEUP

View File

@ -296,6 +296,14 @@ changeKeylayout() {
changed=true
fi
if getprop ro.vendor.build.fingerprint |grep -iq tecno/kd7;then
# Enable dt2w
echo cc1 > /proc/gesture_function
cp /system/phh/tecno-touchpanel.kl /mnt/phh/keylayout/mtk-tpd.kl
chmod 0644 /mnt/phh/keylayout/mtk-tpd.kl
changed=true
fi
if [ "$changed" = true ]; then
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
restorecon -R /system/usr/keylayout