1
0
Fork 0
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.

350 lines
12 KiB

import /vendor/etc/init/hw/init.rockchip.rc
import /vendor/etc/init/hw/init.connectivity.rc
import /vendor/etc/init/hw/init.box.samba.rc
import /vendor/etc/init/hw/init.${ro.board.platform}.rc
import /vendor/etc/init/hw/init.${ro.target.product}.rc
import /vendor/etc/init/hw/init.car.rc
import /vendor/etc/init/hw/init.optee.rc
on post-fs-data
chmod 0664 /sys/class/display/HDMI/color
chmod 0666 /dev/opteearmtz00
chmod 0666 /dev/tee0
chmod 0666 /dev/teepriv0
mkdir /data/vendor/logs 0755 root shell
mkdir /data/vendor/audio 0755 system system
mkdir /data/vendor/camera 0755 cameraserver cameraserver
on init
# set temperature control policy as normal mode
write /sys/module/rockchip_pm/parameters/policy 1
chmod 0666 /dev/opteearmtz00
chmod 0666 /dev/tee0
chmod 0666 /dev/teepriv0
chown system system /sys/system_monitor/system_status
chmod 0666 /sys/system_monitor/system_status
#eink
chown root system /dev/ebc
chmod 0666 /dev/ebc
on boot
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown system system /sys/devices/ffa30000.gpu/dvfs
chmod 0777 /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/governor
# Adjust governor for rk3126c gpu
chown system system /sys/devices/platform/10091000.gpu/devfreq/10091000.gpu/governor
chmod 0664 /sys/devices/platform/10091000.gpu/devfreq/10091000.gpu/governor
chown system system /sys/devices/system/cpu/cpu0/online
chmod 0660 /sys/devices/system/cpu/cpu0/online
chown system system /sys/devices/system/cpu/cpu1/online
chmod 0660 /sys/devices/system/cpu/cpu1/online
chown system system /sys/devices/system/cpu/cpu2/online
chmod 0660 /sys/devices/system/cpu/cpu2/online
chown system system /sys/devices/system/cpu/cpu3/online
chmod 0660 /sys/devices/system/cpu/cpu3/online
chown system system /sys/devices/system/cpu/cpu4/online
chmod 0660 /sys/devices/system/cpu/cpu4/online
chown system system /sys/devices/system/cpu/cpu5/online
chmod 0660 /sys/devices/system/cpu/cpu5/online
chown system system /sys/devices/system/cpu/cpu6/online
chmod 0660 /sys/devices/system/cpu/cpu6/online
chown system system /sys/devices/system/cpu/cpu7/online
chmod 0660 /sys/devices/system/cpu/cpu7/online
chown system system /sys/module/rockchip_pm/parameters/policy
chmod 0660 /sys/module/rockchip_pm/parameters/policy
# Vop bandwidth for ddr dvfs
chown system system /sys/class/devfreq/dmc/vop_bandwidth
chmod 0660 /sys/class/devfreq/dmc/vop_bandwidth
# hdmi status
chown system system /sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/status
chown system system /d/dw-hdmi/status
chmod 0660 /d/dw-hdmi/status
chown system system /sys/class/hdmirx/hdmirx/edid
chmod 0660 /sys/class/hdmirx/hdmirx/edid
#dp status
chown system system /sys/devices/platform/display-subsystem/drm/card0/card0-DP-1/status
# b/13568411: make lazy vfree flush thresholds match flush_tlb_range
write /proc/sys/vm/lazy_vfree_tlb_flush_all_threshold 524288
chown wifi wifi /sys/class/rkwifi/driver
chown wifi wifi /sys/class/rkwifi/power
chown wifi wifi /sys/class/rkwifi/chip
chown wifi wifi /sys/class/rkwifi/preload
write /proc/sys/net/core/rmem_max 1048576
write /proc/sys/net/core/wmem_max 1048576
# backlight
chown system system /sys/class/backlight/rk28_bl/brightness
chown system system /sys/class/backlight/backlight/brightness
# for hdmi
chown root system /sys/class/display/HDMI/enable
chown root system /sys/class/display/HDMI/mode
chown root system /sys/class/display/HDMI/scale
chown root system /sys/class/display/HDMI/3dmode
chmod 0664 /sys/class/display/HDMI/mode
chmod 0664 /sys/class/display/HDMI/3dmode
chown root system /sys/class/graphics/fb0/bcsh
chown root system /sys/class/graphics/fb0/dsp_lut
chmod 0664 /sys/class/graphics/fb0/bcsh
chmod 0664 /sys/class/graphics/fb0/dsp_lut
chown system graphics /sys/class/graphics/fb0/scale
chmod 0664 /sys/class/graphics/fb0/scale
chown system system /sys/mali400_utility/utility
chmod 0664 /sys/mali400_utility/utility
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
#add for usb otg by lly
chown system system /sys/bus/platform/drivers/usb20_otg/force_usb_mode
chmod 0664 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
#add for wakeup to reboot by huangjc
chown system system /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot
chmod 0664 /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot
#add for leds by huangjc
chown system system /sys/class/leds/net-green/brightness
chmod 0664 /sys/class/leds/net-green/brightness
chown system system /sys/class/leds/net-red/brightness
chmod 0664 /sys/class/leds/net-red/brightness
chown system system /sys/class/leds/led_r/brightness
chown system system /sys/class/leds/led_r/trigger
chown system system /sys/class/leds/led_r/timer
chmod 0664 /sys/class/leds/led_r/brightness
chmod 0664 /sys/class/leds/led_r/trigger
chmod 0664 /sys/class/leds/led_r/timer
chown system system /sys/class/leds/led_g/brightness
chown system system /sys/class/leds/led_g/trigger
chown system system /sys/class/leds/led_g/timer
chmod 0664 /sys/class/leds/led_g/brightness
chmod 0664 /sys/class/leds/led_g/trigger
chmod 0664 /sys/class/leds/led_g/timer
chown system system /sys/class/leds/led_b/brightness
chown system system /sys/class/leds/led_b/trigger
chown system system /sys/class/leds/led_b/timer
chmod 0664 /sys/class/leds/led_b/brightness
chmod 0664 /sys/class/leds/led_b/trigger
chmod 0664 /sys/class/leds/led_b/timer
chown root system /sys/class/graphics/fb0/map
chmod 0664 /sys/class/graphics/fb0/map
#add for mid change hdmi mode
chmod 0664 /sys/devices/virtual/display/HDMI/enable
chmod 0664 /sys/devices/virtual/display/HDMI/mode
chmod 0664 /sys/devices/virtual/display/HDMI/scale
#add for cts
chmod 0660 /sys/bus/platform/drivers/usb20_otg/dwc_otg_conn_en
chmod 0660 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
chmod 0660 /sys/bus/platform/drivers/usb20_otg/vbus_status
chmod 0660 /sys/devices/platform/fb/graphics/fb5/enable
chmod 0660 /sys/devices/platform/fb/graphics/fb6/cursor
chmod 0660 /sys/devices/platform/fb/graphics/fb6/enable
chmod 0660 /sys/devices/platform/fb/graphics/fb7/enable
chmod 0660 /sys/devices/platform/fb/graphics/fb8/enable
chmod 0660 /sys/devices/platform/fb/graphics/fb9/enable
chmod 0660 /sys/devices/platform/fb/graphics/fb9/bits_per_pixel
chmod 0660 /sys/devices/platform/fb/graphics/fb9/win_property
restorecon_recursive /dev/block/by-name/
#for tee
restorecon /vendor/bin/tee-supplicant
#for WV keybox provision
restorecon /vendor/bin/rk_store_keybox
# for bd
mkdir /mnt/iso 0660 system system
chmod 0666 /dev/opteearmtz00
chmod 0666 /dev/tee0
chmod 0666 /dev/teepriv0
chmod 0444 /proc/pagetypeinfo
#for camera hal switch RAW data
chmod 0666 /sys/devices/platform/rkcif-mipi-lvds/compact_test
chmod 0666 /sys/devices/platform/rkcif-mipi-lvds2/compact_test
chmod 0666 /sys/devices/platform/rkcif-mipi-lvds3/compact_test
on property:sys.boot_completed=1
# if data is encrypt, when start gps too early, gpsd crashed
start gpsd
trigger sys-boot-completed-set
setprop vendor.boot_completed 1
# We want one opportunity per boot to enable zram, so we
# use a trigger we fire from the above stanza. If
# persist.sys.zram_enabled becomes true after boot,
# we don't want to run swapon_all at that time.
on sys-boot-completed-set && property:persist.sys.zram_enabled=1
swapon_all /vendor/etc/fstab.${ro.hardware}
# for Internet adb
on property:persist.internet_adb_enable=1
setprop service.adb.tcp.port 5555
restart adbd
# for Internet adb
on property:persist.internet_adb_enable=0
setprop service.adb.tcp.port 0
restart adbd
# for telephony function
on property:ro.boot.noril=true
setprop ro.radio.noril true
stop ril-daemon
# set ro.serialno
on property:vendor.serialno=*
setprop ro.serialno ${vendor.serialno}
restart adbd
on property:vendor.cts_gts.status=true
restart vendor.media.omx
restart media
# Android bug collector
service abc /vendor/bin/abc
class main
disabled
oneshot
on property:persist.abc_switch=1
start abc
on property:persist.abc_switch=0
stop abc
##$_rbox_$_modify_$_shenzhenyi_20160312
##$_rbox_$_modify_$_begin
service displayd /system/bin/displayd
class core
socket displayd stream 0760 system system
##$_rbox_$_modify_$_end
##$_rbox_$_modify_$_chenzhi_20120309
##$_rbox_$_modify_$_begin
service pppoe_setup /system/bin/pppoe-setup
disabled
oneshot
service pppoe_start /system/bin/pppoe-start
disabled
oneshot
service bplus_helper /system/bin/bplus_helper
class main
oneshot
service pppoe_stop /system/bin/pppoe-stop
disabled
oneshot
##$_rbox_$_modify_$_end
service up_eth0 /system/bin/busybox ifconfig eth0 up
class main
oneshot
service shutdownanim /system/bin/bootanimation shutdown
class core
user graphics
group graphics audio
disabled
oneshot
service rk_store_keybox /vendor/bin/rk_store_keybox
class main
oneshot
#vts audio property
on property:vts.native_server.on=1
setprop vendor.vts_test true
# For Control Adb in Booting
on property:persist.sys.adb_enable=1
restart adbd
on property:persist.sys.adb_enable=0
stop adbd
service flash_img /vendor/bin/flash_img.sh
class main
oneshot
disabled
on property:persist.sys.read_pcie_info=1
start read_pcie_info
setprop persist.sys.read_pcie_info 0
# For Devicetest APK
service read_pcie_info /vendor/bin/read_pcie_info.sh /mnt/sdcard/pcieInfo.tmp
class main
user root
group root
oneshot
disabled
on property:vendor.flash.success=2
start flash_img
on property:flash.success=1
setprop vendor.flash.success 1