forked from Hashcode/android_device_motorola_solana
-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.mapphone_umts.rc
720 lines (693 loc) · 30.7 KB
/
init.mapphone_umts.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
on init
loglevel 8
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
# for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /sdcard-ext
symlink /storage/sdcard1 /mnt/sdcard-ext
# create removable USB Mass Storage mountpoints
mkdir /storage/usb0 0000 system system
mkdir /storage/usb1 0000 system system
mkdir /pds 0775 system system
mkdir /preinstall 0771 system system
mkdir /cdrom 0770 system system
# Permissions for RIL. Need to be set before boot.
chmod 0660 /sys/bus/usb/devices/usb1/power/control
chmod 0660 /sys/bus/usb/devices/usb2/power/control
chown system radio /sys/bus/usb/devices/usb1/power/control
chown system radio /sys/bus/usb/devices/usb2/power/control
chown system radio /sys/class/radio/mdm6600/command
on fs
exec /sbin/fixboot.sh
mount_all /fstab.mapphone_cdma
on post-fs
exec /system/bin/pdsbackup.sh
# Load FIPS kernel module
exec /system/bin/fips_loader /system/lib/modules
# Enable PVR modules
insmod /system/lib/modules/pvrsrvkm_sgx540_120.ko
insmod /system/lib/modules/omaplfb_sgx540_120.ko
chown system system /pds
chmod 0775 /pds
# Backward compatibility
symlink /dev /dev/netmux
mount ext3 /dev/block/system /system ro noatime nodiratime remount
mount rootfs rootfs / rw remount
# Backward compatibility
symlink /dev /dev/netmux
symlink /dev/ttyGS0 /dev/acm0
# Create mountpoints and mount tmpfs
mkdir /misc 0770 system misc
mkdir /sd-ext 0771 system system
symlink /data/tmp /tmp
mount tmpfs tmpfs /tmp
# Same reason as /data above
chown system cache /cache
chmod 0771 /cache
chown system misc /misc
chmod 0770 /misc
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# Configure kernel options
# Disable automatic power control for OHCI USB IPC Temporarily
# write /sys/devices/platform/ohci-omap3/usb1/1-1/power/control auto
# NFC configuration
# Reset system time
write /sys/class/rtc/rtc0/unsecured_rtc on
# Disable a system-wide task dump on OOM in default
write /proc/sys/vm/oom_dump_tasks 0
# Power Management
write /sys/devices/w1\ bus\ master/w1_master_search 2
write /sys/devices/system/cpu/cpu0/cpuidle/enable_state 1
# Increase MMC block device readaheads
write /sys/block/mmcblk0/queue/read_ahead_kb 1024
write /sys/block/mmcblk1/queue/read_ahead_kb 1024
# Set enable_smp if BT LE is supported
write /sys/module/bluetooth/parameters/enable_smp 1
# Set mot_pass_through_mt_input to true for ICS based releases
write /sys/module/hid_motorola/parameters/mot_pass_through_mt_input 1
# Disable SysRq keyboard trigger
write /proc/sys/kernel/sysrq 0
# Disable C.A.D in kernel, the userspace will handle it
write /proc/sys/kernel/ctrl-alt-del 0
# Change ownership for vibrators
chown system system /sys/class/timed_output/lvibrator/enable
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/timed_output/vibrator/sweep
# Change permission of vibrators
chmod 0660 /sys/class/timed_output/lvibrator/enable
chmod 0660 /sys/class/timed_output/vibrator/enable
chmod 0660 /sys/class/timed_output/vibrator/sweep
# Change permission of tiler's free_page_max to allow mot_osh access
chmod 0660 /sys/module/tiler_omap/parameters/free_page_max
chown mot_osh mot_osh /sys/module/tiler_omap/parameters/free_page_max
mkdir /pds/comm_drv 0770 radio radio
mkdir /pds/public 0775 system shell
mkdir /pds/factory 0740 mot_tcmd shell
mkdir /pds/camera 0775 system media
mkdir /pds/camera/module1 0775 system media
chown system media /pds/camera/module1/cameracal.bin
chmod 0644 /pds/camera/module1/cameracal.bin
# Create basic filesystem structure
mkdir /pds/wifi 0771 wifi wifi
chmod 0664 /pds/wifi/nvs_map.bin
mkdir /pds/whisper 0770 mot_whisper mot_whisper
mkdir /pds/whisper/whisper_only 0700 mot_whisper mot_whisper
# bluetooth power up/down interface
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
restorecon /sys/class/rfkill/rfkill0/state
restorecon /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /dev/ttyO1
chmod 0660 /dev/ttyO1
# following dir is for storing BP Flex and PDS files. NVM Daemon is using this
mkdir /pds/bp_nvm 0770 radio radio
# create the lost+found directories, so as to enforce our permissions
mkdir /pds/lost+found 0770 root root
# create the necessary pds dirs for tpapi with proper permission
mkdir /pds/security 2770 mot_tpapi mot_tpapi
chown mot_tpapi mot_tpapi /pds/security/counter.bin
chown mot_tpapi mot_tpapi /pds/security/system.bin
chown mot_tpapi mot_tpapi /pds/security/storage.bin
chown mot_tpapi mot_tpapi /pds/security/keymaptable.dat
# Create wmdrm directory
mkdir /pds/wmdrm 0775 mot_drm mot_drm
# Permission for USB
chown root mot_usb /proc/mtpctl
chmod 0660 /proc/mtpctl
restorecon /system/etc/firmware/ducati-m3.bin
# Install kernel modules
# Install BP related kernel modules
#Start the engine modules for netmux first for other daemons depends on it
insmod /system/lib/modules/netmux.ko
insmod /system/lib/modules/netmux_linkdriver.ko
insmod /system/lib/modules/modem_pm_driver.ko
# Install product specific kernel modules
exec /system/bin/load_modules.sh
# Load BT userspace driver
insmod /system/lib/modules/btwilink.ko
insmod /system/lib/modules/tty_hci.ko
# Load wifi drivers (all except wl12xx_sdio)
insmod /system/lib/modules/compat.ko
insmod /system/lib/modules/cfg80211.ko
insmod /system/lib/modules/mac80211.ko
insmod /system/lib/modules/wl12xx.ko
on post-fs-data
mkdir /data/tmp 0777 system system
chown system system /mnt/sdcard # Feature 34534
chmod 0777 /mnt/sdcard # Feature 34534
#Set the default value for bluedroid_ref
write /data/tmp/bluedroid_ref 0
chown system system /data/tmp/bluedroid_ref
chmod 0660 /data/tmp/bluedroid_ref
# fix cache for market access
chmod 775 /cache
mkdir /cache/download 0775 system system
# create moto specific dirs for wifi
mkdir /data/system 0771 system system
# wifi dirs
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/hostapd.sockets 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/firmware 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
# create moto specific dirs for factory
mkdir /data/dalvik-cache 0771 system system
mkdir /cache/dalvik-cache 0771 system system
mkdir /data/local/dbvc 0770 mot_tcmd shell
mkdir /data/local/12m 0771 mot_tcmd shell
mkdir /data/local/12m/batch 0771 mot_tcmd shell
mkdir /data/comm_drv 0770 radio radio
# following dir is for storing BP Flex and PDS files. NVM Daemon is using this
mkdir /data/bp_nvm 0770 radio radio
# create logger folder
mkdir /data/logger 0750 log log
mkdir /data/panicreports 0775 root radio
mkdir /data/panicreports/qpanic 0775 root radio
mkdir /data/tombstones 0775 system mot_tombstone
# Backup ramconsole on abnormal reboot.
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0644 /data/dontpanic/last_kmsg
# workaround: in solana somebody deletes the logfile.
# we have to back it up.
copy /data/dontpanic/apanic_console /data/logger/last_apanic_console
chmod 0700 /data/logger/apanic_console
#Create location directory
mkdir /data/location 0771 radio radio
#Create opprof directory
mkdir /data/opprof 0770 radio shell
# Create anr directory and change permission to 775 to save trace.txt
mkdir /data/anr 0775 system system
# create the necessary data dirs for tpapi with proper permission
mkdir /data/tpapi 2770 mot_tpapi mot_tpapi
mkdir /data/tpapi/etc 2770 mot_tpapi mot_tpapi
mkdir /data/tpapi/etc/tpa 2770 mot_tpapi mot_tpapi
mkdir /data/tpapi/etc/tpa/persistent 2770 mot_tpapi mot_tpapi
chown mot_tpapi mot_tpapi /data/tpapi/storage.bin
chown mot_tpapi mot_tpapi /data/tpapi/user.bin
# create special battd dir and set permissions
mkdir /data/tmp/battd 0770 root mot_accy
chmod 0770 /data/tmp/battd
chown root mot_accy /data/tmp/battd
# directory for encryption management tool, enc_mgt_tool
mkdir /data/emt 0770 root system
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
# MTU for USB tethering
write /sys/class/net/gether0/mtu 1428
on early-boot
# Adjust the out of memory thresholds to account for the larget
# space on sholes. These numbers are in pages (4k). Must be kept
# in sync with init.rc. This must be done before the regular init.rc
# since these properies can't change once set.
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3072
setprop ro.PERCEPTIBLE_APP_MEM 4096
setprop ro.HEAVY_WEIGHT_APP_MEM 4096
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.EMPTY_APP_MEM 8192
# Define the BLAN interface
setprop ro.blan.interface usb0
# Launch SMC script and allow it to read cmdline option
chmod 0444 /proc/cmdline
# Loading SMC kernel module first. Because load kernel module need root,
# so do not put this command into startup_smc.sh which only run as MOT_TPAPI
exec /system/bin/enc_mgt_tool --insmod
# start smc
# mount eCryptFS if required
exec /system/bin/enc_mgt_tool
class_start media_early_init
on boot
# Define Motorola DBVC ATVC Property defaults (failsafe properties)
setprop ro.sys.atvc_allow_netmon_usb 0
setprop ro.sys.atvc_allow_netmon_ih 0
setprop ro.sys.atvc_allow_res_core 0
setprop ro.sys.atvc_allow_res_panic 0
setprop ro.sys.atvc_allow_all_adb 1
setprop ro.sys.atvc_allow_all_core 0
setprop ro.sys.atvc_allow_efem 0
setprop ro.sys.atvc_allow_bp_log 0
setprop ro.sys.atvc_allow_ap_mot_log 0
setprop ro.sys.atvc_allow_simswap 0
setprop ro.sys.atvc_allow_gki_log 0
# Change the ownership of led files.
chown system system /sys/class/leds/lcd-backlight/als
chown system system /sys/class/leds/lcd-backlight/pwm_mode
chown system system /sys/class/leds/lcd-backlight/brightness
chmod 0660 /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/keyboard-backlight/brightness
chmod 0660 /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/alt-key-light/brightness
chmod 0660 /sys/class/leds/alt-key-light/brightness
chown system system /sys/class/leds/extra-key-backlight/brightness
chmod 0660 /sys/class/leds/extra-key-backlight/brightness
chown system system /sys/class/leds/shift-key-light/brightness
chmod 0660 /sys/class/leds/shift-key-light/brightness
chown system system /sys/class/leds/kpd_backlight_en/brightness
chmod 0660 /sys/class/leds/kpd_backlight_en/brightness
chown system system /sys/class/leds/keyboard1-backlight/brightness
chmod 0660 /sys/class/leds/keyboard1-backlight/brightness
chown system system /sys/class/leds/keyboard2-backlight/brightness
chmod 0660 /sys/class/leds/keyboard2-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chmod 0660 /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/red/blink
chmod 0660 /sys/class/leds/red/blink
chown system system /sys/class/leds/red/brightness
chmod 0660 /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chmod 0660 /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chmod 0660 /sys/class/leds/blue/brightness
chmod 0660 /sys/class/leds/torch-flash/camera_strobe
chmod 0660 /sys/class/leds/torch-flash/flash_light
chown system system /sys/class/leds/torch-flash/camera_strobe
chown system system /sys/class/leds/torch-flash/flash_light
chown system system /sys/class/leds/spotlight/brightness
chmod 0660 /sys/class/backlight/adp8870_bl/brightness
chown system system /sys/class/backlight/adp8870_bl/brightness
chmod 0660 /sys/class/leds/adp8870-led7/brightness
chown system system /sys/class/leds/adp8870-led7/brightness
chmod 0660 /sys/class/backlight/lm3532_bl/brightness
chown system system /sys/class/backlight/lm3532_bl/brightness
chmod 0660 /sys/class/backlight/430_540_960_amoled_bl/brightness
chown system system /sys/class/backlight/430_540_960_amoled_bl/brightness
chmod 0660 /sys/devices/omapdss/display0/acl_mode
chown system system /sys/devices/omapdss/display0/acl_mode
chown media media /sys/class/leds/af-led/brightness
chown media camera /sys/class/leds/camera-privacy/brightness
chmod 0660 /sys/class/leds/camera-privacy/brightness
# Change the ownership of sensor files.
chmod 0660 /sys/module/bmp180/parameters/accuracy
chown system system /sys/module/bmp180/parameters/accuracy
chmod 0660 /sys/module/bmp180/parameters/poll_interval
chown system system /sys/module/bmp180/parameters/poll_interval
chmod 0660 /sys/module/bmp180/parameters/enable
chown system system /sys/module/bmp180/parameters/enable
# Change the ownership of touch screen file
chown root mot_tcmd /sys/bus/i2c/drivers/qtouch-obp-ts/2-005b/irq_enable
chown root mot_tcmd /sys/bus/i2c/drivers/qtouch-obp-ts/2-004a/irq_enable
chown root mot_tcmd /sys/bus/i2c/drivers/cyttsp4-i2c/2-0067/drv_irq
chown root mot_tcmd /sys/bus/i2c/drivers/atmxt-i2c/2-004a/drv_irq
# Change permissions for Enabling/Disabling CYTTSP4 IRQ
chmod 0660 /sys/bus/i2c/drivers/cyttsp4-i2c/2-0067/drv_irq
chmod 0660 /sys/bus/i2c/drivers/atmxt-i2c/2-004a/drv_irq
# Change the ownership of cpcap
chmod 0666 /dev/cpcap
chmod 0666 /dev/cpcap_batt
chmod 0666 /dev/cpcap_mot_rtc
chmod 0666 /dev/cpcap_uc
chmod 0660 /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay0/zorder
# change permissions for display CABC mode
chmod 0660 /sys/devices/omapdss/display0/cabc_mode
chown system system /sys/devices/omapdss/display0/cabc_mode
# change permissions for overlay managers and display devices
chmod 0660 /sys/devices/platform/omapdss/display0/enabled
chmod 0660 /sys/devices/platform/omapdss/display1/enabled
chmod 0660 /sys/devices/platform/omapdss/display2/enabled
chmod 0660 /sys/devices/platform/omapdss/display3/enabled
chmod 0660 /sys/devices/platform/omapdss/display0/name
chmod 0660 /sys/devices/platform/omapdss/display1/name
chmod 0660 /sys/devices/platform/omapdss/display2/name
chmod 0660 /sys/devices/platform/omapdss/display3/name
chmod 0660 /sys/devices/platform/omapdss/overlay0/manager
chmod 0660 /sys/devices/platform/omapdss/overlay1/manager
chmod 0660 /sys/devices/platform/omapdss/overlay2/manager
chmod 0660 /sys/devices/platform/omapdss/overlay3/manager
chmod 0660 /sys/devices/platform/omapdss/overlay0/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay1/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay2/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay3/zorder
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
# access to frame buffers and corresponding overlays
chown system system /sys/devices/platform/omapfb/graphics/fb0/overlays
chown system system /sys/devices/platform/omapfb/graphics/fb1/overlays
chown system system /sys/devices/platform/omapfb/graphics/fb2/overlays
# Give TCMD write access to graphic fb0 file for hdmi rendering path setting on ICS
chmod 0660 /sys/devices/platform/omapfb/graphics/fb0/overlays
# change permissions for manager tranparency parameters
chmod 0660 /sys/devices/platform/omapdss/manager0/name
chmod 0660 /sys/devices/platform/omapdss/manager0/display
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/manager1/name
chmod 0660 /sys/devices/platform/omapdss/manager1/display
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/manager2/name
chmod 0660 /sys/devices/platform/omapdss/manager2/display
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay2/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay3/enabled
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
# change permissions for display timings to get the resolutions
chmod 0660 /sys/devices/platform/omapdss/display0/timings
chmod 0660 /sys/devices/platform/omapdss/display1/timings
chmod 0660 /sys/devices/platform/omapdss/display2/timings
chmod 0660 /sys/devices/platform/omapdss/display3/timings
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
# change permissions for media cache mgmt parameters
chmod 0660 /sys/module/media_cache_mgmt/parameters/media_cache_mgmt
chown media system /sys/module/media_cache_mgmt/parameters/media_cache_mgmt
# change permissions for omap_cpuboost parameters
chmod 0660 /sys/module/omap_cpuboost/parameters/cpuboost_time
chown media system /sys/module/omap_cpuboost/parameters/cpuboost_time
# Change permission of secret_off to allow system access
chmod 0660 /sys/devices/omapdss/display0/secret_off
chown system system /sys/devices/omapdss/display0/secret_off
# Change file permissions for Thermal Manager
# For OMAP CPU Temp
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
chown system system /sys/class/hwmon/hwmon1/device/temp1_max
chown system system /sys/class/hwmon/hwmon1/device/temp1_max_hyst
chown system system /sys/class/hwmon/hwmon1/device/update_rate
# for PCB Temp
chown system system /sys/devices/platform/omap4_duty_cycle/nitro_rate
chown system system /sys/devices/platform/omap4_duty_cycle/cooling_rate
chown system system /sys/devices/platform/omap4_duty_cycle/nitro_interval
chown system system /sys/devices/platform/omap4_duty_cycle/nitro_percentage
chown system system /sys/devices/platform/omap4_duty_cycle/enabled
chown system system /sys/class/hwmon/hwmon0/device/temp1_max
chown system system /sys/class/hwmon/hwmon0/device/temp1_max_hyst
# set the size of the dns cache.
setprop ro.net.dns_cache_size 400
# Enable production security key check for 3LM
setprop ro.3lm.production 1
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.umts 64000,128000,256000,4096,16384,110208
setprop net.tcp.buffersize.edge 16384,35040,65536,4096,16384,35040
# Define optimized TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.wifi 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.umts 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.hspa 131072,262144,524288,4096,16384,147456
setprop net.tcp.buffersize.edge 16384,32768,65536,4096,16384,32768
setprop net.tcp.buffersize.gprs 4096,8192,12288,4096,8192,12288
setprop net.tcp.buffersize.cdma 4096,12288,24576,4096,12288,24576
setprop net.tcp.buffersize.evdo 16384,32768,65536,4096,16384,51200
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.2ghotspot 4096,12288,24576,4096,12288,24576
setprop net.tcp.buffersize.3ghotspot 4096,16384,51200,16384,32768,65536
setprop net.tcp.buffersize.4ghotspot 262144,524288,1048576,524288,1048576,2097152
# Network Bandwidth control for netd
setprop persist.bandwidth.enable 1
# Setup trace files
mkdir /cache/trace 0777 root root
chown root root /cache/trace
chmod 0777 /cache/trace
# ZRam setup
setprop persist.service.zram 9
# Start services
exec /system/bin/mot_boot_mode
start wifical_check
# Set core max size (2G)
setrlimit 4 2147483648 2147483648
mount debugfs /sys/kernel/debug /sys/kernel/debug
#IKHSS6-3716 allow mediaserver to enable performance mode for OMAP4 USB Audio
chown root audio /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown root audio /proc/irq/124/smp_affinity
chown root audio /proc/irq/125/smp_affinity
chmod 660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 660 /proc/irq/124/smp_affinity
chmod 660 /proc/irq/125/smp_affinity
on charger
trigger early-fs
trigger fs
trigger post-fs
trigger post-fs-data
trigger start-charging
on start-charging
chown system system /sys/power/state
chmod 0660 /sys/power/state
chown system system /sys/class/leds/button-backlight/brightness
chmod 0660 /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chmod 0660 /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/red/brightness
chmod 0660 /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chmod 0660 /sys/class/leds/green/brightness
chown system system /sys/class/leds/red/blink
chmod 0660 /sys/class/leds/red/blink
chmod 0660 /sys/class/backlight/lm3532_bl/brightness
chown system system /sys/class/backlight/lm3532_bl/brightness
start battd
start whisperd
start charge_only_mode
# The properties introduced by moto
on property:sys.chargeonly.mode=1
class_stop core
class_stop main
start battd
start whisperd
start charge_only_mode
# Power up to suspend
# aplogd on at boot in emulator
on property:ro.kernel.qemu=1
start aplogd
on property:persist.log.aplogd.enable=1
start aplogd
on property:persist.log.aplogd.enable=0
stop aplogd
#start console for userdebug and eng builds
on property:ro.debuggable=1
start console
# Moto safe power down
on property:sys.reboot=1
stop ssmgrd
exec /system/bin/sleep 10
exec /system/bin/reboot
on property:sys.shutdown=1
stop ssmgrd
exec /system/bin/sleep 10
exec /system/bin/reboot -p
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd_wlan0
on property:ro.hdcp.support=1
chown system media /dev/omap-hdcp
chmod 0660 /dev/omap-hdcp
on property:ro.hdcp.support=2
chown system media /dev/omap-hdcp
chmod 0660 /dev/omap-hdcp
service nvm-daemon /system/usr/bin/nvm_daemon
class core
user radio
group radio
# start commdrv pds script
service start_commdrv /system/bin/sh /system/etc/motorola/comm_drv/commdrv_fs.sh
class core
oneshot
user radio
group radio system cache
service battd /system/bin/battd
class core
socket battdsock stream 0666 mot_accy mot_accy
user root
group mot_accy mot_pwric
oneshot
service charge_only_mode /system/bin/charge_only_mode
user root
group graphics system input
disabled
service whisperd /system/bin/whisperd /dev/ttyO1
class core
user mot_whisper
group mot_whisper mot_pwric
oneshot
service ssmgrd /system/xbin/ssmgrd
class main
group radio input mot_pwric
oneshot
service uim /system/bin/uim-sysfs
class core
user root
group bluetooth net_bt_admin
service panic_daemon /system/usr/bin/panic_daemon
class main
user radio
group log radio system graphics sdcard_rw
socket panic_daemon stream 660 radio radio
onrestart exec /system/bin/reboot
# Ecompass daemon
service akmd8975 /system/bin/akmd8975
class main
user compass
group compass misc input
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 -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 -aABDKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service dhcpcd_usbeth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service hostapd_bin /system/bin/hostapd -d /data/misc/wifi/hostapd.conf
socket wpa_wlan0 dgram 660 wifi wifi
class main
disabled
oneshot
service pvrsrv /system/vendor/bin/pvrsrvinit
class core
user root
group root
seclabel u:r:pvrsrvinit:s0
oneshot
service smc /system/bin/startup_smc.sh
class core
user mot_tpapi
group mot_tpapi
disabled
oneshot
service modemlog /system/bin/modemlog
class core
user system
group system log
oneshot
# aplogd start/stop is controlled by the persist.log.aplogd.enable system
# property. Don't set the property directly, because it's controlled by the
# com.motorola.android.settings.aplogd Java Service and ContentProvider. To
# change the default behavior of aplogd on bootup, you should update the
# defaults for the com.motorola.android.settings.aplogd Java Service and
# ContentProvider which control it.
service aplogd /system/bin/aplogd
#user log
#group log system sdcard_rw mount
# The user and group definitions above are intentionally disabled and left
# only as documentation. It actually starts as root and immediately drops
# to log plus those groups after preserving CAP_SYS_ADMIN, which is required
# for kernel logging.
disabled
on property:dev.bootcomplete=1
# start loadpreinstalls
service thermal_manager /system/bin/thermaldaemon
class main
user system
group system
#Check available storage space to execute device encryption or decryption
on property:sys.mot.encrypt.test=1
exec /system/bin/enc_mgt_tool --test
setprop sys.mot.encrypt.test ""
# Handle device encryption key protection request
on property:sys.mot.encrypt.pass.prot=1
exec /system/bin/enc_mgt_tool --password_prot
setprop sys.mot.encrypt.pass.prot ""
# Enable Hotplug governor only for OMAP ES2.2 Silicon
on property:ro.revision=34
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor hotplug
# Add any hotplug tuning parameters here.
# Wifi check
service wifical_check /system/bin/sh /system/bin/wificalcheck.sh
disabled
class late_start
user root
group wifi
oneshot
# Wifi calibrate
service wifi_calibrator /system/bin/sh /system/bin/wifical.sh
disabled
class late_start
user root
group wifi
oneshot
# Very first boot. We need to set the MAC address
on property:persist.wlan.ti.calibrated=0
start wifi_calibrator
setprop persist.wlan.ti.calibrated 1