forked from milaq/android_device_lge_p940
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lgep940board.rc
executable file
·472 lines (390 loc) · 17.2 KB
/
init.lgep940board.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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
import init.p940.usb.rc
import init.p940.ril.rc
on early-init
# create mountpoints
mkdir /mnt 0775 root system
export EXTERNAL_STORAGE /mnt/sdcard
# create mountpoints
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
# create Ext SDcard mountpoint
mkdir /mnt/emmc 0000 system system
export EXTERNAL_ADD_STORAGE /mnt/emmc
# Immersion changes
export VIBE_PIPE_PATH /dev/pipes
on init
# setup the global environment
export ASEC_ADD_MOUNTPOINT /mnt/extasec
export LOOP_ADD_MOUNTPOINT /mnt/extobb
# Directory for putting things only root should see.
mkdir /mnt/extsecure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/extsecure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/extsecure/extasec 0700 root root
# Secure container public mount points.
mkdir /mnt/extasec 0700 root system
mount tmpfs tmpfs /mnt/extasec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/extobb 0700 root system
mount tmpfs tmpfs /mnt/extobb mode=0755,gid=1000
# Immersion changes
mkdir /dev/pipes 0771 shell shell
# LGE_CHANGE [[email protected]] for hidden set configuration
chown system system /sys/module/lge_handle_panic/parameters/hidden_reset_enable
chmod 660 /sys/module/lge_handle_panic/parameters/hidden_reset_enable
on early-fs
# LGE's mount points
mkdir /dvp 0771 system system
mkdir /persist 0771 system system
mkdir /mpt 0775 system system
on fs
# mount mtd partitions
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/system
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ro barrier=1
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata
exec /system/bin/tune2fs -u system -m 10 /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata
exec /system/bin/e2fsck -p /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data nosuid nodev barrier=1 noauto_da_alloc
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/cache
exec /system/bin/e2fsck -p /dev/block/platform/omap/omap_hsmmc.1/by-name/cache
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache nosuid nodev barrier=1
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/divxkey
exec /system/bin/e2fsck -p /dev/block/platform/omap/omap_hsmmc.1/by-name/divxkey
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/divxkey /dvp noatime nosuid nodev
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/persist
exec /system/bin/e2fsck -p /dev/block/platform/omap/omap_hsmmc.1/by-name/persist
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/persist /persist noatime nosuid nodev
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/mlt
exec /system/bin/e2fsck -p /dev/block/platform/omap/omap_hsmmc.1/by-name/mlt
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/mlt /mpt nosuid nodev barrier=1 data=ordered
# LGE_BSP 2012-02-01 [[email protected]] disable FUSE property value
setprop ro.crypto.fuse_sdcard false
on post-fs-data
chown system system /dvp
chmod 0771 /dvp
chown system system /persist
chmod 0771 /persist
chown system system /mpt
chmod 0775 /mpt
mkdir /data/misc/wifi 0775 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/softap 0771 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chmod 0666 /data/misc/wifi/wpa_supplicant.conf
chmod 0775 /data/misc/wifi
# create directory for lgdrm
mkdir /data/lgdrm 0770 lgdrm lgdrm_acc
# LGE_CHANGE_S [[email protected]] 2011-09-15, Create Directory for HDCP
mkdir /persist/mhl 0770 radio radio
chown system system /dev/hdcp
chmod 0644 /dev/hdcp
# LGE_CHANGE_E [[email protected]] 2011-09-15
# LGE_D1_BSP_ICS_S [email protected] 2012-02-16 audio file access [START_LGE]
mkdir /data/audio 0770 media audio
chown media audio /data/audio
chmod 0770 /data/audio
# LGE_D1_BSP_ICS_E [email protected] 2012-02-16 audio file access [END_LGE]
# LGE_UPDATE_S [email protected] 20110415
# gps permissions
# GPS GPIO Setting - refer gps_gpio.c(android\kernel\drivers\p940\misc)
chown system system /sys/devices/platform/gps_gpio/poweron
chown system system /sys/devices/platform/gps_gpio/reset
# GPS UART Setting
chown system system /dev/ttyO2
# GPS RIL port Setting
chown system system /dev/pts17
# glgps & libgps & log setting
# data
# /gps
# gldata.sto: The assistance data in file format
# glgpsctrl: The control (Unix) socket for string based commands ($pglirm).
# Please refer to doc\html\irm_commands.html
# lcs.socket: The LCS (Unix) socket
# /log: The log directory
# gpspipe: The NMEA printing output socket.
# 3gpp.socket: The 3GPP control plane (Unix) socket
mkdir /data/gps
chmod 770 /data/gps
chown system system /data/gps
mkdir /data/gps/log
chmod 770 /data/gps/log
chown system system /data/gps/log
mkdir /data/cache
chmod 770 /data/cache
chown system system /data/cache
# chown root /system/bin/glgps
chown system system /system/bin/glgps
chown system system /system/etc/gps_brcm_conf.xml
chown system system /system/etc/cert/
chown system system /system/etc/cert/lge.cer
# LGE_UPDATE_E [email protected] 20110415
# Create dump dir and collect dumps.
mkdir /data/dontpanic
chown root system /data/dontpanic
chmod 0754 /data/dontpanic
# collect ramconsole data
copy /proc/last_kmsg /data/dontpanic/last_kmsg.txt
chown root log /data/dontpanic/last_kmsg.txt
chmod 0640 /data/dontpanic/last_kmsg.txt
# collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
#BEGIN: ICS POWER [email protected] 2012-02-02
chown system system /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl6030_bci/smpl_en
chown system system /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl6030_bci/abnormal_wakelock_dis
chown system system /sys/class/power_supply/battery/temp_control
chown radio radio /sys/class/power_supply/battery/charger_mode
chown radio radio /sys/class/power_supply/battery/gauge_control
chown radio radio /sys/class/power_supply/bk_battery/voltage_now
chmod 0664 /sys/devices/platform/omap/omap_i2c.4/i2c-4/4-0036/state
#END: ICS POWER [email protected] 2012-02-02
#BEGIN: change persmissions for ALS/PROX_SENSOR [email protected] 2012-03-13
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/interrupt_als
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/interrupt_prox
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/proxidata
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/luxdata
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/DF
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/GA
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/piht
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/pilt
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/pers
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ppcount
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/wtime
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ptime
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/atime
#END: change permissions for ALS/PROX_SENSOR [email protected] 2012-03-13
#BEGIN: MPL 3.3 integration [email protected] 2012-03-23
chmod 0777 /dev/mpu
chmod 0777 /dev/mpuirq
chmod 0777 /dev/timerirq
#END: MPL 3.3 integration [email protected] 2012-03-23
#BEGIN: change permissions for KEY [email protected] 2012-03-13
chown radio radio /sys/devices/platform/lge-gkpd/key_test_mode
chown radio radio /sys/devices/platform/omap/omap4-keypad/key_saving
#END: change permissions for KEY [email protected] 2012-03-13
#BEGIN: 0019605 [email protected] 2012-01-04
#MOD: 0019605 [P2_ICS][BT] UART2: Bring up code.
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chmod 0660 /sys/class/rfkill/rfkill1/state
chmod 0660 /sys/class/rfkill/rfkill1/type
chmod 0660 /dev/ttyO1
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
chown bluetooth bluetooth /dev/ttyO1
chmod 0660 /sys/devices/platform/bd_address/bdaddr_if
chown radio radio /sys/devices/platform/bd_address/bdaddr_if
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
setprop sys.settings_secure_version 0
#END: 0019605 [email protected] 2011-01-04
#BEGIN: Log Service [email protected]
mkdir /data/logger 0775 system system
chown system system /data/logger
chmod 0771 /data/logger
# setprop persist.service.main.enable 1
# setprop persist.service.system.enable 1
# setprop persist.service.radio.enable 1
# setprop persist.service.events.enable 1
# setprop persist.service.kernel.enable 1
# setprop persist.service.ducati.enable 1
# setprop persist.service.packet.enable 1
#END: Log Service [email protected]
#BEGIN: To getting orient [email protected] 2012-03-06
chown system system /sys/class/mhl_orient/mhl_dev_orient/MHL_orient
#END: To getting orient [email protected] 2012-03-06
# setup power-off charger service - [email protected]
service charger /charger
class charger
user root
group root
oneshot
on boot
chmod 0666 /dev/pvrsrvkm
# change permissions for Tiler driver
chmod 0777 /dev/tiler
chmod 0777 /dev/dmm
# LGE_CHANGE_S [[email protected]] 2011-12-21, Create Directory for Secure Storage
mkdir /data/smc 0770 drmrpc drmrpc
# LGE_CHANGE_E [[email protected]] 2011-12-21
mount debugfs /sys/kernel/debug /sys/kernel/debug
# touch
chown system system /sys/devices/virtual/input/lge_touch/keyguard
# change permissions for ION driver
chmod 0777 /dev/ion
chown system graphics /sys/class/graphics/fb0/overlays
chown system graphics /sys/class/graphics/fb0/fit_to_screen
chown system graphics /sys/class/graphics/fb0/overlays_rotate
chmod 0777 /dev/graphics/fb0
chmod 0777 /dev/graphics/fb1
# [email protected] 2012.04.19
# MOD : for HiddenMenu
chown system system /sys/devices/platform/omapdss/display1/enabled
chown system system /sys/devices/platform/omapdss/display1/bestScore
chmod 0660 /sys/devices/platform/omapdss/display1/enabled
chmod 0660 /sys/devices/platform/omapdss/display1/bestScore
# change permissions for LCD backlight
chown system radio /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0038/brightness
chmod 0664 /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0038/brightness
# change permissions for LCD Gamma Tuning
chown system radio /sys/devices/omapdss/display0/gamma_tuning
chmod 0660 /sys/devices/omapdss/display0/gamma_tuning
# change permissions for LED backlight
chown system radio /sys/class/leds/button-backlight/br_maintain_on
chmod 0660 /sys/class/leds/button-backlight/br_maintain_on
chown system radio /sys/class/leds/button-backlight/brightness
chmod 0660 /sys/devices/platform/keypad_led/leds/button-backlight/brightness
# change NFC permission
chmod 0666 /dev/pn544
# LGE_UPDATE_S [dongki.cheon, 2012.01.09] for usb serial
# LGE_UPDATE_S hunsoo.lee for usb serial
chmod 0777 /dev/ttyGS0
chmod 0777 /dev/ttyGS1
chmod 0777 /dev/ttyGS2
# LGE_UPDATE_E
# LGE_UPDATE_E
# LGE_ADD_START, 20120202 [email protected], set permission misc and nv for CTS Pass
chown system media_rw /dev/block/platform/omap/omap_hsmmc.1/by-name/misc
chmod 0660 /dev/block/platform/omap/omap_hsmmc.1/by-name/misc ## misc partition
chown system media_rw /dev/block/platform/omap/omap_hsmmc.1/by-name/nv
chmod 0660 /dev/block/platform/omap/omap_hsmmc.1/by-name/nv ## NV partition
# LGE_ADD_END
# MUIC permission
chown system radio /sys/class/muic/tsu5611/state
chmod 0664 /sys/class/muic/tsu5611/state
#USB VID permission
chown system system /sys/class/android_usb/android0/idVendor
chmod 0664 /sys/class/android_usb/android0/idVendor
# LGE_ADD, [email protected], write access permission for autorun
chown system system /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode
# Start : Set DivXDRM Memory [hanjun11.cho, 2012.02.17]
mkdir /dvp/rysh 0770 system divxdrm
chown media divxdrm /dvp/rysh
chmod 0770 /dvp/rysh
mkdir /dvp/ooda 0770 system divxdrm
chown media divxdrm /dvp/ooda
chmod 0770 /dvp/ooda
mkdir /dvp/ssamu system divxdrm
chown media divxdrm /dvp/ssamu
chmod 0770 /dvp/ssamu
# Start : Set widevine drm keybox repository [[email protected], 2012.02.21]
mkdir /dvp/jjn 0770 drm system
# End : Set widevine drm keybox repository [[email protected], 2012.02.21]
chown system system /dvp
chmod 0771 /dvp
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw divxdrm
ioprio rt 4
# LGE_ADD_START, 20120130 [email protected], The spritebud daemon process is started when the device is booted.
service spritebud /system/xbin/spritebud
class main
socket spritebud stream 660 root radio
user root
group root
# LGE_ADD_END
service pvrsrvinit /vendor/bin/pvrsrvinit
class core
user root
group root
oneshot
# [email protected] by kwisuk.kwon, 20120530, delete '-dd' to change a debug log level
service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
class main
group system wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
#service dhcpcd_wlan0 /system/bin/dhcpcd -BKLG # [email protected] by wo0ngs, enabling AUTO IP and not enabling ARP option
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKG
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -BKLG
class main
disabled
oneshot
#LGE_CHANGE_S, [email protected] by 2lee, 20120518, modifying iprenew parameter and option.
service iprenew_wlan0 /system/bin/dhcpcd -nK
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -nK
class main
disabled
oneshot
service hostapd /system/bin/hostapd -dddd /data/misc/wifi/hostapd.conf
class main
group system wifi inet
socket wpa_wlan1 dgram 660 wifi wifi
oneshot
disabled
# gspapa 2012-02-28 begin
service ap_at_command /system/bin/ap_at_command
class main
user root
group system input graphics media_rw sdcard_rw
# gspapa 2012-02-28 end
# GPS [Start]
service glgps /system/bin/glgps -c /system/etc/gps_brcm_conf.xml
class main
user system
group net_raw sdcard_rw system radio
# GPS [End]
# Begin Immersion changes
service immvibed /system/bin/immvibed_linear
class main
user shell
group shell
oneshot
# End Immersion changes
service btld /system/bin/logwrapper /system/bin/btld -pf /vendor/firmware/bcm4330.hcd -hb 3000000 -hp /dev/ttyO1 -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
#STOPSHIP: Remove logwrapper and -d option before production
#service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -d -n
service bluetoothd /system/bin/bluetoothd -n
class main
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
#--- BRCM
# END: 0019609 [email protected] 2012-01-30
service hdcp-init /system/bin/hdcp-init 1 3 >> /data/mhl.log
class main
user root
group radio system sdcard_rw shell
oneshot
# RIP-13109 : To access NV area, RILD should have group id of 'media_rw' : [email protected] [START]
service ril-daemon /system/bin/rild
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw log media_rw
# RIP-13109 : To access NV area, RILD should have group id of 'media_rw' : [email protected] [END]