-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.connectivity.rc
executable file
·77 lines (64 loc) · 2.65 KB
/
init.connectivity.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
# zygote need to be started after otapreopt which will be done on post-fs-data
on zygote-start
# for bluetooth
# bluetooth LPM
chmod 0220 /proc/bluetooth/sleep/lpm
chmod 0220 /proc/bluetooth/sleep/btwrite
chown bluetooth net_bt /proc/bluetooth/sleep/lpm
chown bluetooth net_bt /proc/bluetooth/sleep/btwrite
chmod 0660 /dev/rtk_btusb
chown bluetooth net_bt /dev/rtk_btusb
chmod 0660 /dev/rtkbt_dev
chown bluetooth net_bt /dev/rtkbt_dev
# bluetooth MAC address programming
chown bluetooth net_bt ro.bt.bdaddr_path
setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
chmod 0660 /dev/ttyS0
chmod 0660 /dev/ttyS1
chmod 0660 /dev/ttyS7
chmod 0660 /dev/ttyS8
chmod 0660 /dev/ttyS9
chmod 0660 /dev/vflash
chmod 0664 /dev/vendor_storage
chown bluetooth net_bt /dev/vflash
chown bluetooth net_bt /dev/vendor_storage
chown bluetooth net_bt /dev/ttyS0
chown bluetooth net_bt /dev/ttyS1
chown bluetooth net_bt /dev/ttyS7
chown bluetooth net_bt /dev/ttyS8
chown bluetooth net_bt /dev/ttyS9
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
chmod 0664 /sys/class/rfkill/rfkill0/state
# for wifi
mkdir /data/vendor/wifi 0771 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path
#for nfc
chmod 0660 /dev/bcm2079x
chown nfc nfc /dev/bcm2079x
mkdir /data/nfc 0700 nfc nfc encryption=Require
mkdir /data/nfc/param 0700 nfc nfc encryption=Require
on property:wlan.driver.status=ok
chown wifi wifi /sys/module/bcmdhd/parameters/firmware_path
chown wifi wifi /sys/module/bcmdhd/parameters/nvram_path
on property:vendor.wifi.direct.interface=p2p0
setprop wifi.direct.interface p2p0
on property:vendor.wifi.direct.interface=p2p-dev-wlan0
setprop wifi.direct.interface p2p-dev-wlan0
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
/vendor/etc/wifi/wpa_config.txt
# 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 android.hardware.wifi.supplicant@1.0::ISupplicant default
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
interface android.hardware.wifi.supplicant@1.2::ISupplicant default
interface android.hardware.wifi.supplicant@1.3::ISupplicant default
interface android.hardware.wifi.supplicant@1.4::ISupplicant default
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot