dumpstate: touch: Add touch_predump for gti

go/touch_predump

Test: b/318578275
Test: Locally flash and check dump logs on dogfood device
Bug: 287907308
Change-Id: I4a35a9a57c1331d67dfcd1863b57d75a9b804c32
This commit is contained in:
Ravi Jain 2024-03-08 09:09:21 +00:00
parent 8a52cae4dd
commit f7bacf5322
8 changed files with 43 additions and 0 deletions

View File

@ -33,3 +33,19 @@ cc_binary {
], ],
vendor: true, vendor: true,
} }
sh_binary {
name: "predump_gti0.sh",
src: "dump_gti0.sh",
init_rc: ["init.touch.gti0.rc"],
vendor: true,
sub_dir: "dump_touch",
}
sh_binary {
name: "predump_gti1.sh",
src: "dump_gti1.sh",
init_rc: ["init.touch.gti1.rc"],
vendor: true,
sub_dir: "dump_touch",
}

7
touch/gti/predump_gti.mk Normal file
View File

@ -0,0 +1,7 @@
include device/google/gs-common/touch/predump/predump_touch.mk
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/predump_sepolicy
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/ical/sepolicy
PRODUCT_PACKAGES += predump_gti0.sh
PRODUCT_PACKAGES += touch_gti_ical

View File

@ -0,0 +1,6 @@
include device/google/gs-common/touch/gti/predump_gti.mk
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/predump_sepolicy_gti_dual
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/ical/sepolicy_gti_dual
PRODUCT_PACKAGES += predump_gti1.sh

View File

@ -0,0 +1,3 @@
type proc_touch_gti, proc_type, fs_type;
type sysfs_touch_gti, sysfs_type, fs_type;

View File

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

View File

@ -0,0 +1,4 @@
# Touch
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

View File

@ -0,0 +1,4 @@
allow predump_touch proc_touch_gti:dir r_dir_perms;
allow predump_touch proc_touch_gti:file rw_file_perms;
allow predump_touch sysfs_touch_gti:dir r_dir_perms;
allow predump_touch sysfs_touch_gti:file rw_file_perms;

View File

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