From 62f63e975d33a253941074286b267bf26f48e28a Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Fri, 21 Feb 2020 16:35:07 +0100 Subject: [PATCH] Include realme rmx1931 detection, set specific kl for dt2w in that case --- base.mk | 3 ++- files/oppo-touchpanel.kl | 2 ++ rw-system.sh | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 files/oppo-touchpanel.kl diff --git a/base.mk b/base.mk index 0f81c66..e1cb049 100644 --- a/base.mk +++ b/base.mk @@ -109,7 +109,8 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/samsung-9810-floating_feature.xml:system/ph/sam-9810-flo_feat.xml \ device/phh/treble/files/mimix3-gpio-keys.kl:system/phh/mimix3-gpio-keys.kl \ device/phh/treble/files/nokia-soc_gpio_keys.kl:system/phh/nokia-soc_gpio_keys.kl \ - device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl + device/phh/treble/files/lenovo-synaptics_dsx.kl:system/phh/lenovo-synaptics_dsx.kl \ + device/phh/treble/files/oppo-touchpanel.kl:system/phh/oppo-touchpanel.kl \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/oppo-touchpanel.kl b/files/oppo-touchpanel.kl new file mode 100644 index 0000000..bfdb225 --- /dev/null +++ b/files/oppo-touchpanel.kl @@ -0,0 +1,2 @@ +key 62 WAKEUP + diff --git a/rw-system.sh b/rw-system.sh index 417019e..5a8df5a 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -129,6 +129,12 @@ changeKeylayout() { changed=true fi + if getprop ro.build.overlay.deviceid |grep -q RMX1931;then + cp /system/phh/oppo-touchpanel.kl /mnt/phh/keylayout/touchpanel.kl + chmod 0644 /mnt/phh/keylayout/touchpanel.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout @@ -147,6 +153,15 @@ fi mount -o remount,ro /system || true mount -o remount,ro / || true +if [ -b /dev/block/bootdevice/by-name/oppodycnvbk ];then + for devname in RMX1931;do + if grep -q $devname /dev/block/bootdevice/by-name/oppodycnvbk;then + setprop ro.build.overlay.deviceid $devname + fi + done +fi + + mkdir -p /mnt/phh/ mount -t tmpfs -o rw,nodev,relatime,mode=755,gid=0 none /mnt/phh || true mkdir /mnt/phh/empty_dir