-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinit.wifi.rc
executable file
·98 lines (83 loc) · 3.45 KB
/
init.wifi.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
# Wi-Fi init file
on post-fs-data
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi system
chmod 0660 /data/misc/wifi/p2p_supplicant.conf
chown system wifi /data/misc/wifi/p2p_supplicant.conf
mkdir /data/misc/wifi_share_profile 0771 wifi system
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/wifi/log/ 0770 wifi system
mkdir /data/media/wifi/ 0770 wifi system
mkdir /data/media/wifi/log/ 0770 wifi system
mkdir /data/misc/dhcp 0775 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chown wifi root /dev/rfkill
# Create the directories used by the Wireless subsystem
mkdir /data/vendor/wifi 0770 wifi wifi
mkdir /data/vendor/wifi/sockets 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
# copy wpa_supplicant.conf
copy /system/vendor/etc/wifi/wpa_supplicant.conf /data/vendor/wifi/wpa/wpa_supplicant.conf
chown wifi system /data/vendor/wifi/wpa/wpa_supplicant.conf
chmod 0660 /data/vendor/wifi/wpa/wpa_supplicant.conf
# for WIFI TRP/TIS
mkdir /data/misc/conn 0771 system root
chown system root /data/misc/conn/.psm.info
chmod 0664 /data/misc/conn/.psm.info
# for WIFI Antenna Selection
chown system root /data/misc/conn/.ant.info
chmod 0664 /data/misc/conn/.ant.info
# for WIFI Version
write /data/misc/conn/.wifiver.info 0
chown system root /data/misc/conn/.wifiver.info
chmod 0666 /data/misc/conn/.wifiver.info
# for WIFI Antenna
write /data/misc/conn/.wificable.info E
chown system root /data/misc/conn/.wificable.info
chmod 0666 /data/misc/conn/.wificable.info
# for WIFI MEMDUMP
# The default value of below memdump file is set in SecProductFeature
write /data/misc/conn/.memdump.info 2
chown system root /data/misc/conn/.memdump.info
chmod 0666 /data/misc/conn/.memdump.info
# for WIFI DONGLE EVENT LOG
write /data/misc/conn/.logtrace.info 1
chown system root /data/misc/conn/.logtrace.info
chmod 0666 /data/misc/conn/.logtrace.info
# for WIFI Cert
chmod 0664 /data/misc/conn/.bustxglom.info
chmod 0664 /data/misc/conn/.roamoff.info
chmod 0664 /data/misc/conn/.frameburst.info
chmod 0664 /data/misc/conn/.txbf.info
# for WIFI MAC address
mkdir /efs/wifi 0775 radio system
chown system wifi /efs/wifi/.mac.info
chmod 0660 /efs/wifi/.mac.info
on boot
setprop wifi.interface wlan0
# Pcie WiFi T-put setting
write /sys/class/net/wlan0/queues/rx-0/rps_cpus 00
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-puse_p2p_group_interface=1p2p_device=1 \
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
-g@android:wpa_wlan0
# 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
interface [email protected]::ISupplicant default
interface [email protected]::ISupplicant default
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service macloader /vendor/bin/macloader
class main
oneshot
on property:init.svc.macloader=stopped
chown system root /data/misc/conn/.cid.info
chmod 0664 /data/misc/conn/.cid.info
chown system root /data/.rev
chmod 0664 /data/.rev