[Sony Xperia (XZ1)] Fix brightness. Partial support for camera button
This commit is contained in:
parent
25e6438ba5
commit
69541d380d
5
files/sony-gpio-keys.kl
Normal file
5
files/sony-gpio-keys.kl
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
key 114 VOLUME_DOWN
|
||||||
|
key 115 VOLUME_UP
|
||||||
|
|
||||||
|
key 528 FOCUS
|
||||||
|
key 766 CAMERA
|
11
rw-system.sh
11
rw-system.sh
@ -80,6 +80,12 @@ changeKeylayout() {
|
|||||||
changed=true
|
changed=true
|
||||||
fi
|
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
|
if [ "$changed" == true ];then
|
||||||
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
|
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
|
||||||
restorecon -R /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)
|
setprop persist.sys.qcom-brightness $(cat /sys/class/backlight/panel0-backlight/max_brightness)
|
||||||
fi
|
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
|
if getprop ro.vendor.build.fingerprint |grep -qi oneplus/oneplus6/oneplus6;then
|
||||||
resize2fs /dev/block/platform/soc/1d84000.ufshc/by-name/userdata
|
resize2fs /dev/block/platform/soc/1d84000.ufshc/by-name/userdata
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user