-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.wmt.rc
executable file
·405 lines (317 loc) · 10.7 KB
/
init.wmt.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
import init.wmt.usb.rc
on init
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
mkdir /storage/sdcard1 0000 system system
mkdir /storage/udisk 0000 system system
mkdir /storage/udisk2 0000 system system
mkdir /storage/udisk3 0000 system system
mkdir /storage/udisk4 0000 system system
mkdir /storage/udisk5 0000 system system
mkdir /storage/udisk6 0000 system system
mkdir /storage/udisk7 0000 system system
mkdir /storage/udisk8 0000 system system
export EXTERNAL_STORAGE /storage/emulated/legacy
export SECONDARY_STORAGE /storage/sdcard1
export THIRD_STORAGE /storage/udisk
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# export HOME /
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /storage/sdcard1 /mnt/extsdcard
symlink /storage/sdcard1 /extsdcard
symlink /storage/udisk /mnt/udisk
symlink /storage/udisk /udisk
unexport_for_sdexternal EXTERNAL_STORAGE /storage/emulated/legacy
unexport_for_sdexternal SECONDARY_STORAGE /storage/sdcard1
unexport_for_sdexternal EMULATED_STORAGE_SOURCE /mnt/shell/emulated
unexport_for_sdexternal EMULATED_STORAGE_TARGET /storage/emulated
export_for_sdexternal EXTERNAL_STORAGE /storage/sdcard1
export_for_sdexternal SECONDARY_STORAGE /storage/sdcard0
export_for_sdexternal WMT_VISIBLE_INTERNAL /storage/emulated/legacy
export_for_sdexternal WMT_EMULATED_SOURCE /mnt/shell/emulated
export_for_sdexternal WMT_EMULATED_TARGET /storage/emulated
symlink_for_sdexternal /storage/sdcard1 /sdcard
symlink_for_sdexternal /storage/sdcard1 /mnt/sdcard
# backlight
chown system system /sys/class/backlight/pwm-backlight.0/brightness
# led for SK
chown system system /sys/class/leds/genesis-led/enable
on fs
mount_all /fstab.wmt
setprop ro.crypto.fuse_sdcard true
# Widevine
chown system system /system/vendor/lib
chmod 0775 /system/vendor/lib
chown system system /system/vendor/lib/drm
chmod 0775 /system/vendor/lib/drm
mkdir /mnt/keybox 0775 system system
mount yaffs2 mtd@keydata /mnt/keybox nosuid nodev
chown system system /mnt/keybox
chmod 0775 /mnt/keybox
mkdir /lib/ 0771 system system
mkdir /lib/modules 0771 system system
symlink /system/modules /lib/modules/3.4.5
symlink /system/modules /lib/modules/3.4.5+
symlink /system/etc/firmware /lib/firmware
symlink /system/bin/reboot /sbin/reboot
symlink /data/ppp/peers /system/etc/ppp/peers
optbcp /system/framework/wmt.iapplib.jar
on post-fs
# insmod for fastboot
insmod /system/modules/3.4.5-default/bt_hwctl.ko
insmod /system/modules/3.4.5-default/s_wmt_ts_zet6221.ko
insmod /system/modules/3.4.5-default/s_wmt_gsensor_mc3230.ko
insmod /system/modules/3.4.5-default/s_wmt_batt_vt1603.ko
insmod /system/modules/3.4.5-default/usb_wwan.ko
insmod /system/modules/3.4.5-default/option.ko
insmod /system/modules/3.4.5-default/cdc_acm.ko
# insmod media video driver module
insmod /system/modules/3.4.5-default/g_wmt_lock.ko
insmod /system/modules/3.4.5-default/g_wmt_vd_com.ko
insmod /system/modules/3.4.5-default/g_wmt_vd_jdec.ko
insmod /system/modules/3.4.5-default/g_wmt_msvd.ko
# insmod media video encoder driver module
insmod /system/modules/3.4.5-default/g_wmt_ve_com.ko
insmod /system/modules/3.4.5-default/g_wmt_ve_h264.ko
insmod /system/modules/3.4.5-default/g_wmt_ve_jpeg.ko
# insmod cipher driver module, already be compiled into kernel
# insmod /system/modules/3.4.5-default/g_crypto.ko
# insmod camera driver module
insmod /system/modules/3.4.5-default/nmidrv.ko
#insmod /system/modules/3.4.5-default/g_wmt_v4l2.ko
insmod /system/modules/3.4.5-default/g_wmt_v4l2_cmos.ko
#insmod /system/modules/3.4.5-default/g_wmt_cmoscam.ko
chmod 0666 /dev/jdec
chmod 0666 /dev/h264enc
chmod 0666 /dev/msvd
chmod 0666 /dev/cipher
chmod 0666 /dev/wmtgpio
chmod 0666 /dev/mtd/mtd0
chmod 0666 /dev/graphics/fb0
chmod 0666 /dev/fb0
chmod 0666 /dev/graphics/fb1
chmod 0666 /dev/fb1
chmod 0666 /dev/mbdev
chmod 0755 /sys/mmc0/state
# Camera device node
chmod 0666 /dev/nmi
chmod 0666 /dev/video0
chmod 0666 /dev/video1
#system clock
chown 1000 /sys/devices/system/clocksource/clocksource0/current_clocksource
# Set property to let system know fuse path
setprop ro.fuse.dir /data/media
setprop ro.fuse.mount_point /storage/emulated
on post-fs-data
# we will remap this as /data/media with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
setprop vold.post_fs_data_done 1
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/ppp 0777 radio radio
mkdir /data/ppp/peers 0777 radio radio
service mali /system/bin/sh /system/etc/wmt/script/init_mali.sh
class core
oneshot
service initrdscript /system/etc/wmt/runinitscript.sh
class main
oneshot
service wmtserver /system/bin/wmtserver
class main
#disabled
service wmtbattery /system/bin/wmtbattery
class main
# virtual sdcard daemon running as media_rw (1023)
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
#class core
service ifup_eth0 /system/bin/ifconfig eth0 up
class main
disabled
oneshot
service ifdown_eth0 /system/bin/ifconfig eth0 down
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/logwrapper /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_eth1 /system/bin/logwrapper /system/bin/dhcpcd -ABKL eth1
class main
disabled
oneshot
service wakeupModem /system/bin/wakeupxgmodem 1
oneshot
disabled
service releaseModem /system/bin/wakeupxgmodem 0
oneshot
disabled
service powerxgmodemOnce /system/etc/modemenable.sh 2
class main
oneshot
service powerxgmodemOn /system/etc/modemenable.sh 1
oneshot
disabled
service powerxgmodemOff /system/etc/modemenable.sh 0
oneshot
disabled
service stopMux /usr/bin/killall -9 gsmMuxd
oneshot
disabled
service mux /system/bin/gsmMuxd -p /dev/ttyACM0 -w -r -s /dev/mux /dev/ptmx /dev/ptmx -d -b 460800 -m generic
user root
group radio cache inet misc
disabled
service mux_mtk /system/bin/gsmMuxd_mtk -p /dev/ttyS2 -b 115200 -d -w -r -s /dev/mux /dev/ptmx /dev/ptmx /dev/ptmx
user root
group radio cache inet misc
disabled
service mux_rda /system/bin/gsmMuxd_rda -v 0 -p /dev/ttyS2 -s /dev/mux -b 115200 -n 3
user root
group radio cache inet misc
disabled
service mux_sp /system/bin/mux_sp
user root
group radio cache inet misc
disabled
service memsicd /system/bin/memsicd
user root
group system
oneshot
disabled
service stopMemsicd /usr/bin/killall -9 memsicd
user root
group system
oneshot
disabled
service uaplayback /system/etc/uaplayback.sh
oneshot
disabled
service uastop /system/etc/uastop.sh
oneshot
disabled
service hdmi2usbSwitch /system/etc/hdmi2usbSwitch.sh 1
oneshot
disabled
service usb2hdmiSwitch /system/etc/hdmi2usbSwitch.sh 0
oneshot
disabled
on property:msensor.memsicd=1
start memsicd
on property:msensor.memsicd=0
start stopMemsicd
on property:ril.modem.reset=1
start powerxgmodemOnce
on property:wmt.usb.audio.playback=1
start uaplayback
on property:wmt.usb.audio.playback=0
start uastop
on property:wmt.hdmi.usb.audio.switch=1
start hdmi2usbSwitch
on property:wmt.hdmi.usb.audio.switch=0
start usb2hdmiSwitch
on property:ril.power.on=1
start powerxgmodemOn
on property:ril.power.on=0
stop ril-daemon
stop ril-daemon2
stop mux
stop mux_mtk
stop mux_sp
stop mux_rda
start stopMux
start powerxgmodemOff
on property:ril.mux.start=1
start mux
on property:ril.mux_mtk.start=1
start mux_mtk
on property:ril.mux_sp.start=1
start mux_sp
on property:ril.mux_rda.start=1
start mux_rda
on property:ril.both.stop=1
stop ril-daemon
stop ril-daemon2
stop mux
start stopMux
on property:ril.killpppd.start=1
start pppd_unique
on property:ril.killchat.start=1
start chat_unique
on property:ril.usb.exception=1
stop pppd-gprs
start pppd_unique
start chat_unique
start usbko_reset
service usbko_reset /system/etc/usbko_reset.sh
oneshot
user root
disabled
service pppd_unique /usr/bin/killall -9 pppd
oneshot
user root
disabled
service chat_unique /usr/bin/killall -9 chat
oneshot
user root
disabled
on property:ril.gprs.start=1
start pppd-gprs
on property:ril.gprs.start=0
stop pppd-gprs
service pppd-gprs /system/etc/ppp/init.gprs-pppd
oneshot
user root
group radio cache inet misc audio
disabled
on property:ril.daemon.start=1
start wakeupModem
start ril-daemon
on property:ril.daemon.start=0
stop ril-daemon
start releaseModem
on property:ril.daemon2.start=1
start ril-daemon2
on property:ril.daemon2.start=0
stop ril-daemon2
service ril-daemon2 /system/bin/rild2 -s rild2 -d /dev/ts0710mux4 -u /dev/ts0710mux3
class main
socket rild2 stream 660 root radio
socket rild2-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log
disabled
service rild3g_server /system/bin/ril3g_server
class main
service pppoe /system/bin/pppdnew
class main
user root
disabled
#just for isdbt of Siano
service mtvserver /system/bin/mtvserver
class main
user root
onrestart restart mtvserver
service dhcp6c_eth0 /system/bin/dhcp6c -v -f -c /system/etc/dhcp6c.conf eth0
class main
user root
disabled
# Performance Settings Configuration
on property:persist.wmt.perf.cpugovernor=*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ${persist.wmt.perf.cpugovernor}
#use persist.wmt.perf.cpumaxfreq property to save the property below
on property:hw.wmt.perf.cpumaxfreq=*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq ${hw.wmt.perf.cpumaxfreq}
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
#on property:persist.wmt.perf.cpuminfreq=*
# write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ${persist.wmt.perf.cpuminfreq}
# For Genesis Led
on property:persist.wmt.perf.genesisiled=*
write /sys/class/leds/genesis-led/enable ${persist.wmt.perf.genesisiled}