dumpstate: touch: Add touch_predump for stm

10-01 21:39:00.372 11262 11262 I sh      : type=1400 audit(0.0:20): avc:
denied  { write } for  name="driver_test" dev="proc" ino=4026536282
scontext=u:r:predump_touch:s0 tcontext=u:object_r:proc_touch:s0
tclass=file permissive=1

10-01 21:39:00.432 11265 11265 I cat     : type=1400 audit(0.0:22): avc:
denied  { search } for  name="spi20.0" dev="sysfs" ino=55787
scontext=u:r:predump_touch:s0 tcontext=u:object_r:sysfs_touch:s0
tclass=dir permissive=1

10-01 21:39:00.444 11262 11262 I sh      : type=1400 audit(0.0:25): avc:
denied  { write } for  name="stm_fts_cmd" dev="sysfs" ino=112798
scontext=u:r:predump_touch:s0 tcontext=u:object_r:sysfs_touch:s0
tclass=file permissive=1

Test: b/318578275
Test: Flash on dogfood device and check touch dump logs
Bug: 287907308
Flag: EXEMPT bugfix
Change-Id: I9dade94f96879a269b5db2ebbe9595ea0e099acc
This commit is contained in:
Ravi Jain 2024-03-08 09:13:38 +00:00
parent 15ed5c639e
commit 7d245967c1
10 changed files with 43 additions and 0 deletions

View file

@ -8,3 +8,10 @@ sh_binary {
vendor: true, vendor: true,
sub_dir: "dump", sub_dir: "dump",
} }
sh_binary {
name: "predump_stm.sh",
src: "dump_stm.sh",
vendor: true,
sub_dir: "dump_touch",
}

View file

@ -0,0 +1,3 @@
# touch predump script
type proc_touch, proc_type, fs_type;
type sysfs_touch, sysfs_type, fs_type;

View file

@ -0,0 +1,2 @@
/vendor/bin/dump_touch/predump_stm\.sh u:object_r:predump_touch_exec:s0

View 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

View file

@ -0,0 +1,6 @@
# touch predump script
allow predump_touch proc_touch:file rw_file_perms;
allow predump_touch sysfs_touch:dir search;
allow predump_touch sysfs_touch:file rw_file_perms;
get_prop(predump_touch vendor_touch_dump_path_prop)

View file

@ -0,0 +1,2 @@
# touch predump script
vendor_internal_prop(vendor_touch_dump_path_prop)

View file

@ -0,0 +1,2 @@
ro.vendor.touch.dump. u:object_r:vendor_touch_dump_path_prop:s0

View file

@ -0,0 +1,2 @@
# touch predump script
set_prop(vendor_init, vendor_touch_dump_path_prop)

View 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/predump_sepolicy
PRODUCT_PACKAGES += predump_stm.sh

View 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/predump_sepolicy
PRODUCT_PACKAGES += predump_stm.sh