-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.u0.rc
executable file
·1018 lines (834 loc) · 34.2 KB
/
init.u0.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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Code Aurora nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#created by [email protected]
#capp_service
import init.lge.rc
#usb triggers
import init.u0.usb.rc
on init
# Set permissions for persist partition
#mkdir /persist 0771 system system
# wo0gi mod
mkdir /persist 0771 system radio
# [START] LGE_USE_INTERNAL_FAT
export EXTERNAL_ADD_STORAGE /mnt/sdcard/external_sd
# [END] LGE_USE_INTERNAL_FAT
# 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 [[email protected]] 20111213 : changed for Charger logo by using USB. Provided by LGSI[[email protected]]
on charger
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 1004
write /sys/class/android_usb/android0/idProduct 61F1
write /sys/class/android_usb/android0/bDeviceClass 239
write /sys/class/android_usb/android0/bDeviceSubClass 2
write /sys/class/android_usb/android0/bDeviceProtocol 1
write /sys/class/android_usb/android0/functions serial,diag,mtp,adb
write /sys/class/android_usb/android0/enable 1
# start adbd
setprop sys.usb.state $sys.usb.config
exec /sbin/chargerlogo
# LGE_CHANGE_E [[email protected]] 20111213 : changed for Charger logo by using USB. Provided by LGSI[[email protected]]
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p14
mount ext4 /dev/block/mmcblk0p14 /system ro data=ordered,barrier=1
# LGE_CHANGE_S [[email protected]] 20111209 : INT + USER
# wait /dev/block/mmcblk0p20
# exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p20 /data
# exec /system/bin/e2fsck -p /dev/block/mmcblk0p20
# mount ext4 /dev/block/mmcblk0p20 /data nosuid nodev noatime barrier=1,data=ordered,noauto_da_alloc,errors=panic
# LGE_CHANGE_S [[email protected]] 20111209 : INT + USER
wait /dev/block/mmcblk0p15
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p15 /persist
exec /system/bin/e2fsck -p /dev/block/mmcblk0p15
mount ext4 /dev/block/mmcblk0p15 /persist nosuid nodev data=ordered,barrier=1
wait /dev/block/mmcblk0p16
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p16 /cache
exec /system/bin/e2fsck -p /dev/block/mmcblk0p16
mount ext4 /dev/block/mmcblk0p16 /cache nosuid nodev data=ordered,barrier=1
wait /dev/block/mmcblk0p18
exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p18 /persist-lg
exec /system/bin/e2fsck -p /dev/block/mmcblk0p18
mount ext4 /dev/block/mmcblk0p18 /persist-lg nosuid nodev data=ordered,barrier=1
setprop ro.crypto.fuse_sdcard true
# LGE_CHANGE_S [[email protected]] 20120215 : mount /data partition here
on mount-data
wait /dev/block/mmcblk0p20
mount ext4 /dev/block/mmcblk0p20 /data nosuid nodev noatime barrier=1,data=ordered,noauto_da_alloc,errors=continue
on crmnt-data
wait /dev/block/mmcblk0p20
#exec /system/bin/demigod_make_ext4fs -e /dev/block/mmcblk0p20 /data size changed from 2688->2832M
exec /system/bin/demigod_make_ext4fs -l 2832M /dev/block/mmcblk0p20 /data
exec /system/bin/e2fsck -p /dev/block/mmcblk0p20
exec /system/bin/tune2fs -u system -m 5 /dev/block/mmcblk0p20
#mount option changed errors=panic->continue, To continue insted of panic and halt
mount ext4 /dev/block/mmcblk0p20 /data nosuid nodev noatime barrier=1,data=ordered,noauto_da_alloc,errors=continue
# LGE_CHANGE_E [[email protected]] 20120215
on post-fs
## [email protected] [2011-07-26] - Referred from Victor model
start rmt_storage
# msm specific files that need to be created on /data
on post-fs-data
# 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
#+s LGBT_COMMON_FUNCTION_BRINGUP - [email protected] 2011-12-10
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth #moved from init.rc - [email protected]
#+e LGBT_COMMON_FUNCTION_BRINGUP
# Create the directories used by the Wireless subsystem
# [email protected][wo0gi] change 0770 to 0771 for OTA test
# mkdir /data/misc/wifi 0770 wifi wifi
# mkdir /data/misc/wifi 0777 wifi wifi
mkdir /data/misc/wifi 0775 wifi radio
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0771 /persist
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling
# // U0 public AAT [email protected] 20120303 [START] KCAL problem fix
chown system system /sys/devices/platform/msm_fb.525057/mdp_kcal
# // U0 public AAT [email protected] 20120303 [END]
# CTS fail - android.permission.cts.FileSystemPermissionTest -- testAllFilesInSysAreNotWritable
# LGE_CHANGE_S : DoU Flag Writing Permission, 2012-03-13, [email protected], satisfied both CTS SysPermission Test and DoU Flag Writing, it's original value #
# chmod 0644 /sys/devices/platform/msm-battery/chg_current_change
# LGE_CHANGE_S : DoU Flag Writing Permission, 2012-03-13, [email protected], satisfied both CTS SysPermission Test and DoU Flag Writing #
chmod 0755 /sys/devices/platform/msm_fb.525057/mdp_kcal
# LGE_CHANGE_S : DoU Flag Writing Permission, 2012-03-13, [email protected], satisfied both CTS SysPermission Test and DoU Flag Writing #
#Write Permissions to Owner & Group. Make system as Owner & Group.
chmod 0664 /sys/devices/platform/msm-battery/chg_current_change
chown system system /sys/devices/platform/msm-battery/chg_current_change
# LGE_CHANGE_E : DoU Flag Writing Permission #
#LGE_CHANGE_S 20120418 [email protected] set CPU mode when wake up from sleep
chmod 0775 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#LGE_CHANGE_E 20120418 [email protected] set CPU mode when wake up from sleep
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system
symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
#Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc
#Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 system system
#Create directories for QuIPS
mkdir /data/misc/quipc 0770 gps system
#Create directory from IMS services
mkdir /data/shared 0755
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
# Create /data/time folder for time-services
mkdir /data/time/ 0700 system system
# LGE_CHANGE_S [[email protected]] 20120215 : below line should be at the end of post-fs-data
# setprop vold.post_fs_data_done 1
# LGE_CHANGE_E [[email protected]] 20120215
## LGE_DEV_PORTING
# FPRITest
mkdir /data/fpri 0777 system system
## LGE_DEV_END
# [110801 [email protected] M3_ALL] [END]
# Collect ramconsole data
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg
# NFC
setprop ro.nfc.port I2C
chmod 0660 /dev/pn544
chown nfc system /dev/pn544
# Create directories for wiper services
mkdir /data/wpstiles/ 0755 shell
mkdir /data/wiper 0755 location qcom_oncrpc
# Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 gpsone_d qcom_oncrpc
# Create directory from IMS services
mkdir /data/shared 0755
# Log Service [START]
mkdir /data/logger 0771 system system
chown system system /data/logger
chmod 0771 /data/logger
# Log Service [END]
# 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
# CAPP_SECCLK
# Create secure clock path
mkdir /persist-lg/secclk 0700 system system
# CAPP_SECCLK_END
mkdir /persist-lg/widevine 0770 drm system
chown drm system /persist-lg/widevine
chmod 0770 /persist-lg/widevine
mkdir /persist-lg/multimedia system divxdrm
chown media divxdrm /persist-lg/multimedia
chmod 0770 /persist-lg/multimedia
mkdir /persist-lg/multimedia/nx system divxdrm
chown media divxdrm /persist-lg/multimedia/nx
chmod 0770 /persist-lg/multimedia/nx
mkdir /persist-lg/multimedia/uma system divxdrm
chown media divxdrm /persist-lg/multimedia/uma
chmod 0770 /persist-lg/multimedia/uma
mkdir /persist-lg/multimedia/scnt system divxdrm
chown media divxdrm /persist-lg/multimedia/scnt
chmod 0770 /persist-lg/multimedia/scnt
mkdir /persist-lg/multimedia/scnt/sdadf system divxdrm
chown media divxdrm /persist-lg/multimedia/scnt/sdadf
chmod 0770 /persist-lg/multimedia/scnt/sdadf
# LGE_CHANGE_E make lgdrm, divxdrm directory in drm partion
#######FIXME because already system.img change to read only mode ##########
####### this will don't change access mode ###########
####### WARNING ###########
#Set SUID bit for usbhub
chmod 4755 /system/bin/usbhub
chmod 755 /system/bin/usbhub_init
#Set SUID bit for diag_mdlog
chmod 4755 /system/bin/diag_mdlog
#Set SUID bit for btwlancoex
# -s QCT_BT_PATCH_COEX_PERMISSION [email protected] 20120309, Permission Error (in M3)
# QCT109805 Original
# chmod 4755 /system/bin/btwlancoex
# -e QCT_BT_PATCH_COEX_PERMISSION
#Set SUID bit for iproute2 ip tool
chmod 4755 /system/bin/ip
####### WARNING ###########
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
symlink /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
symlink /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
setprop wifi.interface wlan0
# Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system
symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
# LGE_CHANGE_S [[email protected]] 20120215 : Here is the end of post-fs-data
setprop vold.post_fs_data_done 1
# LGE_CHANGE_E [[email protected]] 20120215
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
# LGE_CHANGE_S : ATCMD_GKPD 2011-12-07,[[email protected]]
# U0 device event permission has been changed
chmod 0777 /dev/input/event0
chmod 0777 /dev/input/event5
chmod 0777 /dev/input/event3
# LGE_CHANGE_E : ATCMD_GKPD
on boot
#+s LGBT_COMMON_FUNCTION_BRINGUP - [email protected], 2011-12-10
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
#+e LGBT_COMMON_FUNCTION_BRINGUP
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d
# Change owner and group for media server and surface flinger
chown media system /sys/devices/virtual/graphics/fb1/format_3d
#For netmgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/usb_composite/rmnet_smd_sdio/transport
#To allow interfaces to get v6 address when tethering is enabled
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
# LGE_CHANGE_S : [email protected]
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# paramters to match how it is managing things.
write /proc/sys/vm/vfs_cache_pressure 100
# LGE_CHANGE_E : [email protected]
#port-bridge
chmod 0660 /dev/smd0
chown system system /dev/smd0
# LGE_CHANGE_S : AT-Command - SMD Port changed to 11 2011-12-05
chmod 0660 /dev/smd11
chown system system /dev/smd11
# LGE_CHANGE_E : AT-Command 2011-12-05
chmod 0660 /dev/ttyMSM0
chown system system /dev/ttyMSM0
#bmc050 jongyoung.koo chown files for motion sensor and at%surv 2011-12-29
chown system system /sys/class/input/input1/range
chown system system /sys/class/input/input1/bandwidth
chown system system /sys/class/input/input1/mode
chown system system /sys/class/input/input1/value
chown system system /sys/class/input/input1/delay
chown system system /sys/class/input/input1/update
chown system system /sys/class/input/input1/selftest
chown system system /sys/class/input/input1/offset_filt_x
chown system system /sys/class/input/input1/offset_filt_y
chown system system /sys/class/input/input1/offset_filt_z
chown system system /sys/class/input/input1/fast_calibration_x
chown system system /sys/class/input/input1/fast_calibration_y
chown system system /sys/class/input/input1/fast_calibration_z
chown system system /sys/class/input/input1/eeprom_writing
chown system system /sys/class/input/input1/softreset
# Proxi sensor
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/3-0044/enable
chmod 0666 /sys/bus/i2c/drivers/proximity_gp2ap/5-0044/enable
# [email protected] AT/ATS refactoring [START]
chown system system /dev/atcmd-tty0
chmod 0660 /dev/atcmd-tty0
chown system system /dev/atcmd-tty1
chmod 0660 /dev/atcmd-tty1
chmod 0664 /dev/graphics/fb0
chmod 0664 /sys/class/leds/lcd-backlight/alc
chmod 0664 /sys/class/leds/lcd-backlight/brightness
# [email protected] AT/ATS refactoring [END]
# rmt-storage
chown system system /sys/devices/platform/rs300000a7.65536/send_sync
chmod 0764 /sys/devices/platform/rs300000a7.65536/send_sync
## [START] LGE_EMMC_SUPPORT - this is for the testmode, permissions are required to access from userspace
chown system system /sys/module/lge_emmc_direct_access/parameters/write_block
chmod 0660 /sys/module/lge_emmc_direct_access/parameters/write_block
chown system system /sys/module/lge_emmc_direct_access/parameters/read_block
chmod 0660 /sys/module/lge_emmc_direct_access/parameters/read_block
chown system system /sys/module/lge_emmc_direct_access/parameters/boot_info
chown system system /sys/module/lge_emmc_direct_access/parameters/manual_test_mode
chown system system /sys/module/lge_emmc_direct_access/parameters/db_integrity_ready
chown system system /sys/module/lge_emmc_direct_access/parameters/fpri_crc_ready
chown system system /sys/module/lge_emmc_direct_access/parameters/file_crc_ready
chown system system /sys/module/lge_emmc_direct_access/parameters/db_dump_ready
chown system system /sys/module/lge_emmc_direct_access/parameters/db_copy_ready
chown system system /sys/module/lge_emmc_direct_access/parameters/integrity_ret
chown system system /sys/module/lge_emmc_direct_access/parameters/external_memory_test
chown system system /sys/module/lge_emmc_direct_access/parameters/fota_id_check
#LGE_CHANGE_S [email protected] 20120116
chown system system /sys/module/lge_kcal/parameters/lcd_k_cal
chmod 0664 /sys/module/lge_kcal/parameters/lcd_k_cal
#LGE_CHANGE_E [email protected] 20120116
chown system system /sys/module/lge_emmc_direct_access/parameters/rooting_nv
chmod 0660 /sys/module/lge_emmc_direct_access/parameters/rooting_nv
chown system system /sys/module/lge_emmc_direct_access/parameters/eri_info
chmod 0660 /sys/module/lge_emmc_direct_access/parameters/eri_info
#VOLD_SUPPORT_CRYPT
chown system system /sys/module/lge_emmc_direct_access/parameters/cryptfs_cmd
chmod 0770 /sys/module/lge_emmc_direct_access/parameters/cryptfs_cmd
chown system system /sys/module/lge_emmc_direct_access/parameters/bootcmd_write_block
chmod 0777 /sys/module/lge_emmc_direct_access/parameters/bootcmd_write_block
## [END] LGE_EMMC_SUPPORT
# LGE_CHANGE_S : UICC & Security
# Change Security Block permission to Radio 2011-12-15 , [email protected]
wait /dev/block/mmcblk0p6
chown root radio /dev/block/mmcblk0p6
chmod 0770 /dev/block/mmcblk0p6
# LGE_CHANGE_E : UICC & Security
# LGE_CHANGE_S : For LCD Cal
# For LCD Cal [email protected]
# wait /dev/block/mmcblk0p8
chown root system /dev/block/mmcblk0p8
chmod 0770 /dev/block/mmcblk0p8
# LGE_CHANGE_E : For LCD Cal
# LGE_CHANGE_S, [Data_Patch_101] [[email protected]], 2011-12-27 <IPv4 and IPv6 Dual Stack Support>
setprop net.telephony.dualstack true
# LGE_CHANGE_E, [Data_Patch_101] [[email protected]], 2011-12-27 <IPv4 and IPv6 Dual Stack Support>
# LGE_UPDATE_S, [[email protected]] 2012-05-22
# change permission for accessing dev file-frststatus
chown system system /sys/devices/platform/lgenv/frststatus
# LGE_UPDATE_E
# 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)
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
# +s LGBT_QCTBT_BUGFIX_EnableBtWlanCoexDaemon, [email protected] 20120309
on property:bluetooth.isEnabled=true
# on property:init.svc.bluetoothd=running
# +e LGBT_QCTBT_BUGFIX_EnableBtWlanCoexDaemon
start btwlancoex
start amp_load
# +s QCT_BT_PATCH_COEX_PERMISSION [email protected] 20120309, Permission Error (in M3)
write /sys/class/bluetooth/hci0/idle_timeout 7000
# +e QCT_BT_PATCH_COEX_PERMISSION
# +s LGBT_QCTBT_BUGFIX_EnableBtWlanCoexDaemon, [email protected] 20120309
on property:bluetooth.isEnabled=false
# on property:init.svc.bluetoothd=stopped
# +e LGBT_QCTBT_BUGFIX_EnableBtWlanCoexDaemon
start amp_unload
stop btwlancoex
on property:persist.cne.UseCne=none
stop cnd
on property:persist.cne.UseCne=None
stop cnd
service cnd /system/bin/cnd
class late_start
socket cnd stream 660 root radio
# LGE_CHANGE_S [[email protected]] 20120215 : change class to core
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
class core
user root
disabled
# LGE_CHANGE_E [[email protected]] 20120215
on property:ro.emmc=1
start rmt_storage
service hciattach /system/bin/logwrapper /system/bin/sh /system/etc/init.qcom.bt.sh
class late_start
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
# +s LG_BTUI_ATCMD_DUTMODE [email protected] 110902, using QCT BT solution
service hciattach_dut /system/bin/logwrapper /system/bin/hciattach -n /dev/ttyHS0 qualcomm-ibs 3000000
class late_start
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
# +e LG_BTUI_ATCMD_DUTMODE
on property:bt.hci_smd.driver.load=1
insmod /system/lib/modules/hci_smd.ko
on property:bt.hci_smd.driver.load=0
exec /system/bin/rmmod hci_smd.ko
service bridgemgrd /system/bin/bridgemgrd
class late_start
user radio
group radio
disabled
# [email protected] AT/ATS refactoring [START]
service atd /system/bin/atd
class late_start
socket atd stream 0660 system inet
user system
group input inet
disabled
service port-bridge /system/bin/port-bridge /dev/atcmd-tty1 /dev/ttyGS0
class late_start
user system
group system inet
disabled
on property:ro.baseband="msm"
start port-bridge
# Enable BT-DUN only for all msms
# *s LG_BTUI_DUN_DISABLE [email protected], disable BT DUN for M3, true -> false
setprop ro.qualcomm.bluetooth.dun false
# *e LG_BTUI_DUN_DISABLE
on property:ro.baseband="unknown"
start port-bridge
service qmiproxy /system/bin/qmiproxy
class late_start
user radio
group radio
# [email protected] no card issue : from E0
# disabled
service qmuxd /system/bin/qmuxd
class late_start
user radio
group radio
# [email protected] no card issue : from E0
# disabled
service lgsecclk /system/bin/lgsecclkserver
class main
user system
group system lgdrm_acc sdcard_rw media_rw
service lgdrm /system/bin/lgdrmserver
class main
user lgdrm
group lgdrm_acc sdcard_rw media_rw system radio qcom_oncrpc
service netmgrd /system/bin/netmgrd
class late_start
disabled
service sensors /system/bin/sensors.qcom
class late_start
user root
group root
disabled
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop netmgrd
# Adjust socket buffer to enlarge TCP receive window for high bandwidth
# but only if ro.data.large_tcp_window_size property is set.
on property:ro.data.large_tcp_window_size=true
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
# *s QCT_BT_PATCH_COEX_PERMISSION [email protected] 20120309, Permission Error (in M3)
# QCT109806 Original
# user shell
# group bluetooth net_bt_admin
class late_start
user bluetooth
group bluetooth net_bt_admin inet net_admin net_raw
# *e QCT_BT_PATCH_COEX_PERMISSION
disabled
oneshot
service amp_init /system/bin/amploader -i
class late_start
user root
disabled
oneshot
service amp_load /system/bin/amploader -l 7000
class late_start
user root
disabled
oneshot
service amp_unload /system/bin/amploader -u
class late_start
user root
disabled
oneshot
#2011-12-10 [email protected][wo0gi] Modify interface : WEXT->DL80211
#service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class late_start
# user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
#2011-12-10 [email protected] [wo0gi] Fix : Obtaining IP Address Error
#service dhcpcd_wlan0 /system/bin/dhcpcd -BKLG wlan0
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKG # LGE_AUTO_IP_ICS, 2012-01-25, sanghoon77.lee
class late_start
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -BKLG
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n wlan0
class late_start
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n p2p
class late_start
disabled
oneshot
service wiperiface /system/bin/wiperiface
user location
group qcom_oncrpc
oneshot
service gpsone_daemon /system/bin/gpsone_daemon
class late_start
user system
group system qcom_oncrpc inet
disabled
service quipc_igsn /system/bin/quipc_igsn
class late_start
user gps
group inet
disabled
oneshot
service quipc_main /system/bin/quipc_main
class late_start
user gps
group net_admin wifi inet
disabled
oneshot
service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
class late_start
user root
group system qcom_oncrpc
disabled
oneshot
on property:crypto.driver.load=1
insmod /system/lib/modules/qce.ko
insmod /system/lib/modules/qcedev.ko
on property:crypto.driver.load=0
exec /system/bin/rmmod qcedev.ko
exec /system/bin/rmmod qce.ko
service drmdiag /system/bin/drmdiagapp
class late_start
user root
disabled
oneshot
on property:drmdiag.load=1
start drmdiag
on property:drmdiag.load=0
stop drmdiag
service qcom-sh /system/bin/sh /init.qcom.sh
class late_start
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class late_start
user root
disabled
oneshot
service qcom-wifi /system/bin/sh /system/etc/init.qcom.wifi.sh
class late_start
oneshot
on property:init.svc.bootanim=running
start atd
on property:init.svc.bootanim=stopped
start qcom-post-boot
service atfwd /system/bin/ATFWD-daemon
class late_start
user system
group system radio
onrestart /system/bin/log -t RIL-ATFWD -p w "ATFWD daemon restarted"
service hdmid /system/bin/hdmid
class late_start
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
service abld /system/bin/mm-abl-daemon
class late_start
disabled
service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf
class late_start
user root
group root
oneshot
disabled
service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D
class late_start
group radio
disabled
oneshot
on property:persist.data.ds_fmc_app.mode=1
start ds_fmc_appd
service ims_regmanager /system/bin/exe-ims-regmanagerprocessnative
class late_start
user system
group qcom_oncrpc net_bt_admin inet radio wifi
disabled
on property:persist.ims.regmanager.mode=1
start ims_regmanager
on property:ro.data.large_tcp_window_size=true
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service thermald /system/bin/thermald
class late_start
user root
group root
disabled
on property:persist.thermal.monitor=true
start thermald
service time_daemon /system/bin/time_daemon
class late_start
user root
group root
oneshot
disabled
on property:persist.timed.enable=true
mkdir /data/time/ 0700
start time_daemon
#+s LGBT_COMMON_FUNCTION_BRINGUP - [email protected], 2011-12-10
service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -n -d
class late_start
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
service dbus /system/bin/dbus-daemon --system --nofork
class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service hfag /system/bin/sdptool add --channel=10 HFAG
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --psm=5255 --channel=12 OPUSH
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service ftp /system/bin/sdptool add --psm=5257 --channel=20 FTP
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map0 /system/bin/sdptool add --channel=16 MAS0
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map1 /system/bin/sdptool add --channel=17 MAS1
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
#+e LGBT_COMMON_FUNCTION_BRINGUP
service ril-daemon1 /system/bin/rild -c 1
class late_start
socket rild1 stream 660 root radio
socket rild-debug1 stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw qcom_oncrpc diag
service profiler_daemon /system/bin/profiler_daemon
class late_start
user root
group root
disabled
# mms136 TOUCH F/W AUTO upgrade run
# LGE_CHANGE_S : [email protected] , 20120104
service tsd /system/bin/tsd
oneshot
# Log Service [start]
# main log
service logcat-main /system/bin/logcat -v time -b main -f /data/logger/main.log -n 4 -r 4096
class late_start
disabled
oneshot
on property:persist.service.main.enable=1
start logcat-main
on property:persist.service.main.enable=0
stop logcat-main
# system log
service logcat-system /system/bin/logcat -v time -b system -f /data/logger/system.log -n 4 -r 4096
class late_start
disabled
oneshot
on property:persist.service.system.enable=1
start logcat-system
on property:persist.service.system.enable=0
stop logcat-system
# radio log
service logcat-radio /system/bin/logcat -v time -b radio -f /data/logger/radio.log -n 4 -r 4096
class late_start
disabled
oneshot
on property:persist.service.radio.enable=1
start logcat-radio
on property:persist.service.radio.enable=0
stop logcat-radio
# event log
service logcat-events /system/bin/logcat -v time -b events -f /data/logger/events.log -n 4 -r 4096
class late_start
disabled
oneshot
on property:persist.service.events.enable=1
start logcat-events
on property:persist.service.events.enable=0
stop logcat-events
# kernel log
service log-kernel /system/bin/sh /etc/save_kernel_log.sh
class late_start
disabled
oneshot
on property:persist.service.kernel.enable=1
start log-kernel
on property:persist.service.kernel.enable=0
stop log-kernel
#LGE_CHANGE_S: [email protected] 2012-04-06
#New kernellogd daemon for monitoring kernel.log file size
service kernel_log /system/bin/kernellogd
class late_start
disabled
on property:persist.service.kernel.enable=1
start kernel_log
# Log Service [END]
#LGE_CHANGE_E: [email protected]
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw divxdrm
ioprio rt 4
## WIFI
service ftm_ptt /system/bin/ftm_ptt -d
class late_start
user root
group radio
disabled
oneshot
on property:ftm_ptt_start=1
start ftm_ptt
on property:ftm_ptt_start=0
stop ftm_ptt
## LGE_CHANGE_S, U0-SENSOR [[email protected]] 2011-09-96
# compass/accelerometer daemon for U0
service sensord /system/bin/sensord
# user compass
# group compass misc input
class late_start
oneshot
## LGE_CHANGE_E
# [email protected] for bluez logs