create raven touch dump

Bug: 256521567
Test: adb bugreport
Change-Id: Ibf5d74936605f7b0a3a2124bb7df094c60644c23
This commit is contained in:
Adam Shih 2022-11-07 13:08:28 +08:00
parent 02325bb263
commit a4d16cf5a0
6 changed files with 70 additions and 0 deletions

10
touch/lsi/Android.bp Normal file
View file

@ -0,0 +1,10 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_lsi.sh",
src: "dump_lsi.sh",
vendor: true,
sub_dir: "dump",
}

48
touch/lsi/dump_lsi.sh Normal file
View file

@ -0,0 +1,48 @@
#!/vendor/bin/sh
path="/sys/devices/virtual/sec/tsp"
echo "--- Force Touch Active ---"
echo "force_touch_active,2,1" > $path/cmd && cat $path/cmd_result
echo "--- LSI firmware version ---"
cat $path/fw_version
echo "--- LSI touch status ---"
cat $path/status
echo "--- Calibration info ---"
echo "get_mis_cal_info" > $path/cmd && cat $path/cmd_result
echo "--- Mutual Strength ---"
echo "run_delta_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Self Strength ---"
echo "run_self_delta_read_all" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_AMBIENT_DATA ---"
echo "run_rawdata_read_type,3" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_DECODED_DATA ---"
echo "run_rawdata_read_type,5" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_OFFSET_DATA_SEC ---"
echo "run_rawdata_read_type,19" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_NOI_P2P_MIN ---"
echo "run_rawdata_read_type,30" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_NOI_P2P_MAX ---"
echo "run_rawdata_read_type,31" > $path/cmd && cat $path/cmd_result
echo "--- Mutual Raw Cap ---"
echo "run_rawcap_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Self Raw Cap ---"
echo "run_self_rawcap_read_all" > $path/cmd && cat $path/cmd_result
echo "--- CM2 ---"
echo "run_rawcap_high_freq_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Force Touch Active ---"
echo force_touch_active,2,0 > $path/cmd && cat $path/cmd_result

3
touch/lsi/lsi.mk Normal file
View file

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/lsi/sepolicy
PRODUCT_PACKAGES += dump_lsi.sh

View file

@ -0,0 +1,5 @@
pixel_bugreport(dump_lsi)
allow dump_lsi sysfs_touch:dir r_dir_perms;
allow dump_lsi sysfs_touch:file rw_file_perms;
allow dump_lsi vendor_toolbox_exec:file execute_no_trans;

View file

@ -0,0 +1,2 @@
/vendor/bin/dump/dump_lsi\.sh u:object_r:dump_lsi_exec:s0

View file

@ -0,0 +1,2 @@
genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0