-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinit.qcom.rc
281 lines (214 loc) · 6.68 KB
/
init.qcom.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
import init.thunderc.usb.rc
on boot-pause
exec sbin/chargerlogo
#
on early-init
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0771 system cache
mkdir /mnt/sdcard 0000 system system
mkdir /sd-ext 0771 system system
on init
# setup the global environment
export EXTERNAL_STORAGE /mnt/sdcard
export SD_EXT_DIRECTORY /sd-ext
export DOWNLOAD_CACHE /cache/download
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sdcard
# Add permissions for camera access
chmod 0666 /dev/msm_camera/config0
chmod 0666 /dev/msm_camera/control0
chmod 0666 /dev/msm_camera/frame0
chmod 0666 /dev/msm_camera/pic0
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 3584
setprop ro.VISIBLE_APP_MEM 4096
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.CONTENT_PROVIDER_MEM 7680
setprop ro.EMPTY_APP_MEM 8192
# Overwrite framework low memory killer minfree setting
write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,6144,7168,7680,8192
# Enable low memory killer to check file pages
write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144
write /sys/module/lowmemorykiller/parameters/check_filepages 1
# fix for enropy service and some other that failed
chmod 0755 /data/system/appwidgets.xml
chmod 0755 /data/system/entropy.dat
chmod 0755 /data/system/wallpaper_info.xml
on post-fs
# nv
mkdir /data/nv
chown system system /data/nv
chmod 0711 /data/nv
mkdir /data/local/download 0771 system cache
mkdir /cache/download 0771 system cache
# wifi
chmod 0777 /data/misc/wifi/config_mac
mkdir /data/audioprop 0777 system system
mkdir /data/misc/wifi/sockets 0770 wifi wifi
setprop wifi.supplicant_scan_interval 20
setprop wifi.interface wlan0
mkdir /data/misc/dhcp 0777 system system
on post-fs-data
# wifi
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# last line for post-fs-data
setprop vold.post_fs_data_done 1
on boot
# radio
mkdir /data/radio 0770 radio radio
chmod 2770 /data/radio
# sensors
mkdir /data/amit 0777 ami304d ami304d
chmod 0666 /data/amit/AMI306_Config.ini
chmod 0666 /data/amit/AMI306_Config2.ini
chown compass system /sys/bus/i2c/drivers/proximity_gp2ap/4-0044/enable
chmod 0660 /sys/bus/i2c/drivers/proximity_gp2ap/4-0044/enable
# liblights
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/amber/brightness
chown system system /sys/class/leds/amber/blink
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/flashlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/keyboard-backlight/brightness
# wifi
mkdir /data/misc 01771 system misc
mkdir /data/misc/wifi 0770 system wifi
mkdir /data/misc/wifi/sockets
chmod 770 /data/misc/wifi/sockets
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
mkdir /data/system 0775 system system
# bluetooth
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /dev/ttyHS0
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
write /sys/class/rfkill/rfkill0/state 0
# Fast dormancy
setprop ro.ril.fast.dormancy.rule 1
setprop ro.ril.fd.scron.timeout 4
setprop ro.ril.fd.scroff.timeout 3
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
on fs
# framebuffer permission for copybit
chmod 0666 /dev/graphics/fb0
service chargerlogo /sbin/chargerlogo
class charger
user root
service qmuxd /system/bin/qmuxd
class main
user radio
group radio audio bluetooth
service ami304d /system/bin/ami304d
class main
user compass
group system
service hciattach /system/bin/sh /system/bin/init.qcom.bt.sh
class main
user bluetooth
group bluetooth net_bt_admin
disabled
service dhcpcd_wlan0 /system/bin/dhcpcd -BKA
class core
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -W -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 660 wifi wifi
group system wifi inet
disabled
oneshot
service dhcpservice /system/bin/netcfg wlan0 dhcp
class main
oneshot
service setapversion /system/bin/lgapversion
class main
user radio
group radio
disabled
oneshot
service hfag /system/bin/sdptool add --channel=10 HFAG
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --channel=12 OPUSH
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map /system/bin/sdptool add --channel=16 MAS
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
#Market
service drm /system/bin/drmserver
user root
group root
enabled
oneshot
service qcom-sh /system/bin/sh /init.qcom.sh
class core
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class main
user root
disabled
oneshot
# Triggered by the KEY_VOLUME_DOWN+KEY_MENU keycodes
service bugreport /system/bin/logwrapper /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
keycodes 114 139
class main
disabled
oneshot
## Stop dhcpcd when wifi was stopped
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd_wlan0
## start qcom-post-boot
on property:init.svc.bootanim=stopped
start qcom-post-boot
## Read BT address
on property:service.brcm.bt.mac=*
exec /system/bin/hwaddrs
## Restart dhcpservice
on property:dev.bootcomplete=1
stop dhcpservice
start dhcpservice
## Set proper baseband version after getting the dummy from RIL
on property:gsm.version.baseband=V07u-000-000-MAR-23-2009
start setapversion