Files
device_samsung_a71-common/init/init.samsung.rc
Haky86 bb97fe5993 a71-common: init: Drop duplicated afc_disable permission set
* Done in init.samsung.rc by default.

Change-Id: Ic9e75df4353f792f56d90edc2b531d952fec0a2c
2025-09-23 21:41:30 +02:00

178 lines
7.3 KiB
Plaintext
Executable File

# Copyright (c) 2018-2019, 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.display.rc
on early-init
mkdir /mnt/vendor/efs 0771 radio system
mkdir /mnt/vendor/persist 0771 root system
on init
symlink /dev/block/bootdevice/by-name/steady /dev/block/steady
symlink /dev/block/bootdevice/by-name/persistent /dev/block/persistent
# AFC permissions for fast charge
chown system radio /sys/class/sec/switch/afc_disable
# Create carrier folder for HiddenMenu
on post-fs
chown root system /mnt/vendor/persist
chmod 0771 /mnt/vendor/persist
mkdir /mnt/vendor/persist/data 0700 system system
mkdir /mnt/vendor/persist/rfs 0700 system system
restorecon_recursive /mnt/vendor/persist
mkdir /efs/carrier 0755 system system
restorecon_recursive /efs
chown radio system /mnt/vendor/efs
chmod 0771 /mnt/vendor/efs
restorecon_recursive /mnt/vendor/efs
chown radio system /efs
chmod 0771 /efs
# sensors
mkdir /efs/FactoryApp/sensors/ 0775 root root
chown system system /mnt/vendor/persist/sensors/registry/registry/sns_cm
# Meta event
chown system radio /sys/class/sensors/sensor_dev/flush
on post-fs-data
#argos
chown system system /dev/network_throughput
mkdir /data/vendor/gatekeeper 0770 system system
# Camera Boost
chown cameraserver cameraserver /sys/kernel/mm/vmscan/mem_boost_mode
on early-boot
# Permissions for Touchscreen
chown system system /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/input/fod_pressed
chown root system /proc/tsp_msg
chmod 0440 /proc/tsp_msg
chown system system /dev/tspio
chown system system /sys/class/sec/tsp/ear_detect_enable
chown system system /sys/class/sec/tsp/hw_param
chown system system /sys/class/sec/tsp/virtual_prox
chown system system /sys/class/sec/tsp/sensitivity_mode
chown system system /sys/class/sec/tsp/prox_power_off
# Permission for Securetouch
chown system system /sys/class/sec/ss_touch/secure/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 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 radio /sys/class/sec/tsp2/cmd
chown system system /sys/class/sec/tsp2/input/enabled
chmod 0660 /sys/class/sec/tsp2/input/enabled
# Permission 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 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 system /sys/class/sec/sec_epen/hw_param
on boot
# 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
# ARGOSD
service argos-daemon /system/vendor/bin/argosd
class main
user system
group system radio
disabled
# SENSOR DAEMON
service factory_ssc /vendor/bin/factory.ssc
class core
user system
group system radio inet diag net_admin net_raw sdcard_rw sdcard_r media_rw
on property:sys.boot_completed=1
start argos-daemon