-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.lgep760board.rc
525 lines (424 loc) · 17.4 KB
/
init.lgep760board.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
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
import init.p760.usb.rc
on early-init
# create mountpoints
mkdir /mnt 0775 root system
# create Internal storage
mkdir /mnt/sdcard 0000 system system
export EXTERNAL_STORAGE /mnt/sdcard
# create Ext SDcard mountpoint
mkdir /mnt/sdcard/external_sd 0000 system system
export EXTERNAL_ADD_STORAGE /mnt/sdcard/external_sd
# for backwards compatibility
symlink /mnt/sdcard /mnt/sdcard
symlink /mnt/sdcard/external_sd /mnt/sdcard/external_sd
# 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
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
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ro barrier=1
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache nosuid nodev barrier=1
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/divxkey /dvp noatime nosuid nodev
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/persist /persist noatime nosuid nodev
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/mlt /mpt nosuid nodev barrier=1 noauto_da_alloc
# disable FUSE property value
setprop ro.crypto.fuse_sdcard true
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
# wifi fw path file
write /data/misc/wifi/fw_path 0
chown wifi wifi /data/misc/wifi/fw_path
chmod 0660 /data/misc/wifi/fw_path
# create directory for lgdrm
mkdir /data/lgdrm 0770 lgdrm lgdrm_acc
# LGE_CHANGE_S make drm partition mount point, drm partion will be mounted here
mkdir /persist-lg 0771 system system
# LGE_CHANGE_E make drm partition mount point
# LGE_CHANGE_S make lgdrm, divxdrm directory in drm partion
chown system system /persist-lg
chmod 0771 /persist-lg
mkdir /persist-lg/lgdrm 0770 lgdrm lgdrm_acc
chown lgdrm lgdrm_acc /persist-lg/lgdrm
chmod 0770 /persist-lg/lgdrm
# create directory for DRM plug-ins - give drm the read/write access to
# the following directory.
mkdir /data/drm 0770 drm drm
# hdcp
mkdir /persist/mhl 0770 radio radio
chown system system /dev/hdcp
chmod 0644 /dev/hdcp
# busybox binary
chmod 0777 /system/xbin/busybox
# Create Directory for widevine
mkdir /persist/widevine 0770 drm system
# FUSE property value
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
# add symlink for HDCP key
symlink /persist/en_hdcp.bin /system/vendor/firmware/hdcp.keys
# audio
mkdir /data/audio 0770 media audio
chown media audio /data/audio
chmod 0770 /data/audio
# GPS
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
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 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
# POWER
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
# permissions for PROXIMITY SENSOR
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/atime
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ptime
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/wtime
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/pers
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ppcount
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/control
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ps_threshold
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/ps_hysteresis
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/enable_ps_sensor
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/id
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/pdata
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/status
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/run_calibration
chown system radio /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/default_crosstalk
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
# LGE_CHANGE_S [[email protected]] to reduce power consumption & overheat during video play.
chown radio system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# LGE_CHANGE_E [[email protected]] to reduce power consumption & overheat during video play.
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
#LGE_CHANGE_S 20120720, [email protected] [data] Disable IPv6 for mobile network
write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rment1/disable_ipv6 1
write /proc/sys/net/ipv6/conf/rmnet2/disable_ipv6 1
#LGE_CHANGE_E 20120720, [email protected] [data] Disable IPv6 for mobile network
# Usb
chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
# mpl
chmod 0777 /dev/mpu
chmod 0777 /dev/mpuirq
chmod 0777 /dev/timerirq
# permissions for KEY
chown radio radio /sys/devices/platform/lge-gkpd/key_test_mode
chown radio radio /sys/devices/platform/omap/omap4-keypad/key_saving
chown radio radio /sys/devices/platform/lge-gkpd/key_lock
# UART2
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
setprop ro.bt.bdaddr_path "/sys/devices/platform/bd_address/bdaddr_if"
chmod 0660 /sys/devices/platform/bd_address/bdaddr_if
chown bluetooth bluetooth /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
mkdir /data/logger 0775 system system
chown system system /data/logger
chmod 0771 /data/logger
chown system system /sys/class/mhl_orient/mhl_dev_orient/MHL_orient
on early-boot
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
on boot
setprop rild.libpath /system/lib/lge-ril.so
chmod 0666 /dev/pvrsrvkm
chmod 0777 /dev/tiler
chmod 0777 /dev/dmm
mkdir /data/smc 0770 drmrpc drmrpc
mount debugfs /sys/kernel/debug /sys/kernel/debug
chown system system /sys/devices/virtual/input/lge_touch/keyguard
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
# 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 LM3530
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 backlight LM3533
chown system radio /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0036/brightness
chmod 0664 /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0036/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
# nfc
chmod 0666 /dev/pn544
# usb serial
chmod 0777 /dev/ttyGS0
chmod 0777 /dev/ttyGS1
chmod 0777 /dev/ttyGS2
# misc and nv for CTS Pass
chown system misc /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 misc /dev/block/platform/omap/omap_hsmmc.1/by-name/nv
chmod 0660 /dev/block/platform/omap/omap_hsmmc.1/by-name/nv ## NV partition
# MUIC
chown system radio /sys/class/muic/tsu5611/state
chmod 0664 /sys/class/muic/tsu5611/state
# USB VID
chown system system /sys/class/android_usb/android0/idVendor
chmod 0664 /sys/class/android_usb/android0/idVendor
# write access permission for drive emulation
chown system system /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode
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
# widevine drm keybox repository
mkdir /dvp/jjn 0770 drm system
chown system system /dvp
chmod 0771 /dvp
# TI sdram frequency set problem work around
# Temporarily adjust CPU frequency and reset to (performance) interactive
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor userspace
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 800000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
on charger
# disable second core while charging (cpufreq gets handled by charger blob)
write /sys/devices/system/cpu/cpu1/online 0
service charger /charger
class charger
user root
group root
oneshot
service spritebud /system/xbin/spritebud
class main
socket spritebud stream 660 root radio
user root
group root
service lgsecclk /system/bin/lgsecclkserver
class main
user system
group system lgdrm_acc sdcard_rw media_rw
# restart when servicemanager is restarted
on property:init.svc.servicemanager=restarting
restart lgsecclk
service lgdrm /system/bin/lgdrmserver
class main
user root
group lgdrm_acc sdcard_rw media_rw system radio
# restart when servicemanager is restarted
on property:init.svc.servicemanager=restarting
restart lgdrm
service hciattach /system/bin/brcm_patchram_plus --enable_hci --no2bytes --enable_lpm \
--scopcm=0,4,0,1,1,0,0,3,3,0 --baudrate 3000000 --use_baudrate_for_download \
--tosleep 50000 --patchram /vendor/firmware/bcm4330.hcd /dev/ttyO1
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pvrsrvinit /vendor/bin/pvrsrvinit
class core
user root
group root
oneshot
# service for BMC050(accelerometer & compass sensor)
service sensord /system/bin/sensord
# user compass
# group compass misc input
class main
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
class main
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 main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service ap_at_command /system/bin/ap_at_command
class main
user root
group system input graphics media_rw sdcard_rw
# FUSE daemon
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
service glgps /system/bin/glgps -c /system/etc/gps_brcm_conf.xml
class main
user system
group net_raw sdcard_rw system radio
service rawip_rmnet1 /system/bin/init.rmnet 1
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rawip_rmnet2 /system/bin/init.rmnet 2
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rawip_rmnet3 /system/bin/init.rmnet 3
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rmnet1_down /system/bin/init.rmnet-down 1
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rmnet2_down /system/bin/init.rmnet-down 2
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service rmnet3_down /system/bin/init.rmnet-down 3
class main
user root
group radio cache inet misc net_admin net_raw
disabled
oneshot
service hdcp-init /system/bin/hdcp-init 1 3 >> /data/mhl.log
class main
user root
group radio system sdcard_rw shell
oneshot
service wifimac /system/bin/wifimac
class main
oneshot