From 37373d808cd82555be7aed58876813755fe75cad Mon Sep 17 00:00:00 2001 From: vgdn1942 Date: Mon, 15 Nov 2021 09:00:07 +0300 Subject: [PATCH 1/2] Add keylayout for Blackview BV9500Plus --- base.mk | 1 + files/bv9500plus-mtk-kpd.kl | 5 +++++ rw-system.sh | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 files/bv9500plus-mtk-kpd.kl diff --git a/base.mk b/base.mk index a0349d8..3655b72 100644 --- a/base.mk +++ b/base.mk @@ -131,6 +131,7 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/zf6-goodixfp.kl:system/phh/zf6-goodixfp.kl \ 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 \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/bv9500plus-mtk-kpd.kl b/files/bv9500plus-mtk-kpd.kl new file mode 100644 index 0000000..724fb50 --- /dev/null +++ b/files/bv9500plus-mtk-kpd.kl @@ -0,0 +1,5 @@ +key 114 VOLUME_DOWN +key 115 VOLUME_UP +key 116 POWER +key 249 ASSIST +key 250 CAMERA diff --git a/rw-system.sh b/rw-system.sh index 5699791..03d903e 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -257,6 +257,12 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.build.fingerprint | grep -q -i -e Blackview/BV9500Plus;then + cp /system/phh/bv9500plus-mtk-kpd.kl /mnt/phh/keylayout/mtk-kpd.kl + chmod 0644 /mnt/phh/keylayout/mtk-kpd.kl + changed=true + fi + if [ "$changed" = true ]; then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout From 187b2ec48439ac2034521e0dc395c801402b654b Mon Sep 17 00:00:00 2001 From: vgdn1942 Date: Mon, 15 Nov 2021 09:19:40 +0300 Subject: [PATCH 2/2] Fix broken USB on Blackview BV9500Plus --- rw-system.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rw-system.sh b/rw-system.sh index 03d903e..e2a8a4f 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -60,7 +60,12 @@ if [ "$vndk" = 26 ];then fi setprop sys.usb.ffs.aio_compat true -setprop persist.adb.nonblocking_ffs false + +if getprop ro.vendor.build.fingerprint | grep -q -i -e Blackview/BV9500Plus;then + setprop persist.adb.nonblocking_ffs true +else + setprop persist.adb.nonblocking_ffs false +fi fixSPL() { if [ "$(getprop ro.product.cpu.abi)" = "armeabi-v7a" ]; then