Support gti proc dump.
Bug: 262796907 Test: TreeHugger build pass. Signed-off-by: Super Liu <supercjliu@google.com> Change-Id: I3dd73b9832c737f7c60639af649ae882e206aa15
This commit is contained in:
parent
26eb4f5f17
commit
dc8a407491
6 changed files with 28 additions and 6 deletions
|
@ -5,6 +5,7 @@ package {
|
||||||
sh_binary {
|
sh_binary {
|
||||||
name: "dump_gti.sh",
|
name: "dump_gti.sh",
|
||||||
src: "dump_gti.sh",
|
src: "dump_gti.sh",
|
||||||
|
init_rc: ["init.touch.gti.rc"],
|
||||||
vendor: true,
|
vendor: true,
|
||||||
sub_dir: "dump",
|
sub_dir: "dump",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
#!/vendor/bin/sh
|
#!/vendor/bin/sh
|
||||||
path="/sys/devices/virtual/goog_touch_interface/gti.0"
|
path="/sys/devices/virtual/goog_touch_interface/gti.0"
|
||||||
|
procfs_path="/proc/goog_touch_interface/gti.0"
|
||||||
|
|
||||||
|
if [[ -d "$procfs_path" ]]; then
|
||||||
|
heatmap_path=$procfs_path
|
||||||
|
else
|
||||||
|
heatmap_path=$path
|
||||||
|
fi
|
||||||
|
|
||||||
echo "------ Force Touch Active ------"
|
echo "------ Force Touch Active ------"
|
||||||
echo 1 > $path/force_active
|
echo 1 > $path/force_active
|
||||||
|
@ -8,22 +15,22 @@ echo "------ Touch Firmware Version ------"
|
||||||
cat $path/fw_ver
|
cat $path/fw_ver
|
||||||
|
|
||||||
echo "------ Get Mutual Sensing Data - Baseline ------"
|
echo "------ Get Mutual Sensing Data - Baseline ------"
|
||||||
cat $path/ms_base
|
cat $heatmap_path/ms_base
|
||||||
|
|
||||||
echo "------ Get Mutual Sensing Data - Delta ------"
|
echo "------ Get Mutual Sensing Data - Delta ------"
|
||||||
cat $path/ms_diff
|
cat $heatmap_path/ms_diff
|
||||||
|
|
||||||
echo "------ Get Mutual Sensing Data - Raw ------"
|
echo "------ Get Mutual Sensing Data - Raw ------"
|
||||||
cat $path/ms_raw
|
cat $heatmap_path/ms_raw
|
||||||
|
|
||||||
echo "------ Get Self Sensing Data - Baseline ------"
|
echo "------ Get Self Sensing Data - Baseline ------"
|
||||||
cat $path/ss_base
|
cat $heatmap_path/ss_base
|
||||||
|
|
||||||
echo "------ Get Self Sensing Data - Delta ------"
|
echo "------ Get Self Sensing Data - Delta ------"
|
||||||
cat $path/ss_diff
|
cat $heatmap_path/ss_diff
|
||||||
|
|
||||||
echo "------ Get Self Sensing Data - Raw ------"
|
echo "------ Get Self Sensing Data - Raw ------"
|
||||||
cat $path/ss_raw
|
cat $heatmap_path/ss_raw
|
||||||
|
|
||||||
echo "------ Self Test ------"
|
echo "------ Self Test ------"
|
||||||
cat $path/self_test
|
cat $path/self_test
|
||||||
|
|
9
touch/gti/init.touch.gti.rc
Normal file
9
touch/gti/init.touch.gti.rc
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
on property:vendor.device.modules.ready=1
|
||||||
|
chown system system /proc/goog_touch_interface
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ms_base
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ms_diff
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ms_raw
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ss_base
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ss_diff
|
||||||
|
chown system system /proc/goog_touch_interface/gti.0/ss_raw
|
|
@ -1,5 +1,7 @@
|
||||||
pixel_bugreport(dump_gti)
|
pixel_bugreport(dump_gti)
|
||||||
|
|
||||||
|
allow dump_gti proc_touch_gti:dir r_dir_perms;
|
||||||
|
allow dump_gti proc_touch_gti:file rw_file_perms;
|
||||||
allow dump_gti sysfs_touch_gti:dir r_dir_perms;
|
allow dump_gti sysfs_touch_gti:dir r_dir_perms;
|
||||||
allow dump_gti sysfs_touch_gti:file rw_file_perms;
|
allow dump_gti sysfs_touch_gti:file rw_file_perms;
|
||||||
allow dump_gti vendor_toolbox_exec:file execute_no_trans;
|
allow dump_gti vendor_toolbox_exec:file execute_no_trans;
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
type proc_touch_gti, proc_type, fs_type;
|
||||||
type sysfs_touch_gti, sysfs_type, fs_type;
|
type sysfs_touch_gti, sysfs_type, fs_type;
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# Touch
|
# Touch
|
||||||
genfscon sysfs /devices/virtual/goog_touch_interface u:object_r:sysfs_touch_gti:s0
|
genfscon sysfs /devices/virtual/goog_touch_interface u:object_r:sysfs_touch_gti:s0
|
||||||
|
genfscon proc /goog_touch_interface u:object_r:proc_touch_gti:s0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue