-
Notifications
You must be signed in to change notification settings - Fork 15
/
init.shooter.rc
executable file
·455 lines (367 loc) · 14.6 KB
/
init.shooter.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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
import init.shooter.usb.rc
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
mkdir /storage 0775 root system
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
# for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
mkdir /mnt/usbdisk 0755 system system
on early-fs
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /devlog 0700 root root
#8x60: firmware
rm /vendor
mkdir /vendor 0771 system system
mkdir /vendor/etc 0771 system system
mkdir /vendor/firmware 0771 system system
mkdir /vendor/firmware/misc 0771 system system
wait /dev/block/mmcblk0p18
mount vfat /dev/block/mmcblk0p18 /vendor/firmware/misc ro shortname=lower
symlink /vendor/firmware/misc/q6.b07 /vendor/firmware/q6.b07
symlink /vendor/firmware/misc/q6.b06 /vendor/firmware/q6.b06
symlink /vendor/firmware/misc/q6.b05 /vendor/firmware/q6.b05
symlink /vendor/firmware/misc/q6.b04 /vendor/firmware/q6.b04
symlink /vendor/firmware/misc/q6.b03 /vendor/firmware/q6.b03
symlink /vendor/firmware/misc/q6.b02 /vendor/firmware/q6.b02
symlink /vendor/firmware/misc/q6.b01 /vendor/firmware/q6.b01
symlink /vendor/firmware/misc/q6.b00 /vendor/firmware/q6.b00
symlink /vendor/firmware/misc/q6.mdt /vendor/firmware/q6.mdt
symlink /vendor/firmware/misc/modem.b09 /vendor/firmware/modem.b09
symlink /vendor/firmware/misc/modem.b08 /vendor/firmware/modem.b08
symlink /vendor/firmware/misc/modem.b07 /vendor/firmware/modem.b07
symlink /vendor/firmware/misc/modem.b06 /vendor/firmware/modem.b06
symlink /vendor/firmware/misc/modem.b05 /vendor/firmware/modem.b05
symlink /vendor/firmware/misc/modem.b04 /vendor/firmware/modem.b04
symlink /vendor/firmware/misc/modem.b03 /vendor/firmware/modem.b03
symlink /vendor/firmware/misc/modem.b02 /vendor/firmware/modem.b02
symlink /vendor/firmware/misc/modem.b01 /vendor/firmware/modem.b01
symlink /vendor/firmware/misc/modem.b00 /vendor/firmware/modem.b00
symlink /vendor/firmware/misc/modem.mdt /vendor/firmware/modem.mdt
symlink /system/vendor/firmware/fw_bcm4329.bin /vendor/firmware/fw_bcm4329.bin
symlink /system/vendor/firmware/fw_bcm4329_apsta.bin /vendor/firmware/fw_bcm4329_apsta.bin
symlink /system/vendor/firmware/bcm4329.hcd /vendor/firmware/bcm4329.hcd
symlink /system/vendor/etc/audio_effects.conf /vendor/etc/audio_effects.conf
mount ext4 /dev/block/mmcblk0p23 /system wait ro data=ordered noauto_da_alloc
setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
mount ext4 /dev/block/mmcblk0p24 /data wait noatime nosuid nodev data=ordered noauto_da_alloc
mount ext4 /dev/block/mmcblk0p25 /cache wait noatime nosuid nodev data=ordered noauto_da_alloc
mount ext4 /dev/block/mmcblk0p28 /devlog wait noatime nosuid nodev data=ordered noauto_da_alloc
on post-fs-data
# double check the perms and set owner
chown root root /devlog
chmod 0700 /devlog
mount rootfs rootfs / remount
# for Invense MPU3050
chmod 0664 /dev/mpu
chmod 0664 /dev/mpuirq
chmod 0664 /dev/timerirq
chown system system /dev/mpu
chown system system /dev/mpuirq
chown system system /dev/timerirq
mkdir /data/radio 0770 radio radio
# Wifi
mkdir /data/misc 1771 system misc
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
#wimax
mkdir /data/misc/wimax 0770 wimax wimax
mkdir /data/misc/wimax/sockets 0770 wimax wimax
mkdir /data/wimax/ 0770 system system
mkdir /data/wimax/log 0770 system system
# Audio
mkdir /data/audio 0770 media audio
# Enable the setgid bit on the directory
chmod 2770 /data/audio
mkdir /data/radio 0770 radio radio
chmod 2770 /data/radio
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
on init
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/htc_bdaddress/parameters/bdaddress
setprop ro.bt.bdaddr_path /sys/module/htc_bdaddress/parameters/bdaddress
# Permissions for touchscreen
chmod 0666 /sys/android_touch/unlock
# Permissions for call status and camera LED
chmod 0666 /sys/camera_led_status/led_ril_status
chmod 0666 /sys/module/gpio_event/parameters/phone_call_status
# Permissions for 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/lcd-backlight/brightness
# flashlight
chown system camera /sys/class/leds/flashlight/brightness
chmod 0660 /sys/class/leds/flashlight/brightness
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# create symlink for fb1 as HDMI
symlink /dev/graphics/fb1 /dev/graphics/hdmi
# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d
# Change owner and group for media server and surface flinger
chown system system /sys/devices/virtual/graphics/fb1/format_3d
chmod 0644 /sys/devices/virtual/graphics/fb1/format_3d
chown system system /sys/devices/platform/panel_3d/3D_mode
chmod 0664 /sys/devices/platform/panel_3d/3D_mode
# for wireless modem
chown system system /sys/module/serial/parameters/modem_enabled
chown system system /dev/ttyHSUSB0
chown system system /dev/ttySA0
chown system system /dev/smd9
# for Flip to speaker
chown radio radio /sys/class/htc_accelerometer/accelerometer/PhoneOnOffFlag
chown radio radio /sys/class/htc_ecompass/ecompass/PhoneOnOffFlag
# for Optical sensors
chown system system /sys/class/optical_sensors/lightsensor/ls_adc
chown system system /sys/class/optical_sensors/lightsensor/ls_auto
chown system system /sys/class/optical_sensors/lightsensor/ls_kadc
chown system radio /sys/class/optical_sensors/proximity/ps_adc
chown system system /sys/class/optical_sensors/proximity/ps_kadc
chown system system /sys/class/optical_sensors/proximity/ps_led
chown system system /sys/class/optical_sensors/proximity/ps_test_mode
# for CM performance
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
# for simlock
chown radio radio /dev/simlock
chmod 0660 /dev/simlock
# for charging function
chown radio radio /sys/module/htc_battery_8x60/parameters/phone_call
chmod 0660 /sys/module/htc_battery_8x60/parameters/phone_call
# to enable low charge current in voice call
chown radio radio /sys/class/power_supply/battery/charger_control
chmod 0660 /sys/class/power_supply/battery/charger_control
# for Slate charging timer
chown radio /sys/class/power_supply/battery/charger_timer
chown system /sys/devices/platform/rs300000a7.65536/force_sync
chown system /sys/devices/platform/rs300000a7.65536/sync_sts
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling
# Overwrite framework low memory killer setting
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,8192,12288
write /sys/module/lowmemorykiller/parameters/minfile 2048,3072,4096,6144,8192,12288
write /sys/module/lowmemorykiller/parameters/check_filepages 1
# HTC Phone Call
chown radio /sys/module/gpio_event/parameters/phone_call_status
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.lte 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
setprop net.tcp.buffersize.evdo_b 4094,87380,262144,4096,16384,262144
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
write /proc/sys/net/core/rmem_max 3461120
write /proc/sys/net/core/wmem_max 3461120
# Force loading of modem and Q6 images
service load-modem /system/bin/load-modem.sh
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class late_start
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
# bugreport is triggered by the KEY_VOLUMEUP and KEY_VOLUMEDOWN keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
class late_start
disabled
oneshot
keycodes 114 115
service hciattach /system/bin/brcm_patchram_plus --enable_hci \
--tosleep 50000 --baudrate 3000000 --use_baudrate_for_download \
--patchram /vendor/firmware/bcm4329.hcd /dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p26 /dev/block/mmcblk0p27 /dev/block/mmcblk0p19
class core
user root
service dhcpWimax /system/bin/dhcpcd -ABKL -f /etc/wimax/dhcp/wimaxDhcp.conf wimax0
class main
class late_start
disabled
oneshot
service sequansd /system/bin/sequansd /etc/wimax/sequansd/sequansd_app.xml
user root
group root inet
socket sequansd_0 dgram 660 root root
disabled
oneshot
service wimaxDhcpRelease /system/bin/wimaxDhcpRelease
class main
user root
group root
disabled
oneshot
service wimaxDhcpRenew /system/bin/wimaxDhcpRenew
class main
user root
group root
disabled
oneshot
service wimaxAddRoute /system/bin/wimaxAddRoute
class main
user root
group root
disabled
oneshot
service wimaxDumpLogcat /system/bin/wimaxDumpLogcat /data/wimax/log
user root
group root
disabled
oneshot
service wimaxDumpKmsg /system/bin/wimaxDumpKmsg /data/wimax/log
user root
group root
disabled
oneshot
service wimaxDumpLastKmsg /system/bin/wimaxDumpLastKmsg /data/wimax/log
user root
group root
disabled
oneshot
service wmxCfgItf /system/bin/wimaxConfigInterface
user root
group root
disabled
oneshot
service wimaxDaemon /system/bin/wimaxDaemon
user root
group root
# wimax_mtd daemon
service wimax_mtd /system/bin/wimax_mtd
user root
group root
oneshot
# setWMXPropd daemon
service setWMXPropd /system/bin/setWiMAXPropDaemond
user root
group root
oneshot
# getWMXPropd daemon
service getWMXPropd /system/bin/getWiMAXPropDaemond
user root
group root
oneshot
service dmagent /system/bin/dmagent -N -P19 -VSY
socket dmagent stream 660 root radio
user root
group radio cache inet misc
service modem /system/bin/wireless_modem
user system
group system radio
disabled
on property:service.modem.enable=1
start modem
on property:service.modem.enable=0
stop modem
service hdmid /system/bin/hdmid
class late_start
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
service htcbatt /system/bin/htcbatt
class late_start
user root
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
class main
user root
disabled
service thermald /system/bin/thermald
class main
user root
group root
disabled
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class main
user root
disabled
on property:init.svc.bootanim=stopped
write /sys/devices/platform/panel_3d/3D_mode 0
start qcom-post-boot
service htc_ebdlogd /system/bin/htc_ebdlogd -s -k -P 7 -n 10 -N 10
user root
disabled
oneshot
ioprio idle 0
service htc_ebdlogd_rel /system/bin/htc_ebdlogd -s -k -n 10 -N 10
user root
disabled
oneshot
ioprio idle 0
service 3d_camera /system/bin/3D_calibration
class late_start
user root
on property:ro.build.tags=test-keys
start htc_ebdlogd
on property:ro.build.tags=release-keys
start htc_ebdlogd_rel
# QMUX must be in multiple groups to support external process connections
service qmuxd /system/bin/qmuxd
class late_start
user radio
group radio audio bluetooth gps
service netmgrd /system/bin/netmgrd
class late_start
on property:sys.radio.shutdown=true
exec /system/bin/sh /system/etc/init.qcom.efs.sync.sh