sm8450-common: Add touch_report init script
Change-Id: I4db767086b34c46e64cb94a6e4dd20837672d31c
This commit is contained in:
parent
65d0066c06
commit
973b08b277
3 changed files with 150 additions and 1 deletions
|
@ -110,7 +110,9 @@ PRODUCT_PACKAGES_DEBUG += \
|
|||
# Vendor init
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.qcom.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc
|
||||
$(LOCAL_PATH)/rootdir/etc/init.target.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.target.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.touch_report.rc:$(TARGET_COPY_OUT_RECOVERY)/root/vendor/etc/init/init.touch_report.rc \
|
||||
$(LOCAL_PATH)/rootdir/etc/init.touch_report.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.touch_report.rc
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/rootdir/bin/init.class_main.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.class_main.sh \
|
||||
|
|
112
rootdir/etc/init.touch_report.rc
Normal file
112
rootdir/etc/init.touch_report.rc
Normal file
|
@ -0,0 +1,112 @@
|
|||
# Copyright (c) 2017-2022 Xiaomi, Inc.
|
||||
# All Rights Reserved.
|
||||
# Confidential and Proprietary - Xiaomi, Inc.
|
||||
#
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/vendor/mqsas_common 0771 system system
|
||||
mkdir /data/vendor/touch 0771 system system
|
||||
|
||||
on boot
|
||||
chown system system /dev/xiaomi-touch
|
||||
chmod 0664 /dev/xiaomi-touch
|
||||
chown system system /dev/xiaomi-touch-knock
|
||||
chmod 0664 /dev/xiaomi-touch-knock
|
||||
chown system system /dev/xiaomi-thp
|
||||
chmod 0664 /dev/xiaomi-thp
|
||||
chown system system /sys/class/touch/tp_dev/fod_status
|
||||
chmod 0664 /sys/class/touch/tp_dev/fod_status
|
||||
chown system system /sys/class/touch/touch_dev/gesture_single_tap_state
|
||||
chmod 0664 /sys/class/touch/touch_dev/gesture_single_tap_state
|
||||
chown system system /sys/class/touch/touch_dev/fod_press_status
|
||||
chmod 0664 /sys/class/touch/touch_dev/fod_press_status
|
||||
chown system system /proc/tp_selftest
|
||||
chmod 0664 /proc/tp_selftest
|
||||
chown system system /proc/tp_selftest_1
|
||||
chmod 0664 /proc/tp_selftest_1
|
||||
chown system system /sys/class/touch/touch_dev/clicktouch_raw
|
||||
chmod 0664 /sys/class/touch/touch_dev/clicktouch_raw
|
||||
chown system system /sys/class/touch/touch_dev/update_rawdata
|
||||
chmod 0664 /sys/class/touch/touch_dev/update_rawdata
|
||||
chown system system /sys/class/touch/touch_dev/enable_touch_raw
|
||||
chmod 0664 /sys/class/touch/touch_dev/enable_touch_raw
|
||||
chown system system /sys/class/touch/touch_dev/enable_touch_delta
|
||||
chmod 0664 /sys/class/touch/touch_dev/enable_touch_delta
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_dump
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_dump
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_cmd
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_cmd
|
||||
chown system system /sys/class/touch/touch_dev/suspend_state
|
||||
chmod 0664 /sys/class/touch/touch_dev/suspend_state
|
||||
chown system system /sys/class/touch/touch_dev/prox_sensor_data
|
||||
chmod 0664 /sys/class/touch/touch_dev/prox_sensor_data
|
||||
chown system system /sys/class/touch/touch_dev/prox_sensor
|
||||
chmod 0664 /sys/class/touch/touch_dev/prox_sensor
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_rx_num
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_rx_num
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_tx_num
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_tx_num
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_x_resolution
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_x_resolution
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_y_resolution
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_y_resolution
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_smooth
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_smooth
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_noisefilter
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_noisefilter
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_downthd
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_downthd
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_upthd
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_upthd
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_movethd
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_movethd
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_islandthd
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_islandthd
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_cmd_data
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_cmd_data
|
||||
chown system system /sys/class/touch/touch_dev/palm_sensor_data
|
||||
chmod 0664 /sys/class/touch/touch_dev/palm_sensor_data
|
||||
chown system system /sys/class/touch/touch_dev/palm_sensor
|
||||
chmod 0664 /sys/class/touch/touch_dev/palm_sensor
|
||||
chown system system /sys/class/touch/touch_dev/hold_sensor
|
||||
chmod 0664 /sys/class/touch/touch_dev/hold_sensor
|
||||
chown system system /proc/tp_hal_version
|
||||
chmod 0664 /proc/tp_hal_version
|
||||
chown system system /proc/tp_lockdown_info
|
||||
chmod 0664 /proc/tp_lockdown_info
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_active_status
|
||||
chown system system /sys/class/touch/touch_dev/touch_active_status
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_finger_status
|
||||
chown system system /sys/class/touch/touch_dev/touch_finger_status
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_irq_no
|
||||
chown system system /sys/class/touch/touch_dev/touch_irq_no
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_sensor
|
||||
chown system system /sys/class/touch/touch_dev/touch_sensor
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_sensor_ctrl
|
||||
chown system system /sys/class/touch/touch_dev/touch_sensor_ctrl
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_film
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_film
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_mem_notify
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_mem_notify
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_testmode
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_testmode
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_testresult
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_testresult
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_preset_point
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_preset_point
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_doze_analysis
|
||||
chown system system /sys/class/touch/touch_dev/touch_doze_analysis
|
||||
chown system system /sys/class/touch/touch_dev/touch_thp_cmd_ready
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_thp_cmd_ready
|
||||
chmod 0664 /sys/class/touch/touch_dev/touch_ic_buffer
|
||||
chown system system /sys/class/touch/touch_dev/touch_ic_buffer
|
||||
chmod 0664 /sys/class/touch/touch_dev/abnormal_event
|
||||
chown system system /sys/class/touch/touch_dev/abnormal_event
|
||||
|
||||
service touch_report /vendor/bin/touch_report
|
||||
class hal
|
||||
user system
|
||||
group system uhid input
|
||||
capabilities SYS_NICE
|
||||
ioprio rt 4
|
||||
seclabel u:r:touchreport:s0
|
35
sepolicy/vendor/touchreport.te
vendored
Normal file
35
sepolicy/vendor/touchreport.te
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
type touchreport, domain;
|
||||
type touchreport_exec, exec_type, file_type, vendor_file_type;
|
||||
|
||||
init_daemon_domain(touchreport)
|
||||
|
||||
allow touchreport input_device:chr_file rw_file_perms;
|
||||
allow touchreport input_device:dir r_dir_perms;
|
||||
allow touchreport proc_tp_file:file { open read write };
|
||||
allow touchreport proc_tp_lockdown:file { open read write };
|
||||
allow touchreport self:cap_userns sys_nice;
|
||||
allow touchreport self:capability sys_nice;
|
||||
allow touchreport self:tcp_socket { create getattr getopt read setopt write };
|
||||
allow touchreport self:udp_socket { create getattr getopt read setopt write };
|
||||
allow touchreport sysfs_touch_hostprocess:file rw_file_perms;
|
||||
allow touchreport sysfs_touch_hostprocess:file { open read write };
|
||||
allow touchreport sysfs_touch_suspend:file rw_file_perms;
|
||||
allow touchreport sysfs_touch_suspend:file { open read write };
|
||||
allow touchreport sysfs_tp_virtual_prox:file rw_file_perms;
|
||||
allow touchreport sysfs_tp_virtual_prox:file { open read write };
|
||||
allow touchreport touchfeature_device:chr_file rw_file_perms;
|
||||
allow touchreport touchfeature_device:file { getattr map read };
|
||||
allow touchreport touchreport_exec:file entrypoint;
|
||||
allow touchreport uhid_device:chr_file rw_file_perms;
|
||||
allow touchreport vendor_data_touchreport_file:dir { add_name read remove_name search watch write };
|
||||
allow touchreport vendor_data_touchreport_file:file { create getattr open read rename setattr unlink write };
|
||||
allow touchreport vendor_firmware_file:dir r_dir_perms;
|
||||
allow touchreport vendor_firmware_file:dir search;
|
||||
allow touchreport vendor_firmware_file:file r_file_perms;
|
||||
allow touchreport vendor_sysfs_graphics:file { open read };
|
||||
|
||||
recovery_only(`
|
||||
userdebug_or_eng(`
|
||||
permissive touchreport;
|
||||
')
|
||||
')
|
Loading…
Reference in a new issue