create focaltech folder for touch
Bug: 256521567 Test: adb bugreport Change-Id: Ibff80f64ca78bd81a5cb5542183866d9a0863ec5
This commit is contained in:
parent
e74c980648
commit
d8180e5dfe
11
touch/focaltech/Android.bp
Normal file
11
touch/focaltech/Android.bp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package {
|
||||||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||||
|
}
|
||||||
|
|
||||||
|
sh_binary {
|
||||||
|
name: "dump_focaltech.sh",
|
||||||
|
src: "dump_focaltech.sh",
|
||||||
|
init_rc: ["init.touch.rc"],
|
||||||
|
vendor: true,
|
||||||
|
sub_dir: "dump",
|
||||||
|
}
|
42
touch/focaltech/dump_focaltech.sh
Normal file
42
touch/focaltech/dump_focaltech.sh
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/vendor/bin/sh
|
||||||
|
path="/proc/focaltech_touch"
|
||||||
|
|
||||||
|
echo "------ Enable Force Touch Active ------"
|
||||||
|
echo 21 > $path/force_active
|
||||||
|
|
||||||
|
echo "------ Touch Firmware Version ------"
|
||||||
|
cat $path/FW_Version
|
||||||
|
|
||||||
|
echo "------ Touch INT PIN Test ------"
|
||||||
|
cat $path/INT_PIN
|
||||||
|
|
||||||
|
echo "------ Get Raw Data - Panel_Differ ------"
|
||||||
|
cat $path/selftest/Panel_Differ
|
||||||
|
|
||||||
|
echo "------ Get Raw Data - Raw ------"
|
||||||
|
cat $path/selftest/Rawdata
|
||||||
|
|
||||||
|
echo "------ Get Raw Data - Baseline ------"
|
||||||
|
cat $path/selftest/Baseline
|
||||||
|
|
||||||
|
echo "------ Get Raw Data - Noise ------"
|
||||||
|
cat $path/selftest/Noise
|
||||||
|
|
||||||
|
echo "------ Get Raw Data - Uniformity ------"
|
||||||
|
cat $path/selftest/Rawdata_Uniformity
|
||||||
|
|
||||||
|
echo "------ Get Scap_CB ------"
|
||||||
|
cat $path/selftest/Scap_CB
|
||||||
|
|
||||||
|
echo "------ Get Scap_Rawdata ------"
|
||||||
|
cat $path/selftest/Scap_Rawdata
|
||||||
|
|
||||||
|
echo "------ Get Short Test ------"
|
||||||
|
cat $path/selftest/Short
|
||||||
|
|
||||||
|
echo "------ Get HeatMap(ms,ss) ------"
|
||||||
|
cat $path/selftest/Strength
|
||||||
|
|
||||||
|
echo "------ Disable Force Touch Active ------"
|
||||||
|
echo 20 > $path/force_active
|
||||||
|
|
3
touch/focaltech/focaltech.mk
Normal file
3
touch/focaltech/focaltech.mk
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/focaltech/sepolicy
|
||||||
|
|
||||||
|
PRODUCT_PACKAGES += dump_focaltech.sh
|
28
touch/focaltech/init.touch.rc
Normal file
28
touch/focaltech/init.touch.rc
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
on property:vendor.device.modules.ready=1
|
||||||
|
chown system system /proc/focaltech_touch/Channel_Num
|
||||||
|
chown system system /proc/focaltech_touch/FW_Version
|
||||||
|
chown system system /proc/focaltech_touch/INT_PIN
|
||||||
|
chown system system /proc/focaltech_touch/force_active
|
||||||
|
chown system system /proc/focaltech_touch/Reset_Pin
|
||||||
|
chown system system /proc/focaltech_touch/fw_grip
|
||||||
|
chown system system /proc/focaltech_touch/fw_palm
|
||||||
|
chown system system /proc/focaltech_touch/heatmap_onoff
|
||||||
|
chown system system /proc/focaltech_touch/mf_mode
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Baseline
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Noise
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Panel_Differ
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Rawdata
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Rawdata_Uniformity
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Scap_CB
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Scap_Rawdata
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Short
|
||||||
|
chown system system /proc/focaltech_touch/selftest/Strength
|
||||||
|
|
||||||
|
# Toggle glove_mode according to touch_sensitivity_mode
|
||||||
|
on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
|
||||||
|
write /proc/focaltech_touch/high_sensitivity 0
|
||||||
|
|
||||||
|
on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
|
||||||
|
write /proc/focaltech_touch/high_sensitivity 1
|
||||||
|
|
||||||
|
|
5
touch/focaltech/sepolicy/dump_focaltech.te
Normal file
5
touch/focaltech/sepolicy/dump_focaltech.te
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
pixel_bugreport(dump_focaltech)
|
||||||
|
|
||||||
|
allow dump_focaltech proc_touch:dir r_dir_perms;
|
||||||
|
allow dump_focaltech proc_touch:file rw_file_perms;
|
||||||
|
allow dump_focaltech vendor_toolbox_exec:file execute_no_trans;
|
2
touch/focaltech/sepolicy/file.te
Normal file
2
touch/focaltech/sepolicy/file.te
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
type proc_touch, proc_type, fs_type;
|
||||||
|
|
2
touch/focaltech/sepolicy/file_contexts
Normal file
2
touch/focaltech/sepolicy/file_contexts
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/vendor/bin/dump/dump_focaltech\.sh u:object_r:dump_focaltech_exec:s0
|
||||||
|
|
3
touch/focaltech/sepolicy/genfs_contexts
Normal file
3
touch/focaltech/sepolicy/genfs_contexts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
genfscon proc /focaltech_touch u:object_r:proc_touch:s0
|
||||||
|
|
||||||
|
|
2
touch/focaltech/sepolicy/vendor_init.te
Normal file
2
touch/focaltech/sepolicy/vendor_init.te
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
allow vendor_init proc_touch:file w_file_perms;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user