You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
361 lines
17 KiB
361 lines
17 KiB
# Copyright (c) 2013-2018,2020, The Linux Foundation. All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions are
|
|
# met:
|
|
# * Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# * Redistributions in binary form must reproduce the above
|
|
# copyright notice, this list of conditions and the following
|
|
# disclaimer in the documentation and/or other materials provided
|
|
# with the distribution.
|
|
# * Neither the name of The Linux Foundation nor the names of its
|
|
# contributors may be used to endorse or promote products derived
|
|
# from this software without specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
#
|
|
|
|
import /vendor/etc/init/hw/init.samsung.bsp.rc
|
|
import /vendor/etc/init/hw/init.samsung.power.rc
|
|
import /vendor/etc/init/hw/init.samsung.display.rc
|
|
|
|
on early-init
|
|
mkdir /mnt/vendor/efs 0771 radio system
|
|
mkdir /mnt/vendor/persist 0771 root system
|
|
|
|
mkdir /efs/taas 0770 system system
|
|
mkdir /mnt/vendor/efs/taas 0770 system system
|
|
chown system system /dev/tspio
|
|
chown system system /dev/tsp_data
|
|
chown system system /sys/class/sec/tsp/input/enabled
|
|
chown system system /sys/class/sec/tsp1/input/enabled
|
|
chown system system /sys/class/sec/tsp2/input/enabled
|
|
chown system system /sys/class/sec/sec_epen/input/enabled
|
|
chown system system /sys/class/sec/tsp/enabled
|
|
chown system system /sys/class/sec/tsp1/enabled
|
|
chown system system /sys/class/sec/tsp2/enabled
|
|
chown system system /sys/class/sec/sec_epen/enabled
|
|
|
|
# pogo keyboard
|
|
chown system system /sys/class/sec/sec_keypad/fw_update
|
|
|
|
on init
|
|
symlink /dev/block/bootdevice/by-name/steady /dev/block/steady
|
|
symlink /dev/block/bootdevice/by-name/persistent /dev/block/persistent
|
|
|
|
chown system radio /sys/class/sec/switch/afc_disable
|
|
|
|
on early-boot
|
|
|
|
# Vibrator
|
|
chown system system /sys/class/timed_output/vibrator/intensity
|
|
chown system system /sys/class/timed_output/vibrator/force_touch_intensity
|
|
chown system system /sys/class/timed_output/vibrator/multi_freq
|
|
chown system system /sys/class/timed_output/vibrator/haptic_engine
|
|
chown system system /sys/class/timed_output/vibrator/cp_trigger_index
|
|
chown system system /sys/class/timed_output/vibrator/cp_trigger_queue
|
|
chown system system /sys/class/timed_output/vibrator/num_waves
|
|
chown system system /sys/class/timed_output/vibrator/motor_type
|
|
chown system system /sys/class/timed_output/vibrator/event_cmd
|
|
chown system system /sys/class/timed_output/vibrator/pattern_length
|
|
chown system system /sys/class/timed_output/vibrator/ext_control
|
|
chown system system /sys/class/timed_output/vibrator/vibe_state
|
|
chown system system /sys/class/timed_output/vibrator/intensities
|
|
chown system system /sys/class/timed_output/vibrator/haptic_intensities
|
|
chown system system /sys/class/timed_output/vibrator/fifo
|
|
chown system system /sys/class/timed_output/vibrator/hybrid_haptic_engine
|
|
chown system system /sys/class/timed_output/vibrator/use_sep_index
|
|
|
|
chown system system /sys/class/leds/vibrator/intensity
|
|
chown system system /sys/class/leds/vibrator/force_touch_intensity
|
|
chown system system /sys/class/leds/vibrator/multi_freq
|
|
chown system system /sys/class/leds/vibrator/haptic_engine
|
|
chown system system /sys/class/leds/vibrator/cp_trigger_index
|
|
chown system system /sys/class/leds/vibrator/cp_trigger_queue
|
|
chown system system /sys/class/leds/vibrator/num_waves
|
|
chown system system /sys/class/leds/vibrator/motor_type
|
|
chown system system /sys/class/leds/vibrator/event_cmd
|
|
chown system system /sys/class/leds/vibrator/pattern_length
|
|
chown system system /sys/class/leds/vibrator/ext_control
|
|
chown system system /sys/class/leds/vibrator/vibe_state
|
|
chown system system /sys/class/leds/vibrator/intensities
|
|
chown system system /sys/class/leds/vibrator/haptic_intensities
|
|
chown system system /sys/class/leds/vibrator/fifo
|
|
chown system system /sys/class/leds/vibrator/hybrid_haptic_engine
|
|
|
|
chown system system /sys/class/sec_vib_inputff/control/use_sep_index
|
|
|
|
chmod 660 /sys/class/timed_output/vibrator/intensity
|
|
chmod 660 /sys/class/timed_output/vibrator/force_touch_intensity
|
|
chmod 660 /sys/class/timed_output/vibrator/multi_freq
|
|
chmod 660 /sys/class/timed_output/vibrator/haptic_engine
|
|
chmod 660 /sys/class/timed_output/vibrator/cp_trigger_index
|
|
chmod 660 /sys/class/timed_output/vibrator/cp_trigger_queue
|
|
chmod 660 /sys/class/timed_output/vibrator/num_waves
|
|
chmod 660 /sys/class/timed_output/vibrator/motor_type
|
|
chmod 660 /sys/class/timed_output/vibrator/event_cmd
|
|
chmod 660 /sys/class/timed_output/vibrator/pattern_length
|
|
chmod 660 /sys/class/timed_output/vibrator/ext_control
|
|
chmod 660 /sys/class/timed_output/vibrator/vibe_state
|
|
chmod 660 /sys/class/timed_output/vibrator/intensities
|
|
chmod 660 /sys/class/timed_output/vibrator/haptic_intensities
|
|
chmod 660 /sys/class/timed_output/vibrator/fifo
|
|
chmod 660 /sys/class/timed_output/vibrator/hybrid_haptic_engine
|
|
|
|
chmod 660 /sys/class/leds/vibrator/intensity
|
|
chmod 660 /sys/class/leds/vibrator/force_touch_intensity
|
|
chmod 660 /sys/class/leds/vibrator/multi_freq
|
|
chmod 660 /sys/class/leds/vibrator/haptic_engine
|
|
chmod 660 /sys/class/leds/vibrator/cp_trigger_index
|
|
chmod 660 /sys/class/leds/vibrator/cp_trigger_queue
|
|
chmod 660 /sys/class/leds/vibrator/num_waves
|
|
chmod 660 /sys/class/leds/vibrator/motor_type
|
|
chmod 660 /sys/class/leds/vibrator/event_cmd
|
|
chmod 660 /sys/class/leds/vibrator/pattern_length
|
|
chmod 660 /sys/class/leds/vibrator/ext_control
|
|
chmod 660 /sys/class/leds/vibrator/vibe_state
|
|
chmod 660 /sys/class/leds/vibrator/intensities
|
|
chmod 660 /sys/class/leds/vibrator/haptic_intensities
|
|
chmod 660 /sys/class/leds/vibrator/fifo
|
|
chmod 660 /sys/class/leds/vibrator/hybrid_haptic_engine
|
|
|
|
# Create carrier folder for HiddenMenu
|
|
on post-fs
|
|
mkdir /efs/carrier 0755 system system
|
|
restorecon_recursive /efs
|
|
|
|
restorecon_recursive /mnt/vendor/efs
|
|
chown radio system /mnt/vendor/efs
|
|
chmod 0771 /mnt/vendor/efs
|
|
|
|
chown system radio /efs
|
|
chmod 0771 /efs
|
|
restorecon /efs
|
|
|
|
# carrier partition
|
|
chown system system /carrier
|
|
chmod 0771 /carrier
|
|
restorecon /carrier
|
|
|
|
# Meta event
|
|
chown system radio /sys/class/sensors/sensor_dev/flush
|
|
|
|
# Fingerprint sensor
|
|
chmod 0660 /dev/goodix_fp
|
|
chown system system /dev/goodix_fp
|
|
chown system radio /sys/class/fingerprint/fingerprint/type_check
|
|
chown system radio /sys/class/fingerprint/fingerprint/name
|
|
chown system radio /sys/class/fingerprint/fingerprint/vendor
|
|
chown system radio /sys/class/fingerprint/fingerprint/adm
|
|
chown system radio /sys/class/fingerprint/fingerprint/bfs_values
|
|
chown system radio /sys/class/fingerprint/fingerprint/rb
|
|
mkdir /efs/biometrics 0770 system system
|
|
mkdir /efs/biometrics/meta 0770 system system
|
|
|
|
# spu partition
|
|
chown system system /spu
|
|
chmod 0771 /spu
|
|
restorecon /spu
|
|
|
|
on boot
|
|
# Permissions for Touchscreen
|
|
chown system radio /sys/class/sec/tsp/cmd
|
|
chown system system /sys/class/sec/tsp/input/enabled
|
|
chmod 0660 /sys/class/sec/tsp/input/enabled
|
|
chown system system /sys/class/sec/tsp/enabled
|
|
chmod 0660 /sys/class/sec/tsp/enabled
|
|
chown system system /sys/class/sec/tsp/input/fod_pressed
|
|
chown root system /proc/tsp_msg
|
|
chmod 0440 /proc/tsp_msg
|
|
chown system radio /sys/class/sec/tsp/pressure_enable
|
|
chown system system /sys/class/sec/tsp/multi_count
|
|
chown system system /sys/class/sec/tsp/wet_mode
|
|
chown system system /sys/class/sec/tsp/noise_mode
|
|
chown system system /sys/class/sec/tsp/comm_err_count
|
|
chown system system /sys/class/sec/tsp/checksum
|
|
chown system system /sys/class/sec/tsp/holding_time
|
|
chown system system /sys/class/sec/tsp/all_touch_count
|
|
chown system system /sys/class/sec/tsp/z_value
|
|
chown system system /sys/class/sec/tsp/sensitivity_mode
|
|
chown system system /sys/class/sec/tsp/prox_power_off
|
|
chown system system /sys/class/sec/tsp/irq_recovery_count
|
|
chown system system /sys/class/sec/tsp/ic_reset_count
|
|
chown system system /sys/class/sec/tsp/mode_change_failed_count
|
|
chown system system /sys/class/sec/sec_key/key_pressed_count
|
|
chown system system /dev/tspio
|
|
chown system system /sys/class/sec/tsp/ear_detect_enable
|
|
chown system system /sys/class/sec/tsp/ta_mode
|
|
chown system system /sys/class/sec/tsp/virtual_prox
|
|
chown system system /sys/class/sec/tsp/hw_param
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_event
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_type
|
|
|
|
# Permissions for Touchscreen-1
|
|
chown system radio /sys/class/sec/tsp1/cmd
|
|
chown system system /sys/class/sec/tsp1/input/enabled
|
|
chmod 0660 /sys/class/sec/tsp1/input/enabled
|
|
chown system system /sys/class/sec/tsp1/multi_count
|
|
chown system system /sys/class/sec/tsp1/wet_mode
|
|
chown system system /sys/class/sec/tsp1/noise_mode
|
|
chown system system /sys/class/sec/tsp1/comm_err_count
|
|
chown system system /sys/class/sec/tsp1/checksum
|
|
chown system system /sys/class/sec/tsp1/all_touch_count
|
|
chown system system /sys/class/sec/tsp1/z_value
|
|
chown system system /sys/class/sec/tsp1/sensitivity_mode
|
|
chown system system /sys/class/sec/tsp1/prox_power_off
|
|
chown system system /sys/class/sec/tsp1/ic_reset_count
|
|
chown system system /sys/class/sec/tsp1/mode_change_failed_count
|
|
|
|
# Permissions for Touchscreen-2
|
|
chown system radio /sys/class/sec/tsp2/cmd
|
|
chown system system /sys/class/sec/tsp2/input/enabled
|
|
chmod 0660 /sys/class/sec/tsp2/input/enabled
|
|
chown system system /sys/class/sec/tsp2/multi_count
|
|
chown system system /sys/class/sec/tsp2/wet_mode
|
|
chown system system /sys/class/sec/tsp2/noise_mode
|
|
chown system system /sys/class/sec/tsp2/comm_err_count
|
|
chown system system /sys/class/sec/tsp2/checksum
|
|
chown system system /sys/class/sec/tsp2/all_touch_count
|
|
chown system system /sys/class/sec/tsp2/z_value
|
|
chown system system /sys/class/sec/tsp2/sensitivity_mode
|
|
chown system system /sys/class/sec/tsp2/prox_power_off
|
|
chown system system /sys/class/sec/tsp2/ic_reset_count
|
|
chown system system /sys/class/sec/tsp2/mode_change_failed_count
|
|
|
|
# Permissions for Wacom
|
|
chown system radio /sys/class/sec/sec_epen/cmd
|
|
chown system system /sys/class/sec/sec_epen/input/enabled
|
|
chmod 0660 /sys/class/sec/sec_epen/input/enabled
|
|
chown system system /sys/class/sec/sec_epen/enabled
|
|
chmod 0660 /sys/class/sec/sec_epen/enabled
|
|
chown system radio /sys/class/sec/sec_epen/epen_firm_update
|
|
chown system radio /sys/class/sec/sec_epen/epen_reset
|
|
chown system radio /sys/class/sec/sec_epen/epen_reset_result
|
|
chown system radio /sys/class/sec/sec_epen/epen_checksum
|
|
chown system radio /sys/class/sec/sec_epen/epen_checksum_result
|
|
chown system radio /sys/class/sec/sec_epen/epen_saving_mode
|
|
chown system radio /sys/class/sec/sec_epen/epen_wcharging_mode
|
|
chown system radio /sys/class/sec/sec_epen/epen_ble_charging_mode
|
|
chown system radio /sys/class/sec/sec_epen/keyboard_mode
|
|
chown system radio /sys/class/sec/sec_epen/epen_disable_mode
|
|
chown system radio /sys/class/sec/sec_epen/aod_enable
|
|
chown system radio /sys/class/sec/sec_epen/aod_lcd_onoff_status
|
|
chown system radio /sys/class/sec/sec_epen/screen_off_memo_enable
|
|
chown system radio /sys/class/sec/sec_epen/dex_enable
|
|
chown system radio /sys/class/sec/sec_epen/epen_fac_garage_mode
|
|
chown system radio /sys/class/sec/sec_epen/epen_fac_select_firmware
|
|
chown system system /sys/class/sec/sec_epen/abnormal_reset_count
|
|
chown system system /sys/class/sec/sec_epen/i2c_fail_count
|
|
chown system system /sys/class/sec/sec_epen/pen_out_count
|
|
chown system system /sys/class/sec/sec_epen/hw_param
|
|
|
|
# Permission for Securetouch
|
|
chown system system /sys/class/sec/ss_touch/secure/secure_touch_enable
|
|
chown system system /sys/class/sec/ss_touch/secure/trusted_touch_enable
|
|
chown system system /sys/class/sec/ss_touch/secure/trusted_touch_event
|
|
chown system system /sys/class/sec/ss_touch/secure/trusted_touch_type
|
|
chown system system /sys/class/sec/tsp/input/secure_touch_enable
|
|
chown system system /sys/class/sec/tsp1/input/secure_touch_enable
|
|
chown system system /sys/class/sec/tsp2/input/secure_touch_enable
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_event
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_type
|
|
|
|
# Key
|
|
chown system radio /sys/class/sec/sec_key/wakeup_keys
|
|
write /sys/class/sec/sec_key/wakeup_keys 116,172
|
|
chown system system /sys/class/sec/sec_key/key_pressed_count
|
|
chown system radio /sys/class/sec/sec_sidekey/cmd
|
|
chown system system /sys/class/sec/sec_sidekey/input/enabled
|
|
chmod 0660 /sys/class/sec/sec_sidekey/input/enabled
|
|
|
|
# Permission for Keyboard
|
|
chown system system /sys/class/sec/sec_keypad/enabled
|
|
chmod 0660 /sys/class/sec/sec_keypad/enabled
|
|
|
|
# TAAS
|
|
chown system system /mnt/vendor/efs/taas
|
|
chown system system /mnt/vendor/efs/taas/taas
|
|
chmod 0770 /mnt/vendor/efs/taas
|
|
chmod 0660 /mnt/vendor/efs/taas/taas
|
|
|
|
chown system system /mnt/vendor/efs/taas/taaslog
|
|
chmod 0660 /mnt/vendor/efs/taas/taaslog
|
|
|
|
chown system system /efs/taas/taaslog
|
|
chmod 0660 /efs/taas/taaslog
|
|
|
|
# Permission for nfc, eSE driver
|
|
chmod 0660 /dev/pn547
|
|
chmod 0660 /dev/p61
|
|
chown nfc nfc /dev/pn547
|
|
chown system system /dev/p61
|
|
chmod 0660 /dev/sec-nfc
|
|
chown nfc nfc /dev/sec-nfc
|
|
|
|
# Permissions for FMM
|
|
chown system system /sys/class/sec/sec_debug/FMM_lock
|
|
chmod 0660 /sys/class/sec/sec_debug/FMM_lock
|
|
|
|
# Permissions for Performance
|
|
chown root system /sys/devices/platform/soc/5000000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_clock_mhz
|
|
chown root system /sys/devices/platform/soc/5000000.qcom,kgsl-3d0/kgsl/kgsl-3d0/min_clock_mhz
|
|
chmod 0664 /sys/devices/platform/soc/5000000.qcom,kgsl-3d0/kgsl/kgsl-3d0/max_clock_mhz
|
|
chmod 0664 /sys/devices/platform/soc/5000000.qcom,kgsl-3d0/kgsl/kgsl-3d0/min_clock_mhz
|
|
chown root system /dev/stune/top-app/schedtune.boost
|
|
chmod 0664 /dev/stune/top-app/schedtune.boost
|
|
chown system system /sys/class/input_booster/level
|
|
chown system system /sys/class/input_booster/head
|
|
chown system system /sys/class/input_booster/tail
|
|
chown system system /sys/class/input_booster/touchkey/level
|
|
chown system system /sys/class/input_booster/touchkey/freq
|
|
chown system system /sys/class/input_booster/touchkey/time
|
|
chmod 0664 /sys/class/input_booster/level
|
|
chmod 0664 /sys/class/input_booster/head
|
|
chmod 0664 /sys/class/input_booster/tail
|
|
chmod 0664 /sys/class/input_booster/touchkey/level
|
|
chmod 0664 /sys/class/input_booster/touchkey/freq
|
|
chmod 0664 /sys/class/input_booster/touchkey/time
|
|
chown root system /sys/class/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/min_freq
|
|
chown root system /sys/class/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/max_freq
|
|
chmod 0664 /sys/class/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/min_freq
|
|
chmod 0664 /sys/class/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/max_freq
|
|
|
|
# enabled permission
|
|
on property:sys.boot_completed=1
|
|
chown system system /sys/class/sec/tsp/input/enabled
|
|
chown system system /sys/class/sec/tsp1/input/enabled
|
|
chown system system /sys/class/sec/tsp2/input/enabled
|
|
chown system system /sys/class/sec/sec_epen/input/enabled
|
|
chown system system /sys/class/sec/tsp/enabled
|
|
chown system system /sys/class/sec/tsp1/enabled
|
|
chown system system /sys/class/sec/tsp2/enabled
|
|
chown system system /sys/class/sec/sec_epen/enabled
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_enable
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_event
|
|
chown system system /sys/class/sec/tsp/input/trusted_touch_type
|
|
chown system system /sys/class/sec/tsp1/input/trusted_touch_enable
|
|
chown system system /sys/class/sec/tsp1/input/trusted_touch_event
|
|
chown system system /sys/class/sec/tsp1/input/trusted_touch_type
|
|
chown system system /sys/class/sec/tsp2/input/trusted_touch_enable
|
|
chown system system /sys/class/sec/tsp2/input/trusted_touch_event
|
|
chown system system /sys/class/sec/tsp2/input/trusted_touch_type
|
|
|
|
# FINGERPRINT FRAMEWORK : starts goodixfingerprintd
|
|
service goodixd /vendor/bin/goodixfingerprintd
|
|
class late_start
|
|
user system
|
|
group media_rw system
|
|
|