diff --git a/files/sony-gpio-keys.kl b/files/sony-gpio-keys.kl new file mode 100644 index 0000000..85a608b --- /dev/null +++ b/files/sony-gpio-keys.kl @@ -0,0 +1,5 @@ +key 114 VOLUME_DOWN +key 115 VOLUME_UP + +key 528 FOCUS +key 766 CAMERA diff --git a/rw-system.sh b/rw-system.sh index ea43463..f562774 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -80,6 +80,12 @@ changeKeylayout() { changed=true fi + if getprop ro.vendor.build.fingerprint |grep -iq -E -e '^Sony/G834';then + cp /system/phh/sony-gpio-keys.kl /mnt/phh/keylayout/gpio-keys.kl + chmod 0644 /mnt/phh/keylayout/gpio-keys.kl + changed=true + fi + if [ "$changed" == true ];then mount -o bind /mnt/phh/keylayout /system/usr/keylayout restorecon -R /system/usr/keylayout @@ -115,6 +121,11 @@ if getprop ro.hardware |grep -qF qcom && [ -f /sys/class/backlight/panel0-backli setprop persist.sys.qcom-brightness $(cat /sys/class/backlight/panel0-backlight/max_brightness) fi +#Sony don't use Qualcomm HAL, so they don't have their mess +if getprop ro.vendor.build.fingerprint |grep -qE 'Sony/';then + setprop persist.sys.qcom-brightness -1 +fi + if getprop ro.vendor.build.fingerprint |grep -qi oneplus/oneplus6/oneplus6;then resize2fs /dev/block/platform/soc/1d84000.ufshc/by-name/userdata fi