blob: c27ad8d0120666051f8941ca87f9ebd5d1996d23 [file] [log] [blame]
Patrick Tjinea3b3cd2015-03-31 10:38:39 -07001#
2# Copyright 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17import init.angler.usb.rc
18import init.angler.diag.rc
19
20on early-init
21 mount debugfs debugfs /sys/kernel/debug
22 chown system system /sys/kernel/debug/kgsl/proc
23
24on init
25 # Set permissions for persist partition
26 mkdir /persist 0771 system system
27 mkdir /firmware 0771 system system
28
29 # Support legacy paths
30 symlink /sdcard /mnt/sdcard
31 symlink /sdcard /storage/sdcard0
32
33on fs
34 mount_all ./fstab.angler
35
Naveen Ramaraj87018982015-04-24 21:10:40 -070036 # Enable rmnet data and aggregation
37 setprop persist.rmnet.mux enabled
38 setprop persist.rmnet.data.enable true
39 setprop persist.data.wda.enable true
40 setprop persist.data.df.agg.dl_pkt 10
41 setprop persist.data.df.agg.dl_size 4096
42
Patrick Tjinea3b3cd2015-03-31 10:38:39 -070043on early-boot
44 # set RLIMIT_MEMLOCK to 64MB
45 setrlimit 8 67108864 67108864
46
47on boot
Zhihui Wu7d7b98c2015-04-24 00:40:19 -070048 # set cpu governor to interactive after boot up
49 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
50 write /sys/module/lpm_levels/parameters/sleep_disabled N
51
Patrick Tjinea3b3cd2015-03-31 10:38:39 -070052 # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP
53 write /sys/module/wakelock/parameters/debug_mask 7
54
55 # create symlink for fb1 as HDMI
56 symlink /dev/graphics/fb1 /dev/graphics/hdmi
Naveen Ramaraj87018982015-04-24 21:10:40 -070057 symlink /dev/block/platform/soc.0/f9824900.sdhci /dev/block/bootdevice
Patrick Tjinea3b3cd2015-03-31 10:38:39 -070058
59 # setup permissions for fb1 related nodes
60 chown system graphics /sys/class/graphics/fb1/hpd
61 chown system graphics /sys/class/graphics/fb1/vendor_name
62 chown system graphics /sys/class/graphics/fb1/product_description
63 chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
64 chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name
65 chmod 0664 /sys/devices/virtual/graphics/fb1/product_description
66
Naveen Ramaraj87018982015-04-24 21:10:40 -070067 #Create QMUX deamon socket
68 mkdir /dev/socket/qmux_radio 0770 radio radio
69 chmod 2770 /dev/socket/qmux_radio
70 mkdir /dev/socket/qmux_audio 0770 media audio
71 chmod 2770 /dev/socket/qmux_audio
72 mkdir /dev/socket/qmux_gps 0770 gps gps
73 chmod 2770 /dev/socket/qmux_gps
74
75 write /sys/bus/platform/drivers/xhci_msm_hsic/unbind msm_hsic_host
76 write /sys/module/rmnet_usb/parameters/mux_enabled 1
77 write /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links 8
78 write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev 17
79 write /sys/module/rmnet_usb/parameters/rmnet_data_init 1
80 chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
81
82 # Create /data/time folder for time-services
83 mkdir /data/time/ 0700 system system
84 mkdir /data/audio/ 0770 media audio
85
86 start qmuxd
87 start netmgrd
88
89
90on property:init.svc.per_mgr=running
91 start per_proxy
92
93on property:sys.shutdown.requested=*
94 stop per_proxy
95
Patrick Tjinea3b3cd2015-03-31 10:38:39 -070096on post-fs-data
97 write /sys/kernel/boot_adsp/boot 1
98
99 # Ecc_Handler qcril.db
100 mkdir /data/misc/radio 0770 radio radio
101 symlink /system/etc/qcril.db /data/misc/radio/qcril.db
102
103 setprop vold.post_fs_data_done 1
104
Mekala Natarajaneb9c2a32015-04-27 11:01:22 -0700105 # Create directory for TZ Apps
106 mkdir /data/misc/qsee 0770 system system
107
Patrick Tjinea3b3cd2015-03-31 10:38:39 -0700108on charger
Zhihui Wu13d03c62015-04-23 22:06:27 -0700109 #low power governing
110 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
111 write /sys/devices/system/cpu/cpu1/online 0
112 write /sys/devices/system/cpu/cpu2/online 0
113 write /sys/devices/system/cpu/cpu3/online 0
114 write /sys/devices/system/cpu/cpu4/online 0
115 write /sys/devices/system/cpu/cpu5/online 0
116 write /sys/devices/system/cpu/cpu6/online 0
117 write /sys/devices/system/cpu/cpu7/online 0
118
119service charger /sbin/healthd -c
120 class charger
121 group log
122 seclabel u:r:healthd:s0
Patrick Tjinea3b3cd2015-03-31 10:38:39 -0700123
Naveen Ramaraj87018982015-04-24 21:10:40 -0700124service per_mgr /system/bin/pm-service
125 class core
126 user root
127 group system net_raw
128
129service per_proxy /system/bin/pm-proxy
130 class core
131 user root
132 group system net_raw
133 disabled
134
135service rmt_storage /system/bin/rmt_storage
136 class core
137 user root
138
Mekala Natarajaneb9c2a32015-04-27 11:01:22 -0700139service qseecomd /system/bin/qseecomd
140 class core
141 user root
142 group root
143
Naveen Ramaraj87018982015-04-24 21:10:40 -0700144service irsc_util /system/bin/irsc_util "/etc/sec_config"
145 class main
146 user root
147 oneshot
148
149service bridgemgrd /system/bin/bridgemgrd
150 class late_start
151 user radio
152 group radio
153
Naveen Ramaraj910680c2015-05-04 10:45:49 -0700154service thermal-engine /system/bin/thermal-engine
155 class main
156 user root
157 socket thermal-send-client stream 0660 system system
158 socket thermal-recv-client stream 0660 system system
159 socket thermal-recv-passive-client stream 0660 system system
160 group root
161
Naveen Ramaraj87018982015-04-24 21:10:40 -0700162# QMUX must be in multiple groups to support external process connections
163service qmuxd /system/bin/qmuxd
164 class main
165 user root
166 group root radio audio bluetooth gps
167 disabled
168
169service netmgrd /system/bin/netmgrd
170 class root
171 group radio
172 disabled
173
174service time_daemon /system/bin/time_daemon
175 class late_start
176 user root
177 group root
178
Mekala Natarajan19925592015-05-04 10:19:48 -0700179service loc_launcher /system/bin/loc_launcher
180 class late_start
181 group gps inet net_raw net_admin wifi
182
Patrick Tjinea3b3cd2015-03-31 10:38:39 -0700183# bugreport is triggered by holding down volume down, volume up and power
184service bugreport /system/bin/dumpstate -d -p -B \
185 -o /data/data/com.android.shell/files/bugreports/bugreport
186 class main
187 disabled
188 oneshot
189 keycodes 114 115 116