Files
device_nothing_Spacewar/rootdir/etc/init.Spacewar.rc
2026-01-14 23:37:39 +03:00

160 lines
8.6 KiB
Plaintext

#
# Copyright (C) 2023 PixysOS
#
# SPDX-License-Identifier: Apache-2.0
#
on init
# Thermal
chown root system /sys/class/thermal/thermal_zone94/mode
chown root system /sys/class/thermal/thermal_zone95/mode
chmod 0664 /sys/class/thermal/thermal_zone94/mode
chmod 0664 /sys/class/thermal/thermal_zone95/mode
on fs
# tfa98xx
chmod 666 /sys/bus/i2c/devices/1-0034/reg
chmod 666 /sys/bus/i2c/devices/1-0034/rw
chmod 666 /sys/bus/i2c/devices/1-0035/reg
chmod 666 /sys/bus/i2c/devices/1-0035/rw
chmod 666 /proc/tfa98xx-34/rpc
chmod 666 /proc/tfa98xx-35/rpc
chmod 666 /sys/class/qcom-haptics/lra_calibration
chmod 666 /sys/class/qcom-haptics/lra_frequency_hz
chmod 666 /sys/class/qcom-haptics/lra_impedance
chown system system /sys/class/qcom-haptics/lra_calibration
chown system system /sys/class/qcom-haptics/lra_frequency_hz
chown system system /sys/class/qcom-haptics/lra_impedance
# Fingerprint
chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/fod_ui
chown system system /dev/goodix_fp
chmod 666 /dev/goodix_fp
# Nfc
chmod 0660 /dev/nxp-nci
chown nfc nfc /dev/nxp-nci
on boot
# Display
chown system system /sys/class/drm/sde-conn-1-DSI-1/panel_id
chmod 0666 /sys/class/drm/sde-conn-1-DSI-1/panel_id
# Display (hbm)
chown system system /sys/class/drm/sde-conn-1-DSI-1/hbm_mode
chmod 0666 /sys/class/drm/sde-conn-1-DSI-1/hbm_mode
# Gestures
chown system system /sys/class/spi_master/spi0/spi0.0/fts_edge_mode
chown system system /sys/class/spi_master/spi0/spi0.0/fts_gesture_mode
chown system system /sys/class/spi_master/spi0/spi0.0/fts_gestures
chown system system /sys/class/spi_master/spi0/spi0.0/fts_gesture_double_tap_pressed
chown system system /sys/class/spi_master/spi0/spi0.0/fts_gesture_fod_pressed
chown system system /sys/class/spi_master/spi0/spi0.0/fts_gesture_single_tap_pressed
# Glyph
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/all_leds_effect
chmod 0666 /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/all_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/all_white_leds_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/glo_current
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/rear_cam_led_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/front_cam_led_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/horse_race_leds_br
chmod 0666 /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/horse_race_leds_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/round_leds_br
chmod 0666 /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/round_leds_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/single_led_br
chmod 0666 /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/single_led_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/round_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/horse_race_leds
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/wired_charging_leds
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/random_delay
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/frame_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/random_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/keybd_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/wlr_charging_leds
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/video_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/ga_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/nf_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/bootan_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/rear_cam_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/music_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/ringtone_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/flip_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/exclamation_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/setting_leds_effect
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/setting_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/vline_leds_br
chown system system /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/dot_led_br
# Hung_task
write /proc/sys/kernel/hung_task_timeout_secs 180
write /proc/sys/kernel/hung_task_warnings 10
write /proc/sys/kernel/hung_task_check_count 32768
write /proc/sys/kernel/hung_task_panic 1
write /proc/sys/kernel/hung_task_check_interval_secs 0
write /proc/sys/kernel/hung_task_selective_monitoring 0
# Leds
chown system system /sys/class/leds/led:torch_0/brightness
chmod 0666 /sys/class/leds/led:torch_0/brightness
chown system system /sys/class/leds/led:torch_1/brightness
chmod 0666 /sys/class/leds/led:torch_1/brightness
chown system system /sys/class/leds/led:switch_0/brightness
chmod 0666 /sys/class/leds/led:switch_0/brightness
chown system system /sys/class/leds/led:switch_1/brightness
chmod 0666 /sys/class/leds/led:switch_1/brightness
chown system system /sys/class/leds/led:switch_2/brightness
chmod 0666 /sys/class/leds/led:switch_2/brightness
chown system system /sys/class/leds/led:torch_2/brightness
chmod 0666 /sys/class/leds/led:torch_2/brightness
chown system system /sys/class/leds/led:switch_3/brightness
chmod 0666 /sys/class/leds/led:switch_3/brightness
on post-fs-data
# Goodix
mkdir /data/vendor/goodix 0700 system system
# Nothing camera
restorecon_recursive /mnt/vendor/persist
mkdir /mnt/vendor/persist/camera 0777 cameraserver cameraserver
mkdir /data/vendor/camera 0775 camera camera
copy /mnt/vendor/persist/camera/bokeh_caldata_uw_persist.bin /data/vendor/camera/bokeh_caldata_uw_persist.bin
chmod 0444 /data/vendor/camera/bokeh_caldata_uw_persist.bin
chown cameraserver audio /data/vendor/camera/bokeh_caldata_uw_persist.bin
copy /mnt/vendor/persist/camera/ois_caldata_wide_persist.bin /data/vendor/camera/ois_caldata_wide_persist.bin
chmod 0444 /data/vendor/camera/ois_caldata_wide_persist.bin
chown cameraserver audio /data/vendor/camera/ois_caldata_wide_persist.bin
# Nfc
mkdir /data/vendor 0777 nfc nfc
mkdir /data/vendor/nfc 0777 nfc nfc
mkdir /data/vendor/nfc/param 0777 nfc nfc
chmod 0660 /dev/pn553
chown nfc nfc /dev/pn553
# Wireless Charging
on property:service.bootanim.exit=1
chown system system /sys/class/qcom-battery/wireless_boost_en
chmod 0666 /sys/class/qcom-battery/wireless_boost_en
chown system system /sys/class/qcom-battery/wls_st38_reg
chmod 0666 /sys/class/qcom-battery/wls_st38_reg
chmod 0666 /sys/class/qcom-battery/wls_reverse_status
chown system system /sys/class/qcom-battery/usb_charger_en
chown system system /sys/class/qcom-battery/slowcharge_en
chown system system /sys/class/qcom-battery/wls_chg_param
chown system system /sys/class/qcom-battery/charge_pump_enable
chown system system /sys/class/qcom-battery/charge_power
chown system system /sys/class/qcom-battery/wls_en
on property:service.bootanim.exit=0
# Boot led effect placeholder
write /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/bootan_leds_effect 1
on property:service.bootanim.exit=1
# Boot led effect placeholder
write /sys/devices/platform/soc/984000.i2c/i2c-0/0-0020/leds/aw210xx_led/bootan_leds_effect 0
on property:sys.boot_completed=1
swapon_all /vendor/etc/fstab.zram