init.rc
6.73 KB
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
import init.${ro.hardware}.usb.rc
import init.${ro.hardware}.${ro.boot.soc_type}.rc
import init.${ro.hardware}.${ro.boot.storage_type}.rc
on early-init
# mount the debugfs
mount debugfs none /sys/kernel/debug/ mode=0755
on early-init
exec u:r:modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules ath.ko ath10k_core.ko ath10k_pci.ko
on init
start watchdogd
# Support legacy paths
symlink /sdcard /mnt/sdcard
symlink /sdcard /storage/sdcard0
# setup the global environment
export CORE_REGISTER_FILE /vendor/etc/core_register
export COMPONENT_REGISTER_FILE /vendor/etc/component_register
export CONTENTPIPE_REGISTER_FILE /vendor/etc/contentpipe_register
# disable cursor blink for fbcon, if no splash screen support
write /sys/class/graphics/fbcon/cursor_blink 0
# deattch the fbcon as hdmi hotplug conflict with fbcon
write /sys/class/vtconsole/vtcon1/bind 0
mkdir /device 0771 system system
on boot
# emmulate battery property
setprop sys.emulated.battery 1
# Set permission for IIM node
symlink /dev/mxs_viim /dev/mxc_mem
# Enable Tethering in the Settings
setprop ro.tether.denied false
# 3D acceleration property
setprop debug.sf.showfps 0
setprop debug.sf.enable_hgl 1
setprop debug.egl.hw 1
setprop hwc.stretch.filter 1
setprop hwc.enable_dither 1
# fsl omx graphic manager media framework property
setprop media.omxgm.enable-player 0
setprop media.omxgm.enable-record 0
setprop media.omxgm.enable-scan 1
setprop rw.VIDEO_RENDER_NAME video_render.surface
setprop media.fsl_codec.flag 7
#Define the config for dual camera
#For landscape mode, orient is 0
#For portrait mode, orient is 90
#the android before honycomb are all in portrait mode
setprop camera.disable_zsl_mode 1
setprop back_camera_name mx6s-csi
setprop back_camera_orient 0
setprop front_camera_name uvc
setprop front_camera_orient 0
# Tweak the mmc device read ahead buffer size
write /sys/block/mmcblk0/queue/read_ahead_kb 2048
write /sys/block/mmcblk1/queue/read_ahead_kb 2048
# ALSA mixer naming define
setprop alsa.mixer.playback.master Playback
setprop alsa.mixer.capture.master Capture
setprop alsa.mixer.playback.speaker Playback
setprop alsa.mixer.playback.headset Headphone
setprop alsa.mixer.capture.headset Capture
# Set period_us for usb audio
setprop ro.audio.usb.period_us 20000
# Wifi firmware reload path
chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path
chown wifi wifi /sys/module/bcmdhd/parameters/nvram_path
# Prepare for wifi
setprop wifi.interface wlan0
setprop wifi.ap.interface wlan0
# Prepare for bluetooth
chmod 665 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
write /sys/class/rfkill/rfkill0/state 0
setprop qcom.bluetooth.soc rome_uart
setprop wc_transport.start_hci false
# Prepare for RIL
setprop gsm.ril.delay 15
setprop ro.ril.wake_lock_timeout 300
# Set rotation to 270 to cofigure as portrait mode
setprop ro.sf.hwrotation 0
# Set the density to 213 tvdpi to match CDD.
setprop ro.sf.lcd_density 213
# Set extsd access permission
setprop persist.sampling_profiler 1
# prepare for ril
setprop gsm.ril.delay 15
setprop ro.ril.wake_lock_timeout 300
# Set tracefs permission to 755
chmod 0755 /sys/kernel/debug/tracing
# Default backlight device
setprop hw.backlight.dev "backlight"
# Chmod/chown FSL specific sys entry
chown system system /sys/class/backlight/backlight/brightness
chmod 0660 /sys/class/backlight/backlight/brightness
# Set light sensor sysfs path and light sensor threshold lux value
setprop ro.hardware.lightsensor "/sys/class/i2c-dev/i2c-0/device/0-0044/"
setprop ro.lightsensor.threshold 20
# No bluetooth hardware present
setprop hw.bluetooth 0
setprop wlan.interface wlan0
# Set WiFi Display Source VideoBitRate Adaptive
setprop media.wfd.video-bitrate 3000000
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
socket wpa_wlan0 dgram 660 wifi wifi
class main
disabled
oneshot
service sensor_fusion /vendor/bin/fsl_sensor_fusion
class late_start
seclabel u:r:sensors:s0
user system
group input
oneshot
# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
service watchdogd /sbin/watchdogd 10 20
class core
seclabel u:r:watchdogd:s0
service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0
class main
disabled
oneshot
service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n eth0
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
class main
disabled
oneshot
keycodes 114 115 116
on property:wc_transport.start_hci=true
start start_hci_filter
on property:wc_transport.start_hci=false
stop start_hci_filter
service start_hci_filter /vendor/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth diag
disabled
on property:wc_transport.start_root=true
start hci_filter_root
on property:wc_transport.start_root=false
stop hci_filter_root
service hci_filter_root /vendor/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth diag system
disabled
on fs
# mount ext4 partitions
mount_all /fstab.freescale
# Adjust parameters for dm-verity device
write /sys/block/dm-0/queue/read_ahead_kb 4096
# Update dm-verity state and set partition.*.verified properties
verity_update_state
on verity-logging
exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2
on post-fs
# Turn on swap
swapon_all /fstab.freescale
# Swap in only 1 page at a time
write /proc/sys/vm/page-cluster 0
# This may have been created by the recovery system with the wrong context.
restorecon /cache/recovery
on post-fs-data
setprop vold.post_fs_data_done 1