• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import init.${ro.hardware}.nanohub.rc
2import init.${ro.hardware}.usb.rc
3import init.common.diag.rc
4
5on charger
6    write /sys/devices/system/cpu/cpu2/online 0
7    write /sys/devices/system/cpu/cpu3/online 0
8    write /sys/module/lpm_levels/parameters/sleep_disabled 0
9    wait /dev/block/bootdevice
10
11service charger /charger
12    class charger
13    seclabel u:r:healthd:s0
14
15on early-init
16    mount debugfs debugfs /sys/kernel/debug
17    chmod 0755 /sys/kernel/debug
18
19on init
20    # Support legacy paths
21    symlink /sdcard /mnt/sdcard
22    symlink /sdcard /storage/sdcard0
23
24on fs
25    wait /dev/block/platform/soc/${ro.boot.bootdevice}
26    symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
27
28    mount_all fstab.${ro.hardware}
29    swapon_all fstab.${ro.hardware}
30
31    # Keeping following partitions outside fstab file. As user may not have
32    # these partition flashed on the device. Failure to mount any partition in fstab file
33    # results in failure to launch late-start class.
34
35    wait /dev/block/bootdevice/sda18 # /dev/block/bootdevice/by-name/cache
36    mount ext4 /dev/block/bootdevice/by-name/cache /cache nosuid nodev barrier=1
37
38    wait /dev/block/bootdevice/sda8 # /dev/block/bootdevice/by-name/persist
39    mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev barrier=1
40    restorecon_recursive /persist
41    mkdir /persist/data 0700 system system
42
43on post-fs
44    symlink /dev/block/platform/soc.0/f9824900.sdhci /dev/block/bootdevice
45
46    start qseecomd
47    exec - root root system -- /system/bin/init.qcom.qseecomd.sh
48
49on post-fs-data
50    mkdir /data/tombstones 0771 system system
51    mkdir /tombstones/modem 0771 system system
52    mkdir /tombstones/lpass 0771 system system
53    mkdir /tombstones/wcnss 0771 system system
54    mkdir /tombstones/dsps 0771 system system
55    mkdir /persist/data/sfs 0700 system system
56    mkdir /persist/data/tz 0700 system system
57    mkdir /data/misc/dts 0770 media audio
58    mkdir /data/misc/tloc/ 0700 system drmrpc
59    mkdir /data/misc/qvop 0660 system system
60    mkdir /data/misc/audio_pp 0771 media audio
61    mkdir /data/preloads 0775 system system
62
63    # Disable verbosity for sensorhub
64    write /d/sps/debug_level_option 4
65    write /d/sps/log_level_sel 4
66    # Write to the base address of BAM pipe
67    write /d/sps/bam_addr 122961920
68
69    # Create directory for TZ Apps
70    mkdir /data/misc/qsee 0770 system system
71
72    #Create folder for mm-qcamera-daemon
73    mkdir /data/misc/camera 0770 camera camera
74
75    mkdir /data/media 0770 media_rw media_rw
76    chown media_rw media_rw /data/media
77
78    mkdir /data/misc/ipa 0700 net_admin net_admin
79
80    mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
81
82    # Create the directories used by the Wireless subsystem
83    mkdir /data/misc/wifi 0770 wifi wifi
84    mkdir /data/misc/wifi/sockets 0770 wifi wifi
85    mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
86    mkdir /data/misc/dhcp 0770 dhcp dhcp
87    chown dhcp dhcp /data/misc/dhcp
88
89    # Create port-bridge log dir
90    mkdir /data/misc/port_bridge 0770 radio radio
91    chmod 0770 /data/misc/port_bridge
92
93    # Create the directories used by CnE subsystem
94    mkdir /data/connectivity 0771 system system
95    chown system system /data/connectivity
96
97    # Create the directories used by DPM subsystem
98    mkdir /data/dpm 0771 system system
99    chown system system /data/dpm
100
101    mkdir /data/dpm/nsrm 0771 system system
102    chown system system /data/dpm/nsrm
103
104    # Create directory used by audio subsystem
105    mkdir /data/misc/audio 0770 audio audio
106
107    # Create directory for audio delta files
108    mkdir /data/misc/audio/acdbdata 0770 media audio
109    mkdir /data/misc/audio/acdbdata/delta 0770 media audio
110
111    # Create directory used by the DASH client
112    mkdir /data/misc/dash 0770 media audio
113
114    # Create directory used by display clients
115    mkdir /data/misc/display 0770 system graphics
116    mkdir /persist/display 0770 system graphics
117
118    # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
119    # We chown/chmod /persist again so because mount is run as root + defaults
120    chown system system /persist
121    chmod 0771 /persist
122    chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
123    chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
124    chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
125    chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
126
127    # Chown polling nodes as needed from UI running on system server
128    chown system system /sys/devices/platform/msm_sdcc.1/polling
129    chown system system /sys/devices/platform/msm_sdcc.2/polling
130    chown system system /sys/devices/platform/msm_sdcc.3/polling
131    chown system system /sys/devices/platform/msm_sdcc.4/polling
132
133    # Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
134    mkdir /data/system 0775 system system
135
136    # Create directories for Location services
137    mkdir /data/misc/location 0770 gps gps
138    mkdir /data/misc/location/mq 0770 gps gps
139    mkdir /data/misc/location/xtwifi 0770 gps gps
140    mkdir /data/misc/location/gpsone_d 0770 system gps
141    mkdir /data/misc/location/quipc 0770 gps system
142    mkdir /data/misc/location/gsiff 0770 gps gps
143
144    # Create directory from IMS services
145    mkdir /data/shared 0755
146    chown system system /data/shared
147
148    # Create directory for FOTA
149    mkdir /data/fota 0771
150    chown system system /data/fota
151
152    # Create /data/time folder for time-services
153    mkdir /data/time/ 0700 system system
154
155    mkdir /data/audio/ 0770 media audio
156
157    # Create a folder for audio delta files
158    mkdir /data/audio/acdbdata 0770 media audio
159    mkdir /data/audio/acdbdata/delta 0770 media audio
160
161    setprop vold.post_fs_data_done 1
162
163    # Create FM dir for patchdownloader
164    mkdir /data/misc/fm 0770 system system
165    chmod 0770 /data/misc/fm
166
167    # RIDL data
168    mkdir /data/misc/SelfHost/ 0710 system shell
169    mkdir /data/misc/SelfHost/QCLogs/ 2750 system shell
170    mkdir /data/misc/SelfHost/QCLogs/temp/ 0700 system shell
171    mkdir /data/misc/SelfHost/storage/ 0700 system shell
172    mkdir /data/misc/SelfHost/Running/ 2750 system shell
173    mkdir /data/misc/SelfHost/socket/ 2770 system system
174
175    # Create PERFD deamon related dirs
176    setprop ro.min_freq_0 384000
177    mkdir /data/misc/perfd 0755 root system
178    chmod 2755 /data/misc/perfd
179    mkdir /data/system/perfd 0770 root system
180    rm /data/system/perfd/default_values
181    chmod 2770 /data/system/perfd
182
183    # NFC local data and nfcee xml storage
184    mkdir /data/nfc 0770 nfc nfc
185    mkdir /data/nfc/param 0770 nfc nfc
186
187    # Create IOP deamon related dirs
188    mkdir /data/misc/iop 0770 root system
189
190    # Mark the copy complete flag to not completed
191    write /data/misc/radio/copy_complete 0
192    chown radio radio /data/misc/radio/copy_complete
193    chmod 0660 /data/misc/radio/copy_complete
194
195    # File flags for prebuilt ril db file
196    write /data/misc/radio/prebuilt_db_support 1
197    chown radio radio /data/misc/radio/prebuilt_db_support
198    chmod 0400 /data/misc/radio/prebuilt_db_support
199    write /data/misc/radio/db_check_done 0
200    chown radio radio /data/misc/radio/db_check_done
201    chmod 0660 /data/misc/radio/db_check_done
202
203    chown system system /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
204    chmod 0660 /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
205    chown system system /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
206    chmod 0660 /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
207    chown system system /sys/class/devfreq/soc:qcom,gpubw/min_freq
208    chmod 0660 /sys/class/devfreq/soc:qcom,gpubw/min_freq
209
210on property:init.svc.bootanim=running
211    write /sys/class/leds/wled/brightness 4095
212
213on early-boot
214    # set RLIMIT_MEMLOCK to 64MB
215    setrlimit 8 67108864 67108864
216    # Allow subsystem (modem etc) debugging
217    write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
218    write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
219    write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
220    write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
221    write /sys/kernel/boot_adsp/boot 1
222    write /sys/kernel/boot_slpi/boot 1
223    # Update dm-verity state and set partition.*.verified properties
224    verity_update_state
225
226on boot
227    exec - root root system -- /system/bin/init.power.sh
228    exec - root root system -- /system/bin/init.mid.sh
229
230    # update cpusets now that processors are up
231    write /dev/cpuset/top-app/cpus 0-3
232    write /dev/cpuset/foreground/cpus 0-3
233    write /dev/cpuset/foreground/boost/cpus 0-3
234    write /dev/cpuset/background/cpus 0-3
235    write /dev/cpuset/system-background/cpus 0-3
236    # set default schedTune value for foreground/top-app (only affects EAS)
237    write /dev/stune/foreground/schedtune.prefer_idle 1
238    write /dev/stune/top-app/schedtune.boost 10
239    write /dev/stune/top-app/schedtune.prefer_idle 1
240
241    exec - root root system readproc -- /system/bin/init.foreground.sh
242
243    # add a cpuset for the camera daemon
244    # we want all cores for camera
245    mkdir /dev/cpuset/camera-daemon
246    write /dev/cpuset/camera-daemon/cpus 0-3
247    write /dev/cpuset/camera-daemon/mems 0
248    chown system system /dev/cpuset/camera-daemon
249    chown system system /dev/cpuset/camera-daemon/tasks
250    chmod 0664 /dev/cpuset/camera-daemon/tasks
251
252    # Bluetooth
253    chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
254    chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
255    chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
256    chown bluetooth bluetooth /proc/bluetooth/sleep/proto
257    chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm
258    chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite
259    chown system system /sys/module/sco/parameters/disable_esco
260    chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
261    chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
262    chmod 0660 /sys/module/bluetooth_power/parameters/power
263    chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
264    chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set
265    chmod 0660 /sys/class/rfkill/rfkill0/state
266    chmod 0660 /proc/bluetooth/sleep/proto
267    chown bluetooth net_bt /dev/ttyHS0
268    chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
269    chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
270    chmod 0660 /dev/ttyHS0
271    chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
272    chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
273
274    chmod 0660 /dev/ttyHS2
275    chown bluetooth bluetooth /dev/ttyHS2
276
277    chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
278    chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
279
280    # access permission for secure touch
281    chmod 0660 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable
282    chmod 0440 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch
283    chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable
284    chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch
285    write /proc/sys/kernel/sched_boost 1
286    write /sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input0/update_fw 1
287
288    chmod 0664 /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en
289    chown system graphics /sys/devices/virtual/graphics/fb0/msm_cmd_autorefresh_en
290
291    # Permission for laser sensor driver
292    chown camera camera /sys/class/htc_laser/laser/enable_ps_sensor
293    # Permission for LED driver
294    chown system system /sys/class/leds/red/on_off_ms
295    chown system system /sys/class/leds/green/on_off_ms
296    chown system system /sys/class/leds/blue/on_off_ms
297    chown system system /sys/class/leds/red/rgb_start
298    chown system system /sys/class/leds/green/rgb_start
299    chown system system /sys/class/leds/blue/rgb_start
300    chown system system /sys/class/leds/lcd-backlight/low_persistence
301
302    # Create QMUX deamon socket area
303    mkdir /dev/socket/qmux_radio 0770 radio radio
304    chmod 2770 /dev/socket/qmux_radio
305    mkdir /dev/socket/qmux_audio 0770 media audio
306    chmod 2770 /dev/socket/qmux_audio
307    mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
308    chmod 2770 /dev/socket/qmux_bluetooth
309    mkdir /dev/socket/qmux_gps 0770 gps gps
310    chmod 2770 /dev/socket/qmux_gps
311
312    mkdir /persist/drm 0770 system system
313
314    # Create NETMGR daemon socket area
315    mkdir /dev/socket/netmgr 0750 radio radio
316
317    setprop wifi.interface wlan0
318
319    # Define TCP buffer sizes for various networks
320    # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
321    setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
322
323    setprop ro.telephony.call_ring.multiple false
324
325    # Remove SUID bit for iproute2 ip tool
326    chmod 0755 /system/bin/ip
327
328    chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
329
330    # For bridgemgr daemon to inform the USB driver of the correct transport
331    chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
332
333    # For port-bridge daemon
334    chown radio radio /dev/at_mdm0
335    chown radio radio /dev/at_usb0
336
337    # Define TCP buffer sizes for various networks
338    # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
339    setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
340    setprop net.tcp.buffersize.lte     2097152,4194304,8388608,262144,524288,1048576
341    setprop net.tcp.buffersize.umts    4094,87380,110208,4096,16384,110208
342    setprop net.tcp.buffersize.hspa    4094,87380,1220608,4096,16384,1220608
343    setprop net.tcp.buffersize.hsupa   4094,87380,1220608,4096,16384,1220608
344    setprop net.tcp.buffersize.hsdpa   4094,87380,1220608,4096,16384,1220608
345    setprop net.tcp.buffersize.hspap   4094,87380,1220608,4096,16384,1220608
346    setprop net.tcp.buffersize.edge    4093,26280,35040,4096,16384,35040
347    setprop net.tcp.buffersize.gprs    4092,8760,11680,4096,8760,11680
348    setprop net.tcp.buffersize.evdo    4094,87380,524288,4096,16384,262144
349
350    setprop net.tcp.2g_init_rwnd 10
351
352    # Assign TCP buffer thresholds to be ceiling value of technology maximums
353    # Increased technology maximums should be reflected here.
354    write /proc/sys/net/core/rmem_max  8388608
355    write /proc/sys/net/core/wmem_max  8388608
356
357    # To allow interfaces to get v6 address when tethering is enabled
358    write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
359    write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
360    write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
361    write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
362    write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
363    write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
364    write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
365    write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
366    write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
367    write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
368    write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
369    write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
370    write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
371    write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
372    write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
373    write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
374    write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
375    write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
376    write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
377    write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
378
379    # To prevent out of order acknowledgements from making
380    # connection tracking to treat them as not belonging to
381    # the connection they belong to.
382    # Otherwise, a weird issue happens in which some long
383    # connections on high-throughput links get dropped when
384    # an ack packet comes out of order
385    write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
386
387    # Allow access for CCID command/response timeout configuration
388    chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
389
390    # bond0 used by FST Manager
391    chown wifi wifi /sys/class/net/bond0/bonding/queue_id
392
393    write /proc/sys/net/ipv6/conf/default/accept_ra_defrtr 1
394
395    # bluetooth init
396    setprop ro.qualcomm.bluetooth.opp true
397    setprop ro.qualcomm.bluetooth.hfp true
398    setprop ro.qualcomm.bluetooth.hsp true
399    setprop ro.qualcomm.bluetooth.pbap true
400    setprop ro.qualcomm.bluetooth.ftp true
401    setprop ro.qualcomm.bluetooth.nap true
402    setprop ro.bluetooth.sap true
403    setprop ro.bluetooth.dun true
404    setprop ro.qualcomm.bluetooth.map true
405    setprop ro.bluetooth.hfp.ver 1.6
406
407on property:wc_transport.start_hci=true
408    start start_hci_filter
409
410on property:wc_transport.start_hci=false
411    stop start_hci_filter
412
413service start_hci_filter /system/bin/wcnss_filter
414    class late_start
415    user bluetooth
416    group bluetooth diag
417    disabled
418
419on property:wc_transport.start_root=true
420    start hci_filter_root
421
422on property:wc_transport.start_root=false
423    stop hci_filter_root
424
425service hci_filter_root /system/bin/wcnss_filter
426    class late_start
427    user bluetooth
428    group bluetooth diag system
429    disabled
430
431service fingerprintd /system/bin/fingerprintd
432    class late_start
433    user system
434    group system
435
436service per_mgr /system/bin/pm-service
437    class core
438    user system
439    group system
440    ioprio rt 4
441
442service per_proxy /system/bin/pm-proxy
443    class core
444    user system
445    group system
446    disabled
447
448on property:init.svc.per_mgr=running
449    start per_proxy
450
451on property:sys.shutdown.requested=*
452    stop per_proxy
453
454service qseecomd /vendor/bin/qseecomd
455   class core
456   user root
457   group root
458
459service thermal-engine /vendor/bin/thermal-engine
460   class main
461   user root
462   group root system
463   socket thermal-send-client stream 0666 system system
464   socket thermal-recv-client stream 0660 system system
465   socket thermal-recv-passive-client stream 0666 system system
466
467service time_daemon /system/bin/time_daemon
468   class late_start
469   user root
470   group root
471
472service adsprpcd /system/bin/adsprpcd
473   class main
474   user media
475   group media
476
477service imsqmidaemon /system/bin/imsqmidaemon
478    class main
479    user system
480    socket ims_qmid stream 0660 system radio
481    group radio log diag
482
483service imsdatadaemon /system/bin/imsdatadaemon
484    class main
485    user system
486    socket ims_datad stream 0660 system radio
487    group system wifi radio inet log diag
488    disabled
489
490on property:sys.ims.QMI_DAEMON_STATUS=1
491    start imsdatadaemon
492
493service ims_rtp_daemon /system/bin/ims_rtp_daemon
494   class main
495   user system
496   socket ims_rtpd stream 0660 system radio
497   group radio diag inet log
498   disabled
499
500service imscmservice /system/bin/imscmservice
501   class main
502   user system
503   group radio diag diag log
504   disabled
505
506on property:sys.ims.DATA_DAEMON_STATUS=1
507   start ims_rtp_daemon
508   start imscmservice
509
510service ssr_setup /system/bin/ssr_setup
511    class main
512    user root
513    group root system
514    oneshot
515
516service ss_ramdump /system/bin/subsystem_ramdump
517    class main
518    user root
519    group root system
520    disabled
521
522on property:persist.sys.ssr.enable_ramdumps=1
523    write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
524    mkdir /data/ramdump 760 root root
525    start ss_ramdump
526
527on property:persist.sys.ssr.enable_ramdumps=0
528    write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
529
530on property:ro.build.type=userdebug
531   write /sys/class/uio/uio1/device/rtel/rtel 1
532
533service iop /system/bin/iop
534    class main
535    user root
536    group root
537    disabled
538
539service cnd /system/bin/cnd
540    user root
541    group root inet wakelock
542    class late_start
543    socket cnd stream 660 root inet
544
545service irsc_util /system/bin/irsc_util "/etc/sec_config"
546    class core
547    user root
548    oneshot
549
550service rmt_storage /system/bin/rmt_storage
551    class core
552    user root
553    group root system wakelock
554    ioprio rt 1
555
556on property:wc_transport.start_root=true
557    start hci_filter_root
558
559on property:wc_transport.start_root=false
560    stop hci_filter_root
561
562service hci_filter_root /system/bin/wcnss_filter
563    class late_start
564    user bluetooth
565    group bluetooth diag system
566    disabled
567
568service port-bridge /system/bin/port-bridge
569    class main
570    user radio
571    group radio system inet
572    oneshot
573
574service qmiproxy /system/bin/qmiproxy
575    class main
576    user radio
577    group radio diag
578    disabled
579
580service netmgrd /system/bin/netmgrd
581    class main
582    user root
583    group root wifi wakelock radio inet
584
585service qti /vendor/bin/qti
586    class main
587    user radio
588    group radio diag usb
589
590service p2p_supplicant /system/bin/wpa_supplicant \
591    -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
592    -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
593    -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
594    -I/system/etc/wifi/wpa_supplicant_overlay.conf \
595    -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
596    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
597#   we will start as root and wpa_supplicant will switch to user wifi
598#   after setting up the capabilities required for WEXT
599#   user wifi
600#   group wifi inet keystore
601    class main
602    socket wpa_wlan0 dgram 660 wifi wifi
603    disabled
604    oneshot
605
606service wpa_supplicant /system/bin/wpa_supplicant \
607    -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
608    -I/system/etc/wifi/wpa_supplicant_overlay.conf \
609    -O/data/misc/wifi/sockets -dd \
610    -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
611    #   we will start as root and wpa_supplicant will switch to user wifi
612    #   after setting up the capabilities required for WEXT
613    #   user wifi
614    #   group wifi inet keystore
615    class main
616    socket wpa_wlan0 dgram 660 wifi wifi
617    disabled
618    oneshot
619
620service cnss_diag /system/bin/cnss_diag -q
621    class late_start
622    user root
623    group root
624    oneshot
625
626service cnss-daemon /system/bin/cnss-daemon -n -l
627    class late_start
628
629service loc_launcher /system/bin/loc_launcher
630    #loc_launcher will start as root and set its uid to gps
631    class late_start
632    group gps inet diag wifi
633
634service init-radio-sh /system/bin/init.radio.sh
635    class late_start
636    user radio
637    group root radio
638    oneshot
639
640service msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf
641    socket msm_irqbalance seqpacket 660 root system
642    class core
643    user root
644    group root
645    writepid /dev/cpuset/system-background/tasks
646
647service atfwd /system/bin/ATFWD-daemon
648    class late_start
649    user system
650    group system radio
651    disabled
652
653service ssr_diag /system/bin/ssr_diag
654    class late_start
655    user system
656    group system
657    disabled
658
659service diag_mdlog_start /system/bin/diag_mdlog
660    class late_start
661    user shell
662    group system diag sdcard_rw sdcard_r media_rw
663    disabled
664    oneshot
665
666service diag_mdlog_stop /system/bin/diag_mdlog -k
667    class late_start
668    user shell
669    group system diag sdcard_rw sdcard_r media_rw
670    disabled
671    oneshot
672
673service perfd /vendor/bin/perfd
674   class main
675   user root
676   group root system
677   writepid /dev/cpuset/system-background/tasks
678
679# bugreport is triggered by holding down volume down, volume up and power
680service bugreport /system/bin/dumpstate -d -p -B -z \
681        -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
682    class main
683    disabled
684    oneshot
685    keycodes 114 115 116
686
687on property:sys.boot_completed=1
688    write /proc/sys/kernel/sched_boost 0
689    # update cpusets now that boot is complete and we want better load balancing
690    write /dev/cpuset/top-app/cpus 0-3
691    write /dev/cpuset/foreground/boost/cpus 0-2
692    write /dev/cpuset/foreground/cpus 0-2
693    write /dev/cpuset/background/cpus 0
694    write /dev/cpuset/system-background/cpus 0-2
695
696
697# battery driver settings for the retail demo environment where
698# the device will be perpertually plugged in to a power source
699on property:sys.retaildemo.enabled=1
700    write /sys/class/power_supply/battery/full_level_dis_batt_chg 35
701
702on property:sys.retaildemo.enabled=0
703    write /sys/class/power_supply/battery/full_level_dis_batt_chg 100
704