-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.mt6620.rc
178 lines (136 loc) · 4.77 KB
/
init.mt6620.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
on post-fs
on post-fs-data
# mainly do mkdir/insmod/mknod in this section
#
# MT6620 related device nodes & modules & configuration (begin)
#
# wpa_supplicant control socket for android wifi.c
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/p2p_supplicant 0770 wifi wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi/p2p_supplicant.conf
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chmod 0660 /data/misc/wifi/p2p_supplicant.conf
# wpa_supplicant control socket for android wifi.c
mkdir /data/misc/dhcp 0771 dhcp dhcp
mkdir /data/wifi 0771 wifi wifi
chown dhcp dhcp /data/misc/dhcp
setprop wifi.interface "wlan0"
setprop wifi.direct.multicast 1
# Load common part modules
insmod /system/lib/modules/mtk_hif_sdio.ko
insmod /system/lib/modules/mtk_stp_wmt.ko
insmod /system/lib/modules/mtk_stp_uart.ko
# Load GPS module
insmod /system/lib/modules/mtk_stp_gps.ko
# Load BT module
insmod /system/lib/modules/mtk_stp_bt.ko
# Load FM modules
insmod /system/lib/modules/mtk_fm_drv.ko
# Load wifi modules
insmod /system/lib/modules/mtk_wmt_wifi.ko
insmod /system/lib/modules/wlan_mt6620.ko #(just for wlan test)
# create char device file for WMT,GPS,BT,FM (if mknod methods is used in init.rc)
mknod /dev/stpwmt c 190 0;
chmod 0660 /dev/stpwmt
chown system system /dev/stpwmt
mknod /dev/stpgps c 191 0;
chown gps gps /dev/stpgps
chown gps system /dev/gps
chown gps gps /sys/class/gpsdrv/gps/pwrctl
chown gps gps /sys/class/gpsdrv/gps/suspend
chown gps gps /sys/class/gpsdrv/gps/state
chown gps gps /sys/class/gpsdrv/gps/pwrsave
chown gps gps /sys/class/gpsdrv/gps/status
chmod 0666 /dev/gps
chmod 0666 /dev/stpgps
mknod /dev/stpbt c 192 0;
chmod 0660 /dev/stpbt
chown bluetooth radio /dev/stpbt
mkdir /data/bluetooth 0711 bluetooth bluetooth
mknod /dev/fm c 193 0;
chmod 0666 /dev/fm
chown system media /dev/fm
mknod /dev/wmtWifi c 194 0
chmod 0666 /dev/wmtWifi
start 6620_launcher
#
# MT6620 related device nodes & modules & configuration (begin)
#
# Encrypt phone function
setprop vold.post_fs_data_done 1
on boot
# MT6620 related services (Begin)
service 662x_launcher /system/bin/logwrapper /system/bin/6620_launcher -b 921600 -p /system/etc/firmware/ -d /dev/ttyMT1
user system
group system
class core
# oneshot
# class mt6620_user_guard
service mnld /system/xbin/mnld
user gps
group nvram gps inet misc sdcard_rw
socket mnld stream 660 gps system
disabled
#AGPS
#service agpsd /system/bin/mtk_agpsd
# class main
# socket agpsd stream 666 system system
chmod 770 /etc/agps_profiles_conf.xml
service hald /system/bin/hald
class main
socket hald stream 0660 root system
user system
group system radio mount wifi inet net_admin
#wlan JB solution
service p2p_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 -ddd
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin -ddd
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service ap_daemon /system/bin/logwrapper /system/bin/wpa_supplicant \
-iap0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 -ddd
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
disabled
oneshot
service dhcpcd_wlan0 /system/bin/logwrapper /system/bin/dhcpcd -A -BK -dd
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/logwrapper /system/bin/dhcpcd -A -BK -dd
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/logwrapper /system/bin/dhcpcd -n
class main
disabled
oneshot
# Add for wlan_loader
service wlanLoader /system/bin/wlan_loader
user root
group root
class main
oneshot
# MT6620 related services (End)