summaryrefstree
path: root/vendor/etc/init/init.honor.wcnss.rc
blob: 3cf6f7277573d7fbbf306fb6f218059e21417349 (plain)
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
on boot
    # for wifi driver built in
    chown wifi wifi /proc/wifi_built_in/wifi_start
    chown root root /proc/wifi_built_in/mac_addr_hw
    chown wifi wifi /proc/wifi_built_in/wifi_status
    chmod 0660 /proc/wifi_built_in/wifi_status
    chmod 0660 /proc/wifi_built_in/mac_addr_hw
    chown system system /proc/wifi_built_in/debug_level_hw
    # NFC local data and nfcee xml storage
    mkdir /data/nfc 0770 nfc nfc
    mkdir /data/nfc/param 0770 nfc nfc
    mkdir /data/vendor/bluedroid 0770 bluetooth bluetooth

    setprop ro.nfc.port "I2C"
    chmod 0660 /dev/pn544
    chown nfc nfc /dev/pn544

    chown nfc nfc /sys/nfc/nfc_fwupdate
    chmod 0664 /sys/nfc/nfc_fwupdate
    chown nfc nfc /sys/nfc/nxp_config_name
    chmod 0664 /sys/nfc/nxp_config_name
    chown nfc nfc /sys/nfc/nfc_brcm_conf_name
    chmod 0664 /sys/nfc/nfc_brcm_conf_name
    chown nfc nfc /sys/nfc/nfc_sim_switch
    chmod 0664 /sys/nfc/nfc_sim_switch
    chown nfc nfc /sys/nfc/nfc_sim_status
    chmod 0444 /sys/nfc/nfc_sim_status
    chown nfc nfc /sys/nfc/rd_nfc_sim_status
    chmod 0444 /sys/nfc/rd_nfc_sim_status
    chown nfc nfc /sys/nfc/nfc_enable_status
    chmod 0664 /sys/nfc/nfc_enable_status
    chown nfc nfc /sys/nfc/nfc_card_num
    chmod 0444 /sys/nfc/nfc_card_num
    chown nfc nfc /sys/nfc/nfc_chip_type
    chmod 0444 /sys/nfc/nfc_chip_type
    chown nfc nfc /sys/nfc/nfc_hal_dmd
    chmod 0664 /sys/nfc/nfc_hal_dmd
    chown nfc nfc /sys/nfc/nfc_single_channel
    chmod 0444 /sys/nfc/nfc_single_channel
    chmod 777 /vendor/bin/fusion_daemon

# for LBS
service fusd /vendor/bin/fusion_daemon
    class late_start
    user system
    group system root wakelock
    disabled

on post-fs-data
    # ttach selinux tag
    restorecon_recursive /data/misc/wifi

service fmhal_service /system/bin/fmhal_service
    class late_start
    user bluetooth
    group bluetooth net_bt_admin
    disabled

service wlan_detect /vendor/bin/wlan_detect
    class main
    user root
    group root
    oneshot

on property:vold.decrypt=trigger_restart_framework
   start cnss_diag

service cnss_diag /system/vendor/bin/vendor_cnss_diag -q -f -t HELIUM
   class main
   user system
   group system wifi
   oneshot

service wifi_address /vendor/bin/wifi_address
    class late_start
    user root
    group root
    oneshot

#service ftmdaemon /system/vendor/bin/ftmdaemon
#    class late_start
#    user root
#    group bluetooth net_bt_admin misc diag net_bt
    #seclabel u:r:vendor_mmi:s0
#    disabled
#    oneshot

on post-fs-data
#add for wifi
    chown wifi wifi /data/misc/wifi/p2p_supplicant.conf
    chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
    chown wifi wifi /data/misc/wifi/hostapd.conf
    chown wifi wifi /data/misc/wifi/hostapd.accept
    chown wifi wifi /data/misc/wifi/hostapd.deny
    chmod 0660 /data/misc/wifi/hostapd.conf
    chmod 0660 /data/misc/wifi/hostapd.accept
    chmod 0660 /data/misc/wifi/hostapd.deny
    chmod 0660 /data/misc/wifi/p2p_supplicant.conf
    chmod 0660 /data/misc/wifi/wpa_supplicant.conf
    #add for wapi certificate
    mkdir /data/wapi_certificate
    chmod 0770 /data/wapi_certificate
    chown system wifi /data/wapi_certificate
    restorecon_recursive /data/wapi_certificate
    exec u:r:prepare_wifi_cfg:s0 root root -- /vendor/bin/prepare_wifi_cfg.sh

on property:init.svc.hostapd=stopped
     chown wifi wifi /data/misc/wifi/hostapd.conf
     chown wifi wifi /data/misc/wifi/hostapd.accept
     chown wifi wifi /data/misc/wifi/hostapd.deny
     chmod 0660 /data/misc/wifi/hostapd.conf
     chmod 0660 /data/misc/wifi/hostapd.accept
     chmod 0660 /data/misc/wifi/hostapd.deny

on post-fs
    chmod 755 /venodor/bin/wifi_driver_init

service wifi_driver_init /vendor/bin/wifi_driver_init
    class late_start
    user root
    group root wifi system
    oneshot
    disabled

on property:wlan.driver.wcnss_service.state=running
    start wifi_driver_init

# for LBS
on property:service.lbs.start=1
    start fusd