g12: Remove legacy fuse based external device mounts
[GitHub/LineageOS/G12/android_device_amlogic_g12-common.git] / init-files / init.amlogic.rc
1 import /vendor/etc/init/hw/init.amlogic.usb.rc
2 import /vendor/etc/init/hw/init.amlogic.board.rc
3 import /vendor/etc/init/hw/init.amlogic.wifi.rc
4 import /vendor/etc/init/hw/init.amlogic.media.rc
5 import /vendor/etc/init/hw/init.amlogic.wifi_buildin.rc
6
7 on init
8 # 30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB
9 write /proc/sys/vm/watermark_scale_factor 30
10 # 12288 KB
11 write /proc/sys/vm/min_free_kbytes 12288
12
13 # Init the unifykeys
14 write /sys/class/unifykeys/attach 1
15 chmod 666 /dev/video_composer.0
16 chmod 666 /dev/video_composer.1
17
18 on boot
19 chown system graphics /sys/module/fb/parameters/osd_logo_index
20 chmod 0660 /sys/module/fb/parameters/osd_logo_index
21
22 chmod 0666 /sys/class/tsync_pcr/tsync_vpts_adjust
23 chmod 0666 /sys/class/amstream/reset_audio_port
24
25 # HDMI/LCD switch
26 chown media system /sys/class/switch/hdmi/state
27 chmod 0660 /sys/class/switch/hdmi/state
28 chown media system /sys/devices/virtual/switch/hdmi/state
29 chmod 0660 /sys/devices/virtual/switch/hdmi/state
30 chmod 666 /dev/v4lvideo
31
32 # Thermal
33 chown system system /sys/class/thermal/thermal_zone0/mode
34 chown system system /sys/class/thermal/thermal_zone1/mode
35 chmod 664 /sys/class/thermal/thermal_zone0/mode
36 chmod 664 /sys/class/thermal/thermal_zone1/mode
37
38 # Power
39 chmod 664 /sys/power/early_suspend_trigger
40 chown root system /sys/power/early_suspend_trigger
41
42 # vfm map
43 chown media system /sys/class/vfm/map
44 chmod 666 /sys/class/vfm/map
45 write /sys/class/vfm/map "rm default"
46 write /sys/class/vfm/map "add default decoder ppmgr deinterlace amvideo"
47
48 service remotecfg /vendor/bin/remotecfg /vendor/etc/remote.conf
49 class main
50 oneshot
51 seclabel u:r:remotecfg:s0
52
53 service hdcp_tx22 /vendor/bin/hdcp_tx22 \
54 -f /odm/etc/firmware/firmware.le
55 class main
56 disabled
57 oneshot
58
59 service bugreport /system/bin/dumpstate -d -p -B -z \
60 -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
61 class main
62 disabled
63 oneshot
64
65 on property:sys.boot_completed=1
66 # Enable ZRAM on boot_complete
67 swapon_all /vendor/etc/fstab.amlogic
68 start factoryreset