mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sdm710-common
synced 2026-02-01 02:50:15 +00:00
254 lines
8.8 KiB
Plaintext
254 lines
8.8 KiB
Plaintext
# Copyright (c) 2013-2018, 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/init.batteryd.rc
|
|
import /vendor/etc/init/init.charge_logger.rc
|
|
import /vendor/etc/init/init.mishow.ctl.rc
|
|
|
|
on early-init
|
|
write /proc/sys/kernel/sched_boost 1
|
|
|
|
on init
|
|
write /dev/stune/foreground/schedtune.sched_boost_no_override 1
|
|
write /dev/stune/top-app/schedtune.sched_boost_no_override 1
|
|
write /dev/stune/schedtune.colocate 0
|
|
write /dev/stune/background/schedtune.colocate 0
|
|
write /dev/stune/system-background/schedtune.colocate 0
|
|
write /dev/stune/foreground/schedtune.colocate 0
|
|
write /dev/stune/top-app/schedtune.colocate 1
|
|
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
|
|
|
on early-fs
|
|
# We need vold early for metadata encryption
|
|
start vold
|
|
|
|
on fs
|
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
|
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
|
mount_all /vendor/etc/fstab.qcom --early
|
|
chown root system /mnt/vendor/persist
|
|
chmod 0771 /mnt/vendor/persist
|
|
restorecon_recursive /mnt/vendor/persist
|
|
mkdir /mnt/vendor/persist/data 0700 system system
|
|
mkdir /dev/logfs 0771 system system
|
|
#+ add for watermark
|
|
mkdir /mnt/vendor/persist/camera 0777 root root
|
|
chown system system /dev/tiload_node
|
|
chmod 660 /dev/tiload_node
|
|
chmod 644 /persist/audio/us_manual_cal
|
|
mount vfat /dev/block/bootdevice/by-name/logfs /dev/logfs noatime umask=006,uid=1000,gid=1000
|
|
chmod 644 /persist/audio/us_manual_cal
|
|
|
|
chown system system /proc/tp_selftest
|
|
chmod 0644 /proc/tp_selftest
|
|
|
|
on late-fs
|
|
# Mount RW partitions which need run fsck
|
|
mount_all /vendor/etc/fstab.qcom --late
|
|
|
|
on post-fs
|
|
# set RLIMIT_MEMLOCK to 64MB
|
|
setrlimit 8 67108864 67108864
|
|
|
|
write /dev/ipa 1
|
|
|
|
on post-fs-data
|
|
mkdir /data/vendor/hbtp 0750 system system
|
|
mkdir /data/vendor/nnhal 0700 system system
|
|
mkdir /data/vendor/misc/display 0771 system system
|
|
mkdir /data/vendor/thermal 0771 root system
|
|
mkdir /data/vendor/thermal/config 0771 root system
|
|
mkdir /data/vendor/nfc 0770 nfc nfc
|
|
chmod 0644 /dev/elliptic0
|
|
chmod 0644 /dev/elliptic1
|
|
chmod 666 /sys/class/drm/card0-DSI-1/disp_count
|
|
chown system system /sys/class/drm/card0-DSI-1/dim_alpha
|
|
chown system system /sys/class/drm/card0-DSI-1/fod_ui_ready
|
|
chown system system /sys/class/drm/card0-DSI-1/dim_layer_enable
|
|
chown system system /sys/class/drm/card0-DSI-1/dimlayer_hbm_enabled
|
|
setprop persist.sys.sf.color_saturation 1.0
|
|
|
|
# For cpusets initialize for Silver Only first and then Silver + Gold
|
|
# Silver Only configuration cannot work with 0-7
|
|
on boot
|
|
chown system system /sys/kernel/hbtp/display_pwr
|
|
chown system system /sys/class/leds/white/brightness
|
|
chown system system /sys/class/leds/white/blink
|
|
chown system system /sys/class/drm/card0-DSI-1/disp_param
|
|
chown system system /sys/class/drm/card0-DSI-1/doze_backlight
|
|
chown system system /sys/class/backlight/panel0-backlight/brightness_clone
|
|
chown system system /sys/class/drm/card0-DSI-1/doze_brightness
|
|
chmod 0664 /sys/class/drm/card0-DSI-1/doze_brightness
|
|
start rmt_storage
|
|
start rfs_access
|
|
write /dev/cpuset/top-app/cpus 0-7
|
|
write /dev/cpuset/foreground/cpus 0-7
|
|
write /dev/cpuset/foreground/boost/cpus 0-7
|
|
write /dev/cpuset/background/cpus 0-7
|
|
write /dev/cpuset/system-background/cpus 0-7
|
|
|
|
# DBMDX character device
|
|
chmod 0660 /dev/ir_spi
|
|
chown system system /dev/ir_spi
|
|
chown media media /dev/dbmdx-1
|
|
chmod 0770 /dev/dbmdx-1
|
|
chown system system /sys/class/thermal/thermal_message/sconfig
|
|
|
|
# Add a cpuset for the camera daemon
|
|
# We want all cores for camera
|
|
mkdir /dev/cpuset/camera-daemon
|
|
write /dev/cpuset/camera-daemon/cpus 0-7
|
|
write /dev/cpuset/camera-daemon/mems 0
|
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon
|
|
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
|
|
chmod 0660 /dev/cpuset/camera-daemon/tasks
|
|
|
|
#Load WLAN driver
|
|
####Regionalization config and prop files####
|
|
chmod 0644 /persist/speccfg/spec
|
|
chmod 0644 /persist/speccfg/devicetype
|
|
chmod 0644 /persist/speccfg/mbnversion
|
|
chmod 0644 /persist/speccfg/.not_triggered
|
|
chmod 0644 /persist/speccfg/vendor_ro.prop
|
|
chmod 0644 /persist/speccfg/vendor_persist.prop
|
|
chmod 0644 /persist/speccfg/submask
|
|
chmod 0644 /persist/speccfg/partition
|
|
chown system system /persist/speccfg/spec
|
|
chown system system /persist/speccfg/devicetype
|
|
chown system system /persist/speccfg/mbnversion
|
|
chown system system /persist/speccfg/.not_triggered
|
|
chown system system /persist/speccfg/vendor_ro.prop
|
|
chown system system /persist/speccfg/vendor_persist.prop
|
|
chown system system /persist/speccfg/submask
|
|
chown system system /persist/speccfg/partition
|
|
|
|
#USB controller configuration
|
|
setprop vendor.usb.rndis.func.name "gsi"
|
|
setprop vendor.usb.rmnet.func.name "gsi"
|
|
setprop vendor.usb.rmnet.inst.name "rmnet"
|
|
setprop vendor.usb.dpl.inst.name "dpl"
|
|
setprop vendor.usb.qdss.inst.name "qdss"
|
|
|
|
#pd-mapper
|
|
service vendor.pd_mapper /vendor/bin/pd-mapper
|
|
class core
|
|
user system
|
|
group system
|
|
|
|
#Peripheral manager
|
|
service vendor.per_mgr /vendor/bin/pm-service
|
|
class core
|
|
user system
|
|
group system
|
|
ioprio rt 4
|
|
|
|
service vendor.per_proxy /vendor/bin/pm-proxy
|
|
class core
|
|
user system
|
|
group system
|
|
disabled
|
|
|
|
on property:init.svc.vendor.per_mgr=running
|
|
start vendor.per_proxy
|
|
|
|
on property:sys.shutdown.requested=*
|
|
stop vendor.per_proxy
|
|
|
|
on boot
|
|
chown system system /sys/class/leds/red/blink
|
|
chown system system /sys/class/leds/green/blink
|
|
chown system system /sys/class/leds/blue/blink
|
|
chown system system /sys/class/touch/touch_dev/palm_sensor
|
|
chmod 0666 /sys/class/touch/touch_dev/palm_sensor
|
|
chown system system /sys/class/touch/tp_dev/fod_status
|
|
|
|
on charger
|
|
start vendor.power_off_alarm
|
|
|
|
service thermal-engine /system/vendor/bin/thermal-engine -T
|
|
class main
|
|
user root
|
|
socket thermal-send-client stream 0666 system system
|
|
socket thermal-recv-client stream 0660 system system
|
|
socket thermal-recv-passive-client stream 0666 system system
|
|
socket thermal-send-rule stream 0660 system system
|
|
group root
|
|
|
|
service ppd /vendor/bin/mm-pp-dpps
|
|
class late_start
|
|
user system
|
|
group system graphics
|
|
socket pps stream 0660 system system
|
|
disabled
|
|
|
|
on property:init.svc.vendor.hwcomposer-2-3=stopped
|
|
stop ppd
|
|
|
|
on property:init.svc.vendor.hwcomposer-2-3=running
|
|
start ppd
|
|
|
|
on property:init.svc.vendor.hwcomposer-2-3=restarting
|
|
stop ppd
|
|
|
|
service nv_mac /vendor/bin/nv_mac
|
|
class main
|
|
user system
|
|
group system inet net_admin wifi net_raw
|
|
oneshot
|
|
|
|
on property:adsp.restart=1
|
|
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
|
|
write /sys/bus/msm_subsys/devices/subsys3/restart_level related
|
|
write /sys/kernel/debug/msm_subsys/adsp restart
|
|
|
|
on property:init.svc.zygote=stopped
|
|
stop ppd
|
|
|
|
on property:init.svc.zygote=running
|
|
start ppd
|
|
|
|
on property:init.svc.zygote=restarting
|
|
stop ppd
|
|
|
|
service audioshell_service /vendor/bin/audioshell_service
|
|
oneshot
|
|
disabled
|
|
|
|
on property:ro.vendor.miui.region=*
|
|
start audioshell_service
|
|
|
|
service remosaic_daemon /system/vendor/bin/remosaic_daemon
|
|
class late_start
|
|
user camera
|
|
group camera
|
|
disabled
|
|
|
|
on property:ro.build.product=grus
|
|
start remosaic_daemon
|