[ALPS03869354] fix tpd auto test fail in factory mode

[Detail]
Fix tpd auto test fail in factory mode due to sysfs nodes
are not allowed to read directly.

[Solution]
update touch setting sysfs policy and add to factory mode

MTK-Commit-Id: d8733ca0938653098f5ec1f5462c1723d8f67894

Change-Id: I3fb6a46cfbf02fe050174501a2606404a53bb2ad
CR-Id: ALPS03869354
Feature: [Android Default] CapTouch
This commit is contained in:
Chang-An Chen 2020-01-18 09:59:45 +08:00
parent ff3021c46e
commit 862cd6725f
4 changed files with 16 additions and 1 deletions

View File

@ -349,3 +349,7 @@ allow factory audiohal_prop:property_service set;
# For Accdet data permission # For Accdet data permission
allow factory sysfs:file { read open }; allow factory sysfs:file { read open };
# For touch auto test
allow factory sysfs_tpd_setting:dir search;
allow factory sysfs_tpd_setting:file { read getattr open };

View File

@ -271,3 +271,7 @@ type mediadrm_vendor_data_file, file_type, data_file_type;
# mtk usb hal # mtk usb hal
type sysfs_dual_role_usb20, fs_type, sysfs_type; type sysfs_dual_role_usb20, fs_type, sysfs_type;
# Touch parameters file
type sysfs_tpd_setting, fs_type, sysfs_type;

View File

@ -375,3 +375,9 @@ allow meta_tst nvram_agent_binder:binder call;
# Operation: P migration # Operation: P migration
# Purpose : Allow meta_tst to write misc partition # Purpose : Allow meta_tst to write misc partition
allow meta_tst block_device:dir search; allow meta_tst block_device:dir search;
# Date : W18.24
# Operation: P migration
# Purpose : Allow meta_tst to access tpd sysfs nodes for CTP test
allow meta_tst sysfs_tpd_setting:dir search;
allow meta_tst sysfs_tpd_setting:file { read getattr open };

View File

@ -44,5 +44,6 @@
/sys/devices/virtual/timed_output/vibrator(/.*)? u:object_r:sysfs_vibrator:s0 /sys/devices/virtual/timed_output/vibrator(/.*)? u:object_r:sysfs_vibrator:s0
/sys/devices/platform/leds-mt65xx/leds(/.*)? u:object_r:sysfs_leds:s0 /sys/devices/platform/leds-mt65xx/leds(/.*)? u:object_r:sysfs_leds:s0
/sys/devices/platform/odm/odm:vibrator@0/leds/vibrator(/.*)? u:object_r:sysfs_vibrator:s0 /sys/devices/platform/odm/odm:vibrator@0/leds/vibrator(/.*)? u:object_r:sysfs_vibrator:s0
/sys/module/tpd_setting(/.*)? u:object_r:sysfs_tpd_setting:s0
/sys/block/mmcblk0rpmb/size u:object_r:access_sys_file:s0 /sys/block/mmcblk0rpmb/size u:object_r:access_sys_file:s0