-
Notifications
You must be signed in to change notification settings - Fork 10
/
init.golfu.rc
executable file
·330 lines (268 loc) · 8.9 KB
/
init.golfu.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
on emmc
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
mkdir /devlog 0700 root root
devwait emmc@system
mount ext4 emmc@system /system ro barrier=1
devwait emmc@userdata
mount ext4 emmc@userdata /data nosuid nodev barrier=1 noauto_da_alloc
mount ext4 emmc@cache /cache nosuid nodev barrier=1
mount ext4 emmc@devlog /devlog nosuid nodev barrier=1
on early-init
device mtd@misc 0460 radio diag
on init
chown root root /devlog
chmod 0700 /devlog
# [3LM] Secure container used for sharing libraries for encrypted apps
chmod 0771 /data/secure
mkdir /data/secure/data 0771 system system
mount tmpfs tmpfs /data/secure/data mode=0771,uid=1000,gid=1000
#set G-Sensor and Compass permissions
chown compass system /dev/akm8975_aot
chown compass system /dev/akm8975_daemon
chown compass system /dev/bma150
chmod 0640 /dev/akm8975_aot
chmod 0640 /dev/akm8975_daemon
chmod 0640 /dev/bma150
mkdir /mnt/emmc 0000 system system
on boot
# unmap left alt to avoid console switch
setkey 0x0 0x38 0x0
# device reset SEND+MENU+END
setkey 0x0 0xe7 0x706
setkey 0x0 0x8b 0x707
setkey 0x40 0xe7 0x706
setkey 0x40 0x8b 0x707
setkey 0x80 0xe7 0x706
setkey 0x80 0x8b 0x707
setkey 0xc0 0xe7 0x706
setkey 0xc0 0x8b 0x707
setkey 0xc0 0x6b 0x20c
# HTC SSD Audio
mkdir /data/audio
chown media audio /data/audio
chmod 755 /data/audio
# permissions for NFC
chmod 0600 /dev/pn544
chown nfc nfc /dev/pn544
setprop debug.nfc.fw_download "false"
setprop debug.nfc.fw_boot_download "false"
# HTC_WIFI_START
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/wifi/hostap 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
insmod /system/lib/modules/compat.ko
insmod /system/lib/modules/cfg80211.ko
chown system system /sys/devices/platform/msm_sdcc.2/polling
#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
# HTC_WIFI_END
# bluetooth power up/down interface
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 0660 /sys/module/bluetooth_power/parameters/power
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
# Widevine DRM
chown drm system /dev/htcdrm
chmod 0660 /dev/htcdrm
# Enable Bluetooth 802.11 PAL when Bluetooth is turned on
setprop ro.config.bt.amp no
# for modem link
chown system system /sys/class/android_usb/f_modem/on
chown system system /sys/module/serial/parameters/modem_enabled
chown system system /dev/ttyHSUSB0
chown system system /dev/ttySA0
chown system system /dev/smd9
# set CABC permissions
chown system system /sys/class/leds/lcd-backlight/auto
chown radio radio /sys/module/pm/parameters/idle_sleep_mode
# for Flip to speaker
chown radio radio /sys/class/htc_accelerometer/accelerometer/PhoneOnOffFlag
chown radio radio /sys/class/htc_ecompass/ecompass/PhoneOnOffFlag
# for Optical sensors
chown system system /sys/class/optical_sensors/lightsensor/ls_adc
chown system system /sys/class/optical_sensors/lightsensor/ls_auto
chown system system /sys/class/optical_sensors/lightsensor/ls_kadc
chown system radio /sys/class/optical_sensors/proximity/ps_adc
chown system system /sys/class/optical_sensors/proximity/ps_kadc
chown system system /sys/class/optical_sensors/proximity/ps_led
chown system system /sys/class/optical_sensors/proximity/ps_test_mode
# Load kineto_gan.ko while booting
insmod /system/lib/modules/kineto_gan.ko
# for fonts move to data partition
mount yaffs2 mtd@system /system rw remount
chmod 0755 /data/fonts
symlink /data/fonts /system/fonts
mount yaffs2 mtd@system /system ro remount
# wifi ++
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dnl80211 -ddd
class late_start
user root
group wifi inet
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class late_start
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -ABKL
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
disabled
oneshot
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
class late_start
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
# bugreport is triggered by the KEY_VOLUMEUP and KEY_VOLUMEDOWN keycodes
service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
disabled
oneshot
keycodes 115 114
# for USB internet sharing
service udhcpd /system/bin/udhcpd
disabled
oneshot
service netsharing_on /system/bin/netsharing net on
disabled
oneshot
service netsharing_off /system/bin/netsharing net off
disabled
oneshot
service netsharing_pass /system/bin/netsharing net_pass on
disabled
oneshot
service srv_ser2net /system/bin/ser2net -n
disabled
on property:init.svc.bluetoothd=running
write /sys/class/bluetooth/hci0/idle_timeout 7000
service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
class late_start
user root
group system qcom_oncrpc
disabled
oneshot
service ftp /system/bin/sdptool add --handle=0x1ff20 --psm=5257 --channel=20 FTP
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service ftp_del /system/bin/sdptool del 0x1ff20
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map0 /system/bin/sdptool add --handle=0x1ff16 --channel=16 MAS0
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map0_del /system/bin/sdptool del 0x1ff16
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map1 /system/bin/sdptool add --handle=0x1ff17 --channel=17 MAS1
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map1_del /system/bin/sdptool del 0x1ff17
class late_start
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
on property:service.ser2net.enable=1
start srv_ser2net
on property:service.ser2net.enable=0
stop srv_ser2net
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p13 /dev/block/mmcblk0p14
class core
user root
disabled
on property:ro.emmc=1
start rmt_storage
on property:init.svc.bootanim=stopped
start qcom-post-boot
# Overwrite ActivityManager's low memory killer settings
write /sys/module/lowmemorykiller/parameters/adj 0,2,4,7,9,12
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,10854,14132
write /sys/module/lowmemorykiller/parameters/minfile 2048,3072,4096,6144,10854,14132
write /sys/module/lowmemorykiller/parameters/check_filepages 1
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
user root
disabled
oneshot
service modem /system/xbin/wireless_modem
user system
group system radio
disabled
oneshot
service zchgd_offmode /system/bin/zchgd -pseudooffmode
user root
group root graphics
disabled
service zchgd_onmode /system/bin/zchgd -onmode
user root
group root graphics
oneshot
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 qcom_oncrpc diag system
#-SSD_RIL: from QCT Fusion
on property:service.modem.enable=1
start modem
service dmagent /system/bin/dmagent -N
socket dmagent stream 660 root radio
user root
group radio cache inet misc
service clockd /system/bin/clockd
on property:ro.build.tags=test-keys
start htc_ebdlogd
on property:ro.build.tags=release-keys
start htc_ebdlogd_rel
#Enable Zimmer
service zimmer /system/bin/zimmer on /dev/block/mmcblk0p27
user root
group root
oneshot
#Enable ZCB
service zcb /system/bin/logwrapper /system/bin/zcb service
user root
group root