forked from CyanogenMod/android_device_lge_p760
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lgep760board.rc
386 lines (320 loc) · 14.3 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
import init.p760.usb.rc
on early-init
# create mountpoints
mkdir /storage 0050 system sdcard_r
mkdir /persist 0500 system system
chown system system /sys/module/lge_handle_panic/parameters/hidden_reset_enable
chmod 660 /sys/module/lge_handle_panic/parameters/hidden_reset_enable
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
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# 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
mkdir /storage/sdcard1 0000 system system
on fs
mount_all ./fstab.lgep760board
# disable FUSE property value
setprop ro.crypto.fuse_sdcard true
## This needs to run ASAP to set up the framebuffer before zygote kicks in
start pvrsrvinit
on post-fs-data
mkdir /data/lgdrm 0770 lgdrm lgdrm_acc
chown root system /data/dontpanic
chmod 0775 /data/dontpanic
chown system system /persist
chmod 0771 /persist
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 0775 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chmod 0666 /data/misc/wifi/wpa_supplicant.conf
chmod 0775 /data/misc/wifi
# Create Directory for HDCP
mkdir /persist/mhl 0770 radio radio
chown system system /dev/hdcp
chmod 0644 /dev/hdcp
# Hardware tunable perms
chown root system /sys/devices/omapdss/display0/gamma_tuning
chown root system /sys/devices/platform/tspdrv/nforce_timed
chmod 0664 /sys/devices/omapdss/display0/gamma_tuning
chmod 0664 /sys/devices/platform/tspdrv/nforce_timed
restorecon /sys/devices/omapdss/display0/gamma_tuning
restorecon /sys/devices/platform/tspdrv/nforce_timed
# 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
# audio file access
mkdir /data/audio 0770 media audio
chown media audio /data/audio
chmod 0770 /data/audio
# gps permissions
# GPS GPIO Setting - refer gps_gpio.c(android\kernel\drivers\p760\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
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
# 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
# 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
# persmissions 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 MOTION SENSOR
chown system radio /sys/class/input/input0/fast_calibration_x
chown system radio /sys/class/input/input0/fast_calibration_y
chown system radio /sys/class/input/input0/fast_calibration_z
chown system radio /sys/class/input/input0/softreset
chown system radio /sys/class/input/input0/eeprom_writing
chown system radio /sys/class/input/input0/bandwidth
chown system compass /sys/class/input/input0/delay
chown system compass /sys/class/input/input0/mode
chown system compass /sys/class/input/input0/range
chown system compass /sys/class/input/input0/update
chown system compass /sys/class/input/input1/op_mode
chown system compass /sys/class/input/input1/rept_xy
chown system compass /sys/class/input/input1/rept_z
# 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
# BT 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
chmod 0664 /sys/devices/platform/bd_address/bdaddr_if
chown radio 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
# Log Service
mkdir /data/logger 0775 system system
chown system system /data/logger
chmod 0771 /data/logger
# HML orient
chown system system /sys/class/mhl_orient/mhl_dev_orient/MHL_orient
on boot
chmod 0666 /dev/pvrsrvkm
# change permissions for Tiler driver
chmod 0777 /dev/tiler
chmod 0777 /dev/dmm
# Create Directory for Secure Storage
mkdir /persist/smc 0770 system system
# debugfs
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
# 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
# usb serial
chmod 0777 /dev/ttyGS0
chmod 0777 /dev/ttyGS1
chmod 0777 /dev/ttyGS2
# 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
# 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
# write access permission for autorun
chown system system /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode
# Create this file in case it doesn't exist, needed to switch wifi modes:
write /data/misc/wifi/fw_path ""
chmod 0666 /data/misc/wifi/fw_path
# Create this file in case it doesn't exist, needed to get wifi address:
write /data/misc/wifi/macAddress ""
chmod 0660 /data/misc/wifi/macAddress
chown system radio /data/misc/wifi/macAddress
## Sensors daemon stuff
mkdir /data/misc/sens 2755 system compass
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_S 20120228, [email protected] [data] Increase TCP Buffer Size
setprop net.tcp.buffersize.default 4096,87380,393216,4096,16384,110208
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.umts 4094,87380,393216,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,393216,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
#LGE_CHANGE_E 20120228, [email protected] [data] Increase TCP Buffer Size
#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
service pvrsrvinit /vendor/bin/pvrsrvinit
disabled
user root
group root
oneshot
service sensord /system/bin/sensord
user system
group compass misc input
class main
oneshot
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 lgdrm
group lgdrm_acc sdcard_rw media_rw system radio
# restart when servicemanager is restarted
on property:init.svc.servicemanager=restarting
restart lgdrm
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABKG
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aBKLG
class main
disabled
oneshot
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
# GPS
service glgps /system/bin/glgps -c /system/etc/gps_brcm_conf.xml
class main
user system
group net_raw sdcard_rw system radio
# create virtual SD card at /mnt/sdcard, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
# FUSE daemon
service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
class late_start
## Set the wifi mac address
on property:dev.bootcomplete=1
exec /system/bin/wifimac
on property:dev.bootcomplete=1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 20000
service charger /charger
class charger
user root
group root
oneshot