Override keylayouts on S9/Note9 to include assistant button, and hard press on home to wake up
This commit is contained in:
parent
bdbd72c7da
commit
b01ca6ae48
4
base.mk
4
base.mk
@ -71,3 +71,7 @@ PRODUCT_COPY_FILES += \
|
|||||||
device/phh/treble/twrp/twrp.rc:system/etc/init/twrp.rc \
|
device/phh/treble/twrp/twrp.rc:system/etc/init/twrp.rc \
|
||||||
device/phh/treble/twrp/twrp.sh:system/bin/twrp.sh \
|
device/phh/treble/twrp/twrp.sh:system/bin/twrp.sh \
|
||||||
device/phh/treble/twrp/busybox-armv7l:system/bin/busybox_phh
|
device/phh/treble/twrp/busybox-armv7l:system/bin/busybox_phh
|
||||||
|
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
device/phh/treble/files/samsung-gpio_keys.kl:system/phh/samsung-gpio_keys.kl \
|
||||||
|
device/phh/treble/files/samsung-sec_touchscreen.kl:system/phh/samsung-sec_touchscreen.kl
|
||||||
|
11
files/samsung-gpio_keys.kl
Normal file
11
files/samsung-gpio_keys.kl
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Copyright (C) 2018 The LineageOS Project
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
key 114 VOLUME_DOWN
|
||||||
|
key 115 VOLUME_UP
|
||||||
|
key 116 POWER
|
||||||
|
key 703 ASSIST
|
||||||
|
key 103 SYSTEM_NAVIGATION_UP
|
||||||
|
key 105 SYSTEM_NAVIGATION_LEFT
|
||||||
|
key 106 SYSTEM_NAVIGATION_RIGHT
|
||||||
|
key 108 SYSTEM_NAVIGATION_DOWN
|
29
files/samsung-sec_touchscreen.kl
Normal file
29
files/samsung-sec_touchscreen.kl
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above
|
||||||
|
# copyright notice, this list of conditions and the following
|
||||||
|
# disclaimer in the documentation and/or other materials provided
|
||||||
|
# with the distribution.
|
||||||
|
# * Neither the name of The Linux Foundation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||||
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||||
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
key 172 WAKEUP
|
||||||
|
|
21
rw-system.sh
21
rw-system.sh
@ -40,6 +40,25 @@ fixSPL() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeKeylayout() {
|
||||||
|
cp -a /system/usr/keylayout /mnt/phh/keylayout
|
||||||
|
changed=false
|
||||||
|
|
||||||
|
if getprop ro.vendor.build.fingerprint | \
|
||||||
|
grep -qE -e ".*(crown|star)[q2]*lte.*" -e ".*(SC-0[23]K|SCV3[89]).*";then
|
||||||
|
changed=true
|
||||||
|
|
||||||
|
cp /system/phh/samsung-gpio_keys.kl /mnt/phh/keylayout/gpio_keys.kl
|
||||||
|
cp /system/phh/samsung-sec_touchscreen.kl /mnt/phh/keylayout/sec_touchscreen.kl
|
||||||
|
chmod 0644 /mnt/phh/keylayout/gpio_keys.kl /mnt/phh/keylayout/sec_touchscreen.kl
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$changed" == true ];then
|
||||||
|
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
|
||||||
|
restorecon -R /system/usr/keylayout
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
if mount -o remount,rw /system;then
|
if mount -o remount,rw /system;then
|
||||||
resize2fs $(grep ' /system ' /proc/mounts |cut -d ' ' -f 1) || true
|
resize2fs $(grep ' /system ' /proc/mounts |cut -d ' ' -f 1) || true
|
||||||
elif mount -o remount,rw /;then
|
elif mount -o remount,rw /;then
|
||||||
@ -54,6 +73,8 @@ set +e
|
|||||||
fixSPL
|
fixSPL
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
changeKeylayout
|
||||||
|
|
||||||
if grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml;then
|
if grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml;then
|
||||||
mount -o bind system/phh/huawei/fingerprint.kl /vendor/usr/keylayout/fingerprint.kl
|
mount -o bind system/phh/huawei/fingerprint.kl /vendor/usr/keylayout/fingerprint.kl
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user