mirror of
https://github.com/Evolution-X-Devices/device_google_taimen
synced 2026-01-27 15:59:12 +00:00
sepolicy: Allow adb shell access to ftm4 autotune sysfs node
Bug: 63911898 Change-Id: Id39f48709253ce96ae7910f4e3157e2c2eda558a
This commit is contained in:
@@ -24,6 +24,9 @@ include device/google/wahoo/BoardConfig.mk
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 41943040
|
||||
BOARD_AVB_ENABLE := true
|
||||
|
||||
# sepolicy
|
||||
BOARD_SEPOLICY_DIRS += device/google/taimen/sepolicy
|
||||
|
||||
ifeq (,$(filter-out taimen_clang, $(TARGET_PRODUCT)))
|
||||
# if TARGET_PRODUCT == taimen_clang
|
||||
BOARD_VENDOR_KERNEL_MODULES += \
|
||||
|
||||
@@ -24,6 +24,10 @@ on property:sys.boot_completed=1
|
||||
write /sys/block/dm-0/queue/read_ahead_kb 512
|
||||
write /sys/block/dm-1/queue/read_ahead_kb 512
|
||||
|
||||
on boot
|
||||
# Allow ftm4 autotune from adb shell
|
||||
chown system shell /sys/devices/virtual/input/ftm4_touch/autotune
|
||||
|
||||
on init && property:ro.boot.slot=*
|
||||
# will remove this once slot_suffix is deprecated
|
||||
setprop ro.boot.slot_suffix _${ro.boot.slot}
|
||||
|
||||
1
sepolicy/file.te
Normal file
1
sepolicy/file.te
Normal file
@@ -0,0 +1 @@
|
||||
type sysfs_touch_shell, sysfs_type, fs_type;
|
||||
3
sepolicy/genfs_contexts
Normal file
3
sepolicy/genfs_contexts
Normal file
@@ -0,0 +1,3 @@
|
||||
# ftm4 touch
|
||||
genfscon sysfs /devices/virtual/input/ftm4_touch u:object_r:sysfs_touch:s0
|
||||
genfscon sysfs /devices/virtual/input/ftm4_touch/autotune u:object_r:sysfs_touch_shell:s0
|
||||
3
sepolicy/shell.te
Normal file
3
sepolicy/shell.te
Normal file
@@ -0,0 +1,3 @@
|
||||
# allow adb to access /sys/devices/virtual/input/ftm4_touch/autotune
|
||||
allow shell sysfs_touch:dir search;
|
||||
allow shell sysfs_touch_shell:file rw_file_perms;
|
||||
Reference in New Issue
Block a user