-
Notifications
You must be signed in to change notification settings - Fork 28
/
init.triumph.rc
306 lines (244 loc) · 9.67 KB
/
init.triumph.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
on early-fs
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0771 system system
mkdir /devlog 0700 root root
mount ext4 /dev/block/mmcblk0p7 /system wait ro barrier=1
mount ext4 /dev/block/mmcblk0p8 /data wait noatime nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p11 /cache wait noatime nosuid nodev barrier=1
on boot
# qmuxd socket
mkdir /data/radio 0770 radio radio
chown radio radio 0770 /data/radio
#Create directories for gpsone_daemon services
mkdir /data/gpsone_d 0770 gpsone_d qcom_oncrpc
mkdir /etc/gpsone_d 0770 gpsone_d qcom_oncrpc
#Set SUID bit for usbhub
chmod 4755 /system/bin/usbhub
chmod 755 /system/bin/usbhub_init
#Set SUID for diag_mdlog
chmod 4755 /system/bin/diag_mdlog
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
chmod 0666 /sys/module/akm8975/parameters/als_enabled
chmod 0666 /sys/module/akm8975/parameters/ps_enabled
chmod 0666 /dev/ttyHS1
chmod 0666 /dev/ir_mcu
chown system system /sys/module/android/parameters/product_id
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
chown system system /sys/devices/platform/msm_hsusb/gadget/wakeup
chown system system /sys/class/leds/red/blink
chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/button-backlight/blink
chown system system /sys/class/leds/red/device/ledon
chown system system /sys/class/leds/red/device/ledoff
chmod 0655 /sys/bus/platform/devices/rs300000a7.65536/force_sync
chown system system /sys/bus/platform/devices/rs300000a7.65536/force_sync
chmod 0665 /dev/graphics/fb0
chmod 0665 /dev/graphics/fb1
chmod 0666 /sys/class/leds/button-backlight/brightness
chmod 0666 /sys/class/leds/red/brightness
chmod 0666 /sys/class/leds/green/brightness
chmod 4777 /system/bin/mm-audio-mvs-test-int
chmod 4777 /system/bin/mm-audio-mvs-test-ext
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
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
chmod 0666 /sys/module/bluetooth_power/parameters/power
chmod 0666 /sys/class/rfkill/rfkill0/state
chmod 0666 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0666 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0666 /sys/devices/platform/msm_serial_hs.0/clock
chmod 4755 /system/bin/btwlancoex
chmod 0666 /sys/class/rfkill/rfkill1/state
chmod 0666 /system/etc/hostapd/hostapd.conf
# WIFI filesystem structure
mkdir /data/misc/wifi 0770 wifi wifi
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
symlink /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
setprop wifi.interface wlan0
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
#Power Management
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245760
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1024000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
chown compass system /dev/yas529
chmod 0666 /dev/yas529
chown compass system /dev/bma150
chmod 0666 /dev/ltr502als_alsps
chmod 0664 /sys/class/input/input2/enable
chmod 0664 /sys/class/input/input2/data
chmod 0664 /sys/class/input/input2/name
chown system input /sys/class/input/input2/enable
chown system input /sys/class/input/input2/delay
chown system input /sys/class/input/input2/wake
chmod 0664 /sys/class/input/input3/enable
chmod 0664 /sys/class/input/input3/data
chmod 0664 /sys/class/input/input3/name
chown system input /sys/class/input/input3/enable
chown system input /sys/class/input/input3/delay
chown system input /sys/class/input/input3/wake
chmod 0664 /sys/class/input/input4/enable
chmod 0664 /sys/class/input/input4/data
chmod 0664 /sys/class/input/input4/name
chown system input /sys/class/input/input4/enable
chown system input /sys/class/input/input4/delay
chown system input /sys/class/input/input4/wake
chmod 0664 /sys/class/input/input5/enable
chmod 0664 /sys/class/input/input5/data
chmod 0664 /sys/class/input/input5/name
chown system input /sys/class/input/input5/enable
chown system input /sys/class/input/input5/delay
chown system input /sys/class/input/input5/wake
chmod 0664 /sys/class/input/input6/enable
chmod 0664 /sys/class/input/input6/data
chmod 0664 /sys/class/input/input6/name
chown system input /sys/class/input/input6/enable
chown system input /sys/class/input/input6/delay
chown system input /sys/class/input/input6/wake
chmod 0664 /sys/class/input/input7/enable
chmod 0664 /sys/class/input/input7/data
chmod 0664 /sys/class/input/input7/name
chown system input /sys/class/input/input7/enable
chown system input /sys/class/input/input7/delay
chown system input /sys/class/input/input7/wake
chmod 0664 /sys/class/input/input8/enable
chmod 0664 /sys/class/input/input8/data
chmod 0664 /sys/class/input/input8/name
chown system input /sys/class/input/input8/enable
chown system input /sys/class/input/input8/delay
chown system input /sys/class/input/input8/wake
chmod 0664 /sys/class/input/input9/enable
chmod 0664 /sys/class/input/input9/data
chmod 0664 /sys/class/input/input9/name
chown system input /sys/class/input/input9/enable
chown system input /sys/class/input/input9/delay
chown system input /sys/class/input/input9/wake
chmod 0664 /sys/class/input/input10/enable
chmod 0664 /sys/class/input/input10/data
chmod 0664 /sys/class/input/input10/name
chown system input /sys/class/input/input10/enable
chown system input /sys/class/input/input10/delay
chown system input /sys/class/input/input10/wake
chmod 0664 /sys/class/input/input11/enable
chmod 0664 /sys/class/input/input11/data
chmod 0664 /sys/class/input/input11/name
chown system input /sys/class/input/input11/enable
chown system input /sys/class/input/input11/delay
chown system input /sys/class/input/input11/wake
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
on property:init.svc.bluetoothd=running
write /sys/devices/virtual/bluetooth/hci0/idle_timeout 7000
start btwlancoex
on property:init.svc.bluetoothd=stopped
stop btwlancoex
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
class main
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
# KD 9/12/2011 Add service at boot to populate the APN in the telephony area
service apn-populate /system/bin/sh /system/etc/init.apn.sh
user root
group radio
oneshot
service gpsone_daemon /system/bin/gpsone_daemon
user root
group qcom_oncrpc
disabled
service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
user shell
group bluetooth net_bt_admin
disabled
oneshot
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p14 /dev/block/mmcblk0p15
user root
disabled
on property:ro.emmc=1
start rmt_storage
service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
service qmuxd /system/bin/qmuxd
user radio
group radio
service fm_server /system/bin/fm_server
user system
group system
oneshot
service cnd /system/bin/cnd
socket cnd stream 660 root radio
service wpdiagd /system/bin/wpdiagd
oneshot
socket wpdiagd stream 666
service netmgrd /system/bin/netmgrd
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop netmgrd
service wiperiface /system/bin/wiperiface
user location
group qcom_oncrpc
oneshot
service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
user system
group system qcom_oncrpc
disabled
oneshot
service qcom-sh /system/bin/sh /init.qcom.sh
user root
oneshot
service hdmid /system/bin/hdmid
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
service geomagneticd /system/bin/geomagneticd
user compass
group system input
service orientationd /system/bin/orientationd
user compass
group system input
service proximityd /system/bin/proximityd
user compass
group system input
service lightd /system/bin/lightd
user compass
group system input
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
class main
user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -BKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service qcom-wifi /system/bin/sh /system/etc/init.qcom.wifi.sh
user root
disabled
oneshot
service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf
user root
group root
oneshot
disabled