Snap for 9343563 from 561d23c356e5389051e05c6bf9c2e162d0df7388 to udc-release
Change-Id: I1e28b83b3a9723545b22d01d4ccf0773923d209a
This commit is contained in:
commit
1918f18e9e
10
touch/stm/Android.bp
Normal file
10
touch/stm/Android.bp
Normal file
@ -0,0 +1,10 @@
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
sh_binary {
|
||||
name: "dump_stm.sh",
|
||||
src: "dump_stm.sh",
|
||||
vendor: true,
|
||||
sub_dir: "dump",
|
||||
}
|
67
touch/stm/dump_stm.sh
Normal file
67
touch/stm/dump_stm.sh
Normal file
@ -0,0 +1,67 @@
|
||||
#!/vendor/bin/sh
|
||||
spi=`getprop ro.vendor.touch.dump.sys`
|
||||
proc=`getprop ro.vendor.touch.dump.proc`
|
||||
|
||||
echo "------ Force Set AP as Bus Owner with Bugreport Flag ------"
|
||||
echo A0 01 01 > $proc
|
||||
|
||||
echo "------ STM touch firmware version ------"
|
||||
cat $spi/appid
|
||||
|
||||
echo "------ STM touch status ------"
|
||||
cat $spi/status
|
||||
|
||||
echo "------ Mutual Raw ------"
|
||||
echo 13 00 01 > $spi/stm_fts_cmd && cat $spi/stm_fts_cmd
|
||||
|
||||
echo "------ Mutual Strength ------"
|
||||
echo 17 01 > $spi/stm_fts_cmd && cat $spi/stm_fts_cmd
|
||||
|
||||
echo "------ Self Raw ------"
|
||||
echo 15 00 01 > $spi/stm_fts_cmd && cat $spi/stm_fts_cmd
|
||||
|
||||
echo "------ Mutual Raw Data ------"
|
||||
echo 23 00 > $proc && cat $proc
|
||||
|
||||
echo "------ Mutual Baseline Data ------"
|
||||
echo 23 03 > $proc && cat $proc
|
||||
|
||||
echo "------ Mutual Strength Data ------"
|
||||
echo 23 02 > $proc && cat $proc
|
||||
|
||||
echo "------ Self Raw Data ------"
|
||||
echo 24 00 > $proc && cat $proc
|
||||
|
||||
echo "------ Self Baseline Data ------"
|
||||
echo 24 03 > $proc && cat $proc
|
||||
|
||||
echo "------ Self Strength Data ------"
|
||||
echo 24 02 > $proc && cat $proc
|
||||
|
||||
echo "------ Mutual Compensation ------"
|
||||
echo 32 10 > $proc && cat $proc
|
||||
|
||||
echo "------ Mutual Low Power Compensation ------"
|
||||
echo 32 11 > $proc && cat $proc
|
||||
|
||||
echo "------ Self Compensation ------"
|
||||
echo 33 12 > $proc && cat $proc
|
||||
|
||||
echo "------ Golden Mutual Raw Data ------"
|
||||
echo 34 > $proc && cat $proc
|
||||
|
||||
echo "------ Packaging Plant - HW reset ------"
|
||||
echo 01 FA 20 00 00 24 80 > $proc
|
||||
|
||||
echo "------ Packaging Plant - Hibernate Memory ------"
|
||||
echo 01 FA 20 00 00 68 08 > $proc
|
||||
|
||||
echo "------ Packaging Plant - Read 16 bytes from Address 0x00041FD8 ------"
|
||||
echo 02 FB 00 04 3F D8 00 10 01 > $proc && cat $proc
|
||||
|
||||
echo "------ ITO Raw ------"
|
||||
echo 01 > $spi/stm_fts_cmd && cat $spi/stm_fts_cmd
|
||||
|
||||
echo "------ Restore Bus Owner ------"
|
||||
echo A0 00 01 > $proc
|
||||
|
8
touch/stm/sepolicy/dump_stm.te
Normal file
8
touch/stm/sepolicy/dump_stm.te
Normal file
@ -0,0 +1,8 @@
|
||||
pixel_bugreport(dump_stm)
|
||||
|
||||
allow dump_stm proc_touch:file rw_file_perms;
|
||||
allow dump_stm sysfs_touch:dir search;
|
||||
allow dump_stm sysfs_touch:file rw_file_perms;
|
||||
allow dump_stm vendor_toolbox_exec:file execute_no_trans;
|
||||
|
||||
get_prop(dump_stm vendor_touch_dump_path_prop)
|
2
touch/stm/sepolicy/file.te
Normal file
2
touch/stm/sepolicy/file.te
Normal file
@ -0,0 +1,2 @@
|
||||
type proc_touch, proc_type, fs_type;
|
||||
type sysfs_touch, sysfs_type, fs_type;
|
2
touch/stm/sepolicy/file_contexts
Normal file
2
touch/stm/sepolicy/file_contexts
Normal file
@ -0,0 +1,2 @@
|
||||
/vendor/bin/dump/dump_stm\.sh u:object_r:dump_stm_exec:s0
|
||||
|
7
touch/stm/sepolicy/genfs_contexts
Normal file
7
touch/stm/sepolicy/genfs_contexts
Normal file
@ -0,0 +1,7 @@
|
||||
genfscon sysfs /devices/platform/111d0000.spi/spi_master/spi20/spi20.0 u:object_r:sysfs_touch:s0
|
||||
genfscon sysfs /devices/platform/10d40000.spi/spi_master/spi11/spi11.0 u:object_r:sysfs_touch:s0
|
||||
genfscon sysfs /devices/platform/10950000.spi/spi_master/spi6/spi6.0 u:object_r:sysfs_touch:s0
|
||||
|
||||
genfscon proc /fts/driver_test u:object_r:proc_touch:s0
|
||||
genfscon proc /fts_ext/driver_test u:object_r:proc_touch:s0
|
||||
|
2
touch/stm/sepolicy/property.te
Normal file
2
touch/stm/sepolicy/property.te
Normal file
@ -0,0 +1,2 @@
|
||||
vendor_internal_prop(vendor_touch_dump_path_prop)
|
||||
|
2
touch/stm/sepolicy/property_contexts
Normal file
2
touch/stm/sepolicy/property_contexts
Normal file
@ -0,0 +1,2 @@
|
||||
ro.vendor.touch.dump. u:object_r:vendor_touch_dump_path_prop:s0
|
||||
|
6
touch/stm/stm11.mk
Normal file
6
touch/stm/stm11.mk
Normal file
@ -0,0 +1,6 @@
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi11/spi11.0
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.proc=/proc/fts/driver_test
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/stm/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_stm.sh
|
6
touch/stm/stm20.mk
Normal file
6
touch/stm/stm20.mk
Normal file
@ -0,0 +1,6 @@
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi20/spi20.0
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.proc=/proc/fts/driver_test
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/stm/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_stm.sh
|
6
touch/stm/stm6.mk
Normal file
6
touch/stm/stm6.mk
Normal file
@ -0,0 +1,6 @@
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi6/spi6.0
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.proc=/proc/fts_ext/driver_test
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/stm/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_stm.sh
|
Loading…
x
Reference in New Issue
Block a user