forked from CyanogenMod/android_device_lge_p920
-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.cosmo.rc
executable file
·436 lines (378 loc) · 22.4 KB
/
init.cosmo.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
import init.p920.usb.rc
import init.storage.rc
import init.wifi.bt.rc
on init
# Preload libjhead for camera
export LD_PRELOAD /system/lib/libjhead.so
on post-fs-data
mkdir /misc 0771 system misc
mkdir /lgdrm 0770 system system
mkdir /sqlite_stmt_journals 01777 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chmod 0777 /dev/pcmC0D0c
chmod 0777 /dev/pcmC0D0p
chmod 0777 /dev/controlC0
chmod 0777 /dev/timer
# Log Service
mkdir /data/logger 0775 system system
chown system system /data/logger
chmod 0771 /data/logger
### LGE STUFFS
chown root radio /proc/cmdline
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0020/gripsuppression
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0020/handsuppression
chown system radio /sys/devices/platform/omap/omap_i2c.2/i2c-2/2-0036/brightness
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0036/enable
chown system radio /sys/devices/platform/keypad_led/leds/keyboard-backlight/brightness
chown system radio /sys/devices/platform/omap-keypad/key_test_mode
chown system radio /sys/devices/platform/i2c_omap.4/i2c-4/4-0068/cal_onoff
chown system radio /misc/cal.bin
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/atime
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/wtime
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/pers
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/piht
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/DF
chown system system /sys/devices/platform/omap/omap_i2c.3/i2c-3/3-0039/pdata
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/omapdss/display0/enabled
chown system system /sys/devices/platform/omapdss/display1/enabled
chown system system /sys/devices/platform/omapdss/display2/enabled
chown system system /sys/devices/platform/omapdss/display3/enabled
chown system system /sys/devices/platform/omapdss/display0/name
chown system system /sys/devices/platform/omapdss/display1/name
chown system system /sys/devices/platform/omapdss/display2/name
chown system system /sys/devices/platform/omapdss/display3/name
chown system system /sys/devices/platform/omapdss/overlay0/manager
chown system system /sys/devices/platform/omapdss/overlay1/manager
chown system system /sys/devices/platform/omapdss/overlay2/manager
chown system system /sys/devices/platform/omapdss/overlay3/manager
chown system system /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay1/zorder
chown system system /sys/devices/platform/omapdss/overlay2/zorder
chown system system /sys/devices/platform/omapdss/overlay3/zorder
chown system system /sys/devices/platform/omapdss/overlay0/position
chown system system /sys/devices/platform/omapdss/overlay1/position
chown system system /sys/devices/platform/omapdss/overlay2/position
chown system system /sys/devices/platform/omapdss/overlay3/position
chown system system /sys/devices/platform/omapdss/overlay0/output_size
chown system system /sys/devices/platform/omapdss/overlay1/output_size
chown system system /sys/devices/platform/omapdss/overlay2/output_size
chown system system /sys/devices/platform/omapdss/overlay3/output_size
chown system system /sys/devices/platform/omapdss/overlay0/portrait_position
chown system system /sys/devices/platform/omapdss/overlay1/portrait_position
chown system system /sys/devices/platform/omapdss/overlay2/portrait_position
chown system system /sys/devices/platform/omapdss/overlay3/portrait_position
chown system system /sys/devices/platform/omapdss/overlay0/portrait_output_size
chown system system /sys/devices/platform/omapdss/overlay1/portrait_output_size
chown system system /sys/devices/platform/omapdss/overlay2/portrait_output_size
chown system system /sys/devices/platform/omapdss/overlay3/portrait_output_size
chown system system /sys/devices/platform/omapdss/overlay0/input_size
chown system system /sys/devices/platform/omapdss/overlay1/input_size
chown system system /sys/devices/platform/omapdss/overlay2/input_size
chown system system /sys/devices/platform/omapdss/overlay3/input_size
chown system system /sys/devices/platform/omapdss/overlay0/color_mode
chown system system /sys/devices/platform/omapdss/overlay1/color_mode
chown system system /sys/devices/platform/omapdss/overlay2/color_mode
chown system system /sys/devices/platform/omapdss/overlay3/color_mode
chown system system /sys/devices/platform/omapdss/manager0/name
chown system system /sys/devices/platform/omapdss/manager0/display
chown system system /sys/devices/platform/omapdss/manager0/trans_key_value
chown system system /sys/devices/platform/omapdss/manager0/trans_key_type
chown system system /sys/devices/platform/omapdss/manager0/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager1/name
chown system system /sys/devices/platform/omapdss/manager1/display
chown system system /sys/devices/platform/omapdss/manager1/trans_key_value
chown system system /sys/devices/platform/omapdss/manager1/trans_key_type
chown system system /sys/devices/platform/omapdss/manager1/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager2/name
chown system system /sys/devices/platform/omapdss/manager2/display
chown system system /sys/devices/platform/omapdss/manager2/trans_key_value
chown system system /sys/devices/platform/omapdss/manager2/trans_key_type
chown system system /sys/devices/platform/omapdss/manager2/trans_key_enabled
chown system system /sys/devices/platform/omapdss/overlay0/enabled
chown system system /sys/devices/platform/omapdss/overlay1/enabled
chown system system /sys/devices/platform/omapdss/overlay2/enabled
chown system system /sys/devices/platform/omapdss/overlay3/enabled
chown system system /sys/devices/platform/omapdss/display0/timings
chown system system /sys/devices/platform/omapdss/display1/timings
chown system system /sys/devices/platform/omapdss/display2/timings
chown system system /sys/devices/platform/omapdss/display3/timings
chown system system /sys/devices/platform/omapfb/graphics/fb0/overlays
chown system system /sys/devices/platform/omapfb/graphics/fb0/overlays_rotate
chown system system /sys/devices/platform/omapfb/graphics/fb1/overlays
chown system system /sys/devices/platform/omapfb/graphics/fb1/overlays_rotate
chown system system /sys/devices/platform/omapdss/display1/hdmi_out
chown system system /sys/devices/platform/omapdss/display1/hdmi_source
chown system system /sys/devices/platform/omapdss/display1/hdmi_key
chown system system /sys/devices/platform/omapdss/display1/hdmi_drm_lock
chown system system /sys/devices/platform/omapdss/display1/hdmi_drm_usr_sel
chown system system /sys/devices/platform/omapdss/display1/custom_edid_timing
chown system system /sys/devices/platform/omapdss/display1/hpd_enabled
chown system system /sys/devices/platform/omapdss/display0/sgx_manual_recovery
chmod 0775 /sys/devices/platform/omapdss/display0/sgx_manual_recovery
# change permissions for overlay managers and display devices
chmod 0775 /sys/devices/platform/omapdss/display0/enabled
chmod 0775 /sys/devices/platform/omapdss/display1/enabled
chmod 0775 /sys/devices/platform/omapdss/display2/enabled
chmod 0775 /sys/devices/platform/omapdss/display3/enabled
chmod 0775 /sys/devices/platform/omapdss/display0/name
chmod 0775 /sys/devices/platform/omapdss/display1/name
chmod 0775 /sys/devices/platform/omapdss/display2/name
chmod 0775 /sys/devices/platform/omapdss/display3/name
chmod 0775 /sys/devices/platform/omapdss/overlay0/manager
chmod 0775 /sys/devices/platform/omapdss/overlay1/manager
chmod 0775 /sys/devices/platform/omapdss/overlay2/manager
chmod 0775 /sys/devices/platform/omapdss/overlay3/manager
chmod 0775 /sys/devices/platform/omapdss/overlay0/zorder
chmod 0775 /sys/devices/platform/omapdss/overlay1/zorder
chmod 0775 /sys/devices/platform/omapdss/overlay2/zorder
chmod 0775 /sys/devices/platform/omapdss/overlay3/zorder
chmod 0775 /sys/devices/platform/omapdss/overlay0/position
chmod 0775 /sys/devices/platform/omapdss/overlay1/position
chmod 0775 /sys/devices/platform/omapdss/overlay2/position
chmod 0775 /sys/devices/platform/omapdss/overlay3/position
chmod 0775 /sys/devices/platform/omapdss/overlay0/output_size
chmod 0775 /sys/devices/platform/omapdss/overlay1/output_size
chmod 0775 /sys/devices/platform/omapdss/overlay2/output_size
chmod 0775 /sys/devices/platform/omapdss/overlay3/output_size
chmod 0775 /sys/devices/platform/omapdss/overlay0/portrait_position
chmod 0775 /sys/devices/platform/omapdss/overlay1/portrait_position
chmod 0775 /sys/devices/platform/omapdss/overlay2/portrait_position
chmod 0775 /sys/devices/platform/omapdss/overlay3/portrait_position
chmod 0775 /sys/devices/platform/omapdss/overlay0/portrait_output_size
chmod 0775 /sys/devices/platform/omapdss/overlay1/portrait_output_size
chmod 0775 /sys/devices/platform/omapdss/overlay2/portrait_output_size
chmod 0775 /sys/devices/platform/omapdss/overlay3/portrait_output_size
chmod 0775 /sys/devices/platform/omapdss/overlay0/input_size
chmod 0775 /sys/devices/platform/omapdss/overlay1/input_size
chmod 0775 /sys/devices/platform/omapdss/overlay2/input_size
chmod 0775 /sys/devices/platform/omapdss/overlay3/input_size
chmod 0775 /sys/devices/platform/omapdss/overlay0/color_mode
chmod 0775 /sys/devices/platform/omapdss/overlay1/color_mode
chmod 0775 /sys/devices/platform/omapdss/overlay2/color_mode
chmod 0775 /sys/devices/platform/omapdss/overlay3/color_mode
# change permissions for manager tranparency parameters
chmod 0775 /sys/devices/platform/omapdss/manager0/name
chmod 0775 /sys/devices/platform/omapdss/manager0/display
chmod 0775 /sys/devices/platform/omapdss/manager0/trans_key_value
chmod 0775 /sys/devices/platform/omapdss/manager0/trans_key_type
chmod 0775 /sys/devices/platform/omapdss/manager0/trans_key_enabled
chmod 0775 /sys/devices/platform/omapdss/manager1/name
chmod 0775 /sys/devices/platform/omapdss/manager1/display
chmod 0775 /sys/devices/platform/omapdss/manager1/trans_key_value
chmod 0775 /sys/devices/platform/omapdss/manager1/trans_key_type
chmod 0775 /sys/devices/platform/omapdss/manager1/trans_key_enabled
chmod 0775 /sys/devices/platform/omapdss/manager2/name
chmod 0775 /sys/devices/platform/omapdss/manager2/display
chmod 0775 /sys/devices/platform/omapdss/manager2/trans_key_value
chmod 0775 /sys/devices/platform/omapdss/manager2/trans_key_type
chmod 0775 /sys/devices/platform/omapdss/manager2/trans_key_enabled
chmod 0775 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0775 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0775 /sys/devices/platform/omapdss/overlay2/enabled
chmod 0775 /sys/devices/platform/omapdss/overlay3/enabled
# change permissions for display timings to get the resolutions
chmod 0775 /sys/devices/platform/omapdss/display0/timings
chmod 0775 /sys/devices/platform/omapdss/display1/timings
chmod 0775 /sys/devices/platform/omapdss/display2/timings
chmod 0775 /sys/devices/platform/omapdss/display3/timings
#change framebuffer permission
chmod 0775 /sys/devices/platform/omapfb/graphics/fb0/overlays
chmod 0775 /sys/devices/platform/omapfb/graphics/fb0/overlays_rotate
chmod 0775 /sys/devices/platform/omapfb/graphics/fb1/overlays
chmod 0775 /sys/devices/platform/omapfb/graphics/fb1/overlays_rotate
#change permissions for LCD backlightness
chmod 0664 /sys/devices/platform/i2c_omap.2/i2c-2/2-0036/brightness
#AT command AT%LEDON
chmod 0664 /sys/devices/platform/keypad_led/leds/keyboard-backlight/brightness
#AT command AT%GKPD
chmod 0664 /sys/devices/platform/omap-keypad/key_test_mode
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/flash
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/flash_brightness
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/torch
chown system system /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/enable
#LGE_KERNEL_MUX START [email protected]
chown root radio /sys/class/power_supply/battery/gauge_control
chown root radio /sys/class/power_supply/battery/voltage_now
# Disable fb1 [email protected]
write /sys/devices/platform/omapfb/graphics/fb1/overlays ""
write /sys/devices/platform/omapdss/overlay1/enabled 0
# write /sys/devices/platform/omapdss/overlay1/manager "2lcd"
# Seting for HDMI plug-in [email protected]
write /sys/devices/platform/omapdss/display1/enabled 0
write /sys/devices/platform/omapdss/display1/hpd_enabled 1
# setting HDMI Routing in system
write /sys/devices/platform/omapdss/overlay3/manager "tv"
write /sys/devices/platform/omapdss/overlay3/zorder 2
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_out
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_source
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_key
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_rotation
chmod 0775 /sys/devices/platform/omapdss/overlay1/input_size
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_3d_enable
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_3d_type
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_drm_lock
chmod 0775 /sys/devices/platform/omapdss/display1/hdmi_drm_usr_sel
chmod 0775 /sys/devices/platform/omapdss/display1/custom_edid_timing
chmod 0775 /sys/devices/platform/omapdss/display1/hpd_enabled
#HDMI device
chown system system /sys/devices/platform/omapdss/overlay0/req_enabled
chown system system /sys/devices/platform/omapdss/overlay0/req_rotation
chown system system /sys/devices/platform/omapdss/overlay0/req_position
chown system system /sys/devices/platform/omapdss/overlay0/req_out_size
chown system system /sys/devices/platform/omapdss/overlay0/req_manager
chown system system /sys/devices/platform/omapdss/overlay0/req_request
chown system system /sys/devices/platform/omapdss/overlay0/req_global_alpha
chown system system /sys/devices/platform/omapdss/overlay0/req_zorder
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_enabled
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_rotation
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_position
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_out_size
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_manager
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_request
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_global_alpha
chmod 0775 /sys/devices/platform/omapdss/overlay0/req_zorder
chown system system /sys/devices/platform/omapdss/overlay1/req_enabled
chown system system /sys/devices/platform/omapdss/overlay1/req_rotation
chown system system /sys/devices/platform/omapdss/overlay1/req_position
chown system system /sys/devices/platform/omapdss/overlay1/req_out_size
chown system system /sys/devices/platform/omapdss/overlay1/req_manager
chown system system /sys/devices/platform/omapdss/overlay1/req_request
chown system system /sys/devices/platform/omapdss/overlay1/req_global_alpha
chown system system /sys/devices/platform/omapdss/overlay1/req_zorder
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_enabled
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_rotation
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_position
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_out_size
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_manager
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_request
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_global_alpha
chmod 0775 /sys/devices/platform/omapdss/overlay1/req_zorder
chown system system /sys/devices/platform/omapdss/overlay2/req_enabled
chown system system /sys/devices/platform/omapdss/overlay2/req_rotation
chown system system /sys/devices/platform/omapdss/overlay2/req_position
chown system system /sys/devices/platform/omapdss/overlay2/req_out_size
chown system system /sys/devices/platform/omapdss/overlay2/req_manager
chown system system /sys/devices/platform/omapdss/overlay2/req_request
chown system system /sys/devices/platform/omapdss/overlay2/req_global_alpha
chown system system /sys/devices/platform/omapdss/overlay2/req_zorder
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_enabled
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_rotation
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_position
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_out_size
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_manager
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_request
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_global_alpha
chmod 0775 /sys/devices/platform/omapdss/overlay2/req_zorder
chown system system /sys/devices/platform/omapdss/overlay3/req_enabled
chown system system /sys/devices/platform/omapdss/overlay3/req_rotation
chown system system /sys/devices/platform/omapdss/overlay3/req_position
chown system system /sys/devices/platform/omapdss/overlay3/req_out_size
chown system system /sys/devices/platform/omapdss/overlay3/req_manager
chown system system /sys/devices/platform/omapdss/overlay3/req_request
chown system system /sys/devices/platform/omapdss/overlay3/req_global_alpha
chown system system /sys/devices/platform/omapdss/overlay3/req_zorder
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_enabled
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_rotation
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_position
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_out_size
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_manager
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_request
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_global_alpha
chmod 0775 /sys/devices/platform/omapdss/overlay3/req_zorder
# Enable hotplug detection for HDMI
write /sys/devices/platform/omapdss/display1/hpd_enabled 1
### END OF LGE STUFFS
# flashlight
chown system camera /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/torch
chmod 0660 /sys/devices/platform/i2c_omap.2/i2c-2/2-0053/torch
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
# This is needed by any process that uses socket tagging.
chmod 0644 /dev/xt_qtaguid
#LGE_CHANGE_S [[email protected]] 2010-05-04, 27.8.2 patch., 27.10.1 patch
# power management
# mount debugfs
mkdir /debug
mount debugfs debugfs /debug
# switch CPUfreq from performance to ondemand & tune it
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 70
# Enabling write by applications such as Web Browser for Performance Boost
chmod 0664 /sys/devices/system/cpu/cpu1/online
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Enable Smart Reflex in debugfs
write /debug/pm_debug/smartreflex/sr_core/autocomp 1
write /debug/pm_debug/smartreflex/sr_iva/autocomp 1
write /debug/pm_debug/smartreflex/sr_mpu/autocomp 1
# Enable off mode by default
write /debug/pm_debug/enable_off_mode 1
#LGE_CHANGE_E [[email protected]] 2010-12-09, 27.8.2 patch, 27.10.1 patch
chown radio radio /dev/block/mmcblk0p2
chown radio radio /dev/block/mmcblk0p3
chmod 0660 /dev/block/mmcblk0p2
chmod 0660 /dev/block/mmcblk0p3
setprop vold.post_fs_data_done 1
chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
#By default, the Linux kernel swaps in 8 pages of memory at a time. When using ZRAM, the incremental cost of reading 1 page at a time is negligible and may help in case the device is under extreme memory pressure.
write /proc/sys/vm/page-cluster 0
# Flash storage isn't a good entropy source, and only causes locking
# overhead in the kernel. Turn it off.
write /sys/block/mmcblk0/queue/add_random 0
write /sys/block/mmcblk1/queue/add_random 0
write /proc/sys/vm/highmem_is_dirtyable 1
write /proc/sys/vm/min_free_kbytes 4096
on boot
#chmod 0666 /dev/pvrsrvkm
# change permissions for Tiler driver
#chmod 0777 /dev/tiler
#chmod 0777 /dev/dmm
### LGE GPS
# gps permissions
chown system system /sys/devices/platform/gps_gpio/poweron
chown system system /sys/devices/platform/gps_gpio/reset
mkdir /data/gps 0775 system net_raw
mkdir /data/gps/var 0775 system net_raw
mkdir /data/gps/run 0775 system net_raw
mkdir /data/gps/log 0770 system net_raw
mkdir /data/cache
chmod 777 /data/cache
service pvrsrvinit /vendor/bin/pvrsrvinit
class core
user root
oneshot
# load IVA firmware
#service baseimage /system/bin/syslink_daemon.out /system/base_image_sys_m3.xem3 /system/base_image_app_m3.xem3
# class core
# critical
# user media
# group media
# oneshot
## GPS
service glgps /system/bin/glgps -c /system/etc/gps_brcm_conf.xml
class main
user system
group net_raw sdcard_rw system net_admin inet
service lgcpversion /system/bin/lgcpversion
class late_start
user root
oneshot
service charger /charger
class charger
user root
group root
oneshot