-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.rc
executable file
·363 lines (293 loc) · 11.6 KB
/
init.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# Copyright (c) 2009-2010, Code Aurora Forum. 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 Code Aurora 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
#
on boot-pause
exec system/bin/battery_charging
on boot
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
# Added by [email protected] for Bluetooth DUN
chmod 0666 /dev/smd0
setprop service.brcm.bt.btld 0
setprop service.brcm.bt.activation 0
setprop service.brcm.bt.srv_active 0
setprop service.brcm.bt.hcid_active 0
# Create the directories used by the Wireless subsystem
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
symlink /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
setprop wifi.interface wlan0
# Create directories for wiper services
mkdir /data/wpstiles/ 0777 shell
mkdir /etc/wiper 0660 location qcom_oncrpc
# Create directories for gpsone_daemon services
mkdir /data/gpsone_d 0770 gpsone_d qcom_oncrpc
mkdir /etc/gpsone_d 0770 gpsone_d qcom_oncrpc
# Create directory from IMS services
mkdir /data/shared 0777
#2011.05.17 [email protected] : Qualcomm root process patch for "port_bridge" [START]
#port-bridge
chmod 0660 /dev/smd0
chown system system /dev/smd0
chmod 0660 /dev/ttyGS0
chown system system /dev/ttyGS0
#2011.05.17 [email protected] : Qualcomm root process patch for "port_bridge" [END]
chown system system /sys/devices/platform/msm-battery/power_supply/battery/temp_block
## SENSOR
# LGE_CHANGE_E [[email protected]] 2011-01-04, LG_FW_AMI306
chown compass system /dev/ami306
chmod 0640 dev/ami306
chown compass system /dev/ami306daemon
chmod 0640 dev/ami306daemon
chown compass system /dev/ami306hal
chmod 0640 dev/ami306hal
mkdir /data/amit 0775 ami306d ami306d
chown compass system /data/amit
chown compass system /data/amit/AMI306_Config.ini
chown compass system /data/amit/ACCEL_CAL.ini
chmod 0660 /data/amit/AMI306_Config.ini
chmod 0660 /data/amit/ACCEL_CAL.ini
chown compass system /dev/KR3DH
chmod 0640 /dev/KR3DH
chown compass system /dev/K3DH
chmod 0640 /dev/K3DH
chown compass system /sys/devices/platform/i2c-gpio.4/i2c-4/4-0019/cal
chmod 0660 /sys/devices/platform/i2c-gpio.4/i2c-4/4-0019/cal
chmod 0660 /sys/devices/platform/i2c-gpio.6/i2c-6/6-000e/sensordata
chmod 0664 /sys/devices/platform/hall-ic/enable
# LGE_CHANGE_E [[email protected]] 2011-01-10, LG_FW_ACCELEROMETER SENSOR
chmod 0660 /sys/bus/i2c/drivers/ami306_sensor/6-000e/calidata/
# LGE_CHANGE_E [[email protected]] 2011-01-10, LG_FW_PROXIMITY SENSOR
chown system system /sys/devices/platform/i2c-gpio.5/i2c-5/5-0039/enable
chown system system /sys/devices/platform/i2c-gpio.5/i2c-5/5-0039/show
chown system system /sys/devices/platform/i2c-gpio.5/i2c-5/5-0039/pdata
chmod 0660 /sys/bus/i2c/drivers/proximity_apds9190/5-0039/enable
chmod 0660 /sys/devices/platform/i2c-gpio.5/i2c-5/5-0039/enable
# LGE_CHANGE_S [[email protected]] [2011.05.19] [gelato] remove usbhub and diag_mdlog SUID permission for CTS [START]
#Set SUID bit for usbhub
# chmod 4755 /system/bin/usbhub
chmod 755 /system/bin/usbhub
chmod 755 /system/bin/usbhub_init
#Set SUID bit for diag_mdlog
# chmod 4755 /system/bin/diag_mdlog
chmod 755 /system/bin/diag_mdlog
# LGE_CHANGE_E [[email protected]] [2011.05.19] [gelato] remove usbhub and diag_mdlog SUID permission for CTS [END]
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
# LGE_CHANGE_S [[email protected]] [2011.03.25], Collect ramconsole data [START]
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg
# LGE_CHANGE_E [[email protected]] [2011.03.25], Collect ramconsole data [END]
#+++ BRCM
# Start kernel driver (for BTHID)
# insmod /system/lib/modules/bthid.ko
#--- BRCM
# Export GPIO56 for fusion targets to enable/disable hub
service usbhub_init /system/bin/usbhub_init
user root
disabled
oneshot
on property:ro.product.device=msm7630_fusion
start usbhub_init
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
on property:init.svc.bluetoothd=running
write /sys/devices/virtual/bluetooth/hci0/idle_timeout 7000
start btwlancoex
on property:init.svc.bluetoothd=stopped
stop btwlancoex
service cnd /system/bin/cnd
socket cnd stream 660 root radio
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
user root
disabled
on property:ro.emmc=1
start rmt_storage
#+++ BRCM
# Make sure we startup btld before bluetoothd
# Set target address to emulator host loopback IF
# Limit baudrate to 460800 to ensure reliable uart operation
service btld /system/bin/logwrapper /system/bin/btld -pf /system/bin/BCM4330B1_002.001.003.0221.0235.hcd -hb 4000000 -lpm 1
user root
group bluetooth net_bt_admin
disabled
oneshot
# start btld if soft_onoff is enabled
on property:service.brcm.bt.soft_onoff=1
start btld
# stop btld if soft_onoff is disabled
on property:service.brcm.bt.soft_onoff=0
stop btld
service bluetoothd /system/bin/bluetoothd -n
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
#service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
# user bluetooth
# group qcom_oncrpc bluetooth net_bt_admin
# disabled
# oneshot
#--- BRCM
service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
#2011.05.17 [email protected] : Qualcomm root process patch for "port_bridge" [START]
user system
group system inet
#2011.05.17 [email protected] : Qualcomm root process patch for "port_bridge" [END]
service qmuxd /system/bin/qmuxd
# 2011.05.04 [email protected] : Qualcomm patch for qmuxd root process (PATCH_MSM8x55_5476_QMUXD_Non_Root_20110222.tar.gz)
# disabled
user radio
group radio
service netmgrd /system/bin/netmgrd
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop netmgrd
service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
group bluetooth net_bt_admin
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -BKA wlan0
disabled
oneshot
# LGE_CHANGE_E [[email protected]] 2011-01-04, AMI306 Daemon Start
service ami306d /system/bin/ami306d
user compass
group system
service wiperiface /system/bin/wiperiface
user location
group qcom_oncrpc
oneshot
service gpsone_daemon /system/bin/gpsone_daemon
user root
group qcom_oncrpc
disabled
service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
user system
group system qcom_oncrpc
disabled
oneshot
service qcom-sh /system/bin/sh /init.qcom.sh
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
user root
disabled
oneshot
## 2011-02-10 [email protected]
#service qcom-wifi /system/bin/sh /system/etc/init.qcom.wifi.sh
# user root
# disabled
# oneshot
#on property:init.svc.bootanim=stopped
on property:dev.bootcomplete=1
start qcom-post-boot
# start qcom-wifi
service ckpd /system/bin/CKPD-daemon
disabled
onrestart /system/bin/log -t RIL-CKPD -p w "CKPD daemon restarted"
on property:ro.service.ckpd.enable=1
start ckpd
service hdmid /system/bin/hdmid
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf
user root
group root
oneshot
disabled
service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D
group radio
disabled
oneshot
on property:persist.data.ds_fmc_app.mode=1
start ds_fmc_appd
service ims_regmanager /system/bin/exe-ims-regmanagerprocessnative
user system
group qcom_oncrpc net_bt_admin inet radio wifi
disabled
on property:persist.ims.regmanager.mode=1
start ims_regmanager
on property:ro.data.large_tcp_window_size=true
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service thermald /system/bin/thermald
user root
group root
disabled
on property:persist.thermal.monitor=true
start thermald
service time_daemon /system/bin/time_daemon
user root
group root
oneshot
disabled
on property:persist.timed.enable=true
mkdir /data/time/ 0700
start time_daemon
service ftp /system/bin/sdptool add --channel=20 FTP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map /system/bin/sdptool add --channel=16 MAS
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
# LGE_CHANGE_CIQ_S [[email protected]] 2010-07-09, [CIQ] adapting patch files
service iqmsd /system/bin/iqmsd
disabled
on property:service.iq.active=1
start iqmsd
on property:service.iq.active=0
stop iqmsd
# LGE_CHANGE_CIQ_E [[email protected]] 2010-07-09, [CIQ]