9

I've tried all publicly discussed methods I could find to connect to WiFi via ADB on a phone with a broken screen (no display/no touch). The closest I have got is via wpa_cli using the method #1 described below.

Other methods that I tried are also mentioned but with no success. My goal for this broken phone is to use it as a headless server either via LinuxDeploy or native apps for Android, and for that I need to get VNC running and for that I need to connect to Wifi somehow.

Solutions for connecting to Wifi OR otherwise getting VNC access to the Android display (using ADB usb only) are welcome. I don't have a USB-C Network card so using that isn't an option at this stage.

Method #1 - Using WPA_CLI

In this case I leave /data/misc/wifi/wpa_supplicant.conf and /data/misc/wifi/WifiConfigStore.xml untouched and just pop into wpa_cli using adb shell

wpa_cli Setup

> add_network
0
> set_network 0 scan_ssid 1
OK
> set_network 0 ssid "my_ssid"
OK
> set_network 0 key_mgmt WPA-PSK
OK
> set_network 0 psk "my_wifi_pass"
OK
> enable_network 0
OK
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=3 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>Trying to associate with SSID 'fy-huawei-m9'
<3>CTRL-EVENT-STATE-CHANGE id=-1 state=5 BSSID=00:00:00:00:00:00 SSID=
<3>CTRL-EVENT-STATE-CHANGE id=0 state=6 BSSID=00:00:00:00:00:00 SSID=fy-huawei-m9
<3>Associated with 50:01:d9:41:d7:00
<3>CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
<3>CTRL-EVENT-STATE-CHANGE id=0 state=7 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-STATE-CHANGE id=0 state=8 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>WPA: Key negotiation completed with 50:01:d9:41:d7:00 [PTK=CCMP GTK=CCMP]
<3>CTRL-EVENT-CONNECTED - Connection to 50:01:d9:41:d7:00 completed [id=0 id_str=]
<3>CTRL-EVENT-STATE-CHANGE id=0 state=9 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-DISCONNECTED bssid=50:01:d9:41:d7:00 reason=3 locally_generated=1
<3>CTRL-EVENT-STATE-CHANGE id=0 state=0 BSSID=50:01:d9:41:d7:00 SSID=fy-huawei-m9
<3>CTRL-EVENT-SCAN-STARTED
<3>CTRL-EVENT-SCAN-RESULTS

Looks like the wifi interface associates momentarily with the SSID but then immediately disconnects.

Logcat Output
01-01 00:16:25.358  1074  1913 D WifiService: setWifiEnabled: true pid=2849, uid=0, package=com.android.shell
01-01 00:16:25.358  1074  1913 I WifiService: setWifiEnabled package=com.android.shell uid=0 enable=true
01-01 00:16:25.362   756   756 I [email protected]: Wifi HAL started
01-01 00:16:25.371   756   756 I [email protected]: Wifi driver is ready: Success
01-01 00:16:25.625   756   756 I WifiHAL : Initializing wifi
01-01 00:16:25.625   951   963 I LOWI-8.5.0.3.a: [LOWIController] isWifiEnabled: Wifi is now enabled
01-01 00:16:25.635   756   756 I WifiHAL : mpdu_size_threshold : 128, aggressive_statistics_gathering : 0
01-01 00:16:25.636  1074  1675 I WifiVendorHal: Vendor Hal started successfully
01-01 00:16:25.636  1074  1675 D WificondControl: Setting up driver for client mode
01-01 00:16:25.770  1074  1675 D WifiStateMachine: Setting OUI to DA-A1-19
01-01 00:16:25.772   756   756 E WifiHAL : wifi_set_scanning_mac_oui: requestResponse Error:-1
01-01 00:16:25.774  1074  1675 E WifiVendorHal: setScanningMacOui(l.1445) failed {.code = ERROR_UNKNOWN, .description = unknown}
01-01 00:16:25.784  1074  1675 I WifiVendorHal: Driver: 5.1.1.28U Firmware: FW:1.0.0.133.0 HW:WCN3990_V2.1
01-01 00:16:25.799  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:16:25.799  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:16:25.799  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:16:25.835  1074  1675 D WifiConnectivityHelper: Firmware supported feature set: 48931bf
01-01 00:16:25.836  1074  1677 I WifiScanningService: wifi driver loaded with scan capabilities: max buckets=6
01-01 00:16:25.840  1074  1675 D WifiConnectivityHelper: Firmware roaming supported with capabilities: max num blacklist bssid=16 max num whitelist ssid=4
01-01 00:16:25.841  1074  1675 D WifiNative-wlan0: configureRoaming
01-01 00:16:25.842  1074  1675 I WifiStateMachine: disconnectedstate enter
01-01 00:16:25.844  1074  1675 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:16:25.844  1074  1675 I chatty  : uid=1000(system) WifiStateMachin identical 2 lines
01-01 00:16:25.845  1074  1675 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:16:25.854  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:16:25.854  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:16:25.854  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:16:25.939  1835  1973 I QCNEJ/CndHalConnector: -> SND notifyWifiP2pStateChanged(5)
01-01 00:16:55.456  1074  1913 D WifiService: setWifiEnabled: true pid=2876, uid=0, package=com.android.shell
01-01 00:16:55.456  1074  1913 I WifiService: setWifiEnabled package=com.android.shell uid=0 enable=true
01-01 00:17:35.524  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:17:35.524  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:17:35.525  1074  1110 I WifiService: getSupportedFeatures uid=1000
01-01 00:19:35.647   756  2865 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0x6a
01-01 00:19:36.272   756  2865 I WifiHAL : event received NL80211_CMD_VENDOR, vendor_id = 0x1374, subcmd = 0x6b
01-01 00:19:36.441  1074  1675 W WifiConfigManager: Looking up network with invalid networkId -1
01-01 00:19:36.442  1074  1675 W WifiStateMachine: Connected to unknown networkId -1, disconnecting...
01-01 00:19:37.260   756  2865 E WifiHAL : Few pkt stats messages missed: rcvd = 0, prev = 0
01-01 00:19:37.260   756  2865 I WifiHAL : Fate Tx-Rx: Packet fate stats stop received
01-01 00:19:58.058  1074  1110 I WifiService: requestActivityInfo uid=1000
01-01 00:19:58.058  1074  1110 I WifiService: reportActivityInfo uid=1000
01-01 00:19:58.059  1074  1110 I WifiService: getSupportedFeatures uid=1000

The key line here are:

01-01 00:19:36.441  1074  1675 W WifiConfigManager: Looking up network with invalid networkId -1
01-01 00:19:36.442  1074  1675 W WifiStateMachine: Connected to unknown networkId -1, disconnecting...

Looks like the WifiConfigManager won't let me connect to a network which isn't defined in /data/misc/wifi/WifiConfigStore.xml

Method #2 - Naive definition in wpa_supplicant.conf

In this attempt I simply define the entwork in wpa_supplicant.conf and don't touch /data/misc/wifi/WifiConfigStore.xml

Here is what my wpa_supplicant.conf looks like:

wpa_supplicant.conf

update_config=1
ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi
eapol_version=1
ap_scan=1
fast_reauth=1

network={
    ssid="my_ssid"
    psk="my_wifi_pass"
    key_mgmt=WPA-PSK
    priority=241
}

I then proceed to disable and re-enable the wifi service using svc wifi disable and svc wifi enable, and even reboot the phone but in both cases it doesn't seem to even attempt connecting to the network. The invalid networkId -1 message still pops up.

Logcat Output:

01-01 00:00:06.649  1062  1062 D WifiService: resetting networks because SIM was removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting country code because SIM is removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting networks because SIM was removed
01-01 00:00:06.649  1062  1062 D WifiService: resetting country code because SIM is removed
01-01 00:00:06.649  1062  1670 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:06.650  1062  1670 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:07.055  1062  1073 D WificondControl: Scan result ready event
01-01 00:00:07.061  1062  1670 W WifiConfigManager: Looking up network with invalid networkId -1

Method #3 - Copying WifiConfigStore.xml from a different phone connecting to this SSID

As a last ditch attempt, I restored the original wpa_supplicant.conf and copied over WifiConfigStore.xml from a phone running the same Android version that successfully connects to the WiFi network in question. Then I rebooted the phone

WifiConfigStore.xml

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<WifiConfigStoreData>
    <int name="Version" value="1" />
    <NetworkList>
        <Network>
            <WifiConfiguration>
                <string name="ConfigKey">&quot;fy-huawei-m9&quot;WPA_PSK</string>
                <string name="SSID">&quot;fy-huawei-m9&quot;</string>
                <null name="BSSID" />
                <string name="PreSharedKey">&quot;THEFORTUNE&quot;</string>
                <null name="WEPKeys" />
                <int name="WEPTxKeyIndex" value="0" />
                <boolean name="HiddenSSID" value="false" />
                <boolean name="RequirePMF" value="false" />
                <byte-array name="AllowedKeyMgmt" num="1">02</byte-array>
                <byte-array name="AllowedProtocols" num="1">0b</byte-array>
                <byte-array name="AllowedAuthAlgos" num="1">01</byte-array>
                <byte-array name="AllowedGroupCiphers" num="1">0f</byte-array>
                <byte-array name="AllowedPairwiseCiphers" num="1">06</byte-array>
                <boolean name="Shared" value="true" />
                <int name="Status" value="0" />
                <null name="FQDN" />
                <null name="ProviderFriendlyName" />
                <null name="LinkedNetworksList" />
                <null name="DefaultGwMacAddress" />
                <boolean name="ValidatedInternetAccess" value="true" />
                <boolean name="NoInternetAccessExpected" value="false" />
                <int name="UserApproved" value="0" />
                <boolean name="MeteredHint" value="false" />
                <int name="MeteredOverride" value="0" />
                <boolean name="UseExternalScores" value="false" />
                <int name="NumAssociation" value="22" />
                <int name="CreatorUid" value="1000" />
                <string name="CreatorName">android.uid.system:1000</string>
                <string name="CreationTime">time=08-02 08:39:20.369</string>
                <int name="LastUpdateUid" value="1000" />
                <string name="LastUpdateName">android.uid.system:1000</string>
                <int name="LastConnectUid" value="1000" />
                <boolean name="IsLegacyPasspointConfig" value="false" />
                <long-array name="RoamingConsortiumOIs" num="0" />
            </WifiConfiguration>
            <NetworkStatus>
                <string name="SelectionStatus">NETWORK_SELECTION_ENABLED</string>
                <string name="DisableReason">NETWORK_SELECTION_ENABLE</string>
                <string name="ConnectChoice">&quot;fy-net-ac&quot;WPA_PSK</string>
                <long name="ConnectChoiceTimeStamp" value="1534074466002" />
                <boolean name="HasEverConnected" value="true" />
            </NetworkStatus>
            <IpConfiguration>
                <string name="IpAssignment">DHCP</string>
                <string name="ProxySettings">NONE</string>
            </IpConfiguration>
        </Network>
    </NetworkList>
    <PasspointConfigData>
        <long name="ProviderIndex" value="0" />
    </PasspointConfigData>
</WifiConfigStoreData>

wpa_supplicant.conf

01-01 00:00:05.424  1073  1637 D WifiConfigStore: Reading from user store completed in 4 ms.
01-01 00:00:05.440  1073  1637 D WifiConfigStore: Writing to stores completed in 16 ms.
01-01 00:00:05.440  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=6, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.442  1073  1637 D WifiConnectivityHelper: Firmware supported feature set: 48931bf
01-01 00:00:05.442  1073  1637 D WifiConnectivityHelper: Firmware roaming supported with capabilities: max num blacklist bssid=16 max num whitelist ssid=4
01-01 00:00:05.443  1073  1637 D WifiNative-wlan0: configureRoaming
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=3, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI    : got request NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=6, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=3, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ TRACK_DEFAULT id=9, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.443  1073  1637 D WIFI_UT : got request NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN] ] with score 0
01-01 00:00:05.445  1073  1676 I SupplicantP2pIfaceHal: Registering ISupplicant service ready callback.
01-01 00:00:05.447  1073  1689 I SupplicantP2pIfaceHal: IServiceNotification.onRegistration for: [email protected]::ISupplicant, default preexisting=true
01-01 00:00:05.447  1073  1689 I zygote64: Looking for service [email protected]::ISupplicant/default
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: entering getInterface()
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: getInterface() completed successfully.
01-01 00:00:05.449  1073  1689 D SupplicantP2pIfaceHal: leaving getInterface() with result = [email protected]::ISupplicantP2pIface@Proxy
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: entering registerCallback()
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: registerCallback() completed successfully.
01-01 00:00:05.450  1073  1689 D SupplicantP2pIfaceHal: leaving registerCallback()
01-01 00:00:05.450  1073  1689 I SupplicantP2pIfaceHal: Completed initialization of ISupplicant interfaces.
01-01 00:00:05.484  1073  1632 I WifiService: getConfiguredNetworks uid=1000
01-01 00:00:05.543  1073  1073 D WifiService: resetting networks because SIM was removed
01-01 00:00:05.543  1073  1073 D WifiService: resetting country code because SIM is removed
01-01 00:00:05.543  1073  1637 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:05.544  1073  1073 D WifiService: resetting networks because SIM was removed
01-01 00:00:05.544  1073  1073 D WifiService: resetting country code because SIM is removed
01-01 00:00:05.544  1073  1637 D WifiStateMachine: resetting EAP-SIM/AKA/AKA' networks since SIM was changed
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: entering setWpsDeviceName(Android_d3d3)
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: setWpsDeviceName(Android_d3d3) completed successfully.
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsDeviceName(Android_d3d3)
01-01 00:00:05.556  1073  1676 D SupplicantP2pIfaceHal: entering setSsidPostfix(-Android_d3d3)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: setSsidPostfix(-Android_d3d3) completed successfully.
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: leaving setSsidPostfix(-Android_d3d3)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: entering setWpsDeviceType(10-0050F204-5)
01-01 00:00:05.557  1073  1676 D SupplicantP2pIfaceHal: setWpsDeviceType(10-0050F204-5) completed successfully.
01-01 00:00:05.558  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsDeviceType(10-0050F204-5)
01-01 00:00:05.558  1073  1676 D SupplicantP2pIfaceHal: entering setWpsConfigMethods(virtual_push_button physical_display keypad)
01-01 00:00:05.558  1847  1956 I QCNEJ/CndHalConnector: -> SND notifyWifiP2pStateChanged(5)
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: setWpsConfigMethods(virtual_push_button physical_display keypad) completed successfully.
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: leaving setWpsConfigMethods(virtual_push_button physical_display keypad)
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: entering getDeviceAddress()
01-01 00:00:05.559  1073  1676 D SupplicantP2pIfaceHal: getDeviceAddress() completed successfully.
01-01 00:00:05.560  1073  1676 D SupplicantP2pIfaceHal: leaving getDeviceAddress() with result = 82:ad:16:7a:57:57
01-01 00:00:05.560  1073  1676 D SupplicantP2pIfaceHal: entering flush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: flush() completed successfully.
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: leaving flush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: entering serviceFlush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: serviceFlush() completed successfully.
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: leaving serviceFlush()
01-01 00:00:05.561  1073  1676 D SupplicantP2pIfaceHal: entering listNetworks()
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: listNetworks() completed successfully.
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: leaving listNetworks() with result = []
01-01 00:00:05.562  1073  1676 D SupplicantP2pIfaceHal: entering saveConfig()
01-01 00:00:05.569  1073  1676 D SupplicantP2pIfaceHal: saveConfig() completed successfully.
01-01 00:00:05.569  1073  1676 D SupplicantP2pIfaceHal: leaving saveConfig()
01-01 00:00:06.108  1073  1834 D WificondControl: Scan result ready event
01-01 00:00:06.113  1073  1637 W WifiConfigManager: Looking up network with invalid networkId -1

Still no luck. Don't know what else I can do at this point but not giving up just yet.

4
  • 2
    Do you know about github.com/Genymobile/scrcpy?
    – Zulakis
    Aug 13, 2018 at 19:41
  • scrcpy looks quite interesting. I'll give it a go and report back here. Aug 14, 2018 at 3:21
  • Thank you @Zulakis. scrcpy is working perfect and I couldn't be happier. I've managed to connect to Wifi normally and can resume my experimentation. Aug 14, 2018 at 4:18
  • You're welcome! It's a great project :-)
    – Zulakis
    Aug 14, 2018 at 9:54

1 Answer 1

1

svc wifi enable|disable should work if it's only about turning WiFi ON and OFF. Or you can use setWifiEnabled method directly by calling service wifi. On Android 8.1 its code (order) is 24, so you can do from adb shell:

~$ service call wifi s16 null i32 1    # Trun WiFi ON
~$ service call wifi s16 null i32 0    # Trun WiFi OFF

But since you also need to add new network to connect, it becomes difficult to go through Android APIs from commandline.

CONNECTING TO WIFI FROM COMMANDLINE:

Another approach is to use wpa_supplicant (and optionally wpa_cli) directly from CLI, don't rely on pre-generated WifiConfigStore.xml or wpa_supplicant.conf.

The following script includes the simple steps:

#!/system/bin/sh

IFACE=wlan0                 # WiFi interface name
SSID=abcxyz                 # WiFi network name
PSK=foobarfoobar            # WiFi network password
DIR=/data/local/tmp/WIFI    # temporary directory
mkdir -p $DIR

if [ "$1" = stop ]
then
    pkill wpa_supplicant
    ip ru del lookup main
    ip r f table main
    ip a f dev $IFACE
    rm -rf $DIR
    ndc resolver setnetdns 0 '' 0.0.0.0
    exit
fi

# set interface up, add rule to lookup into 'main' table
svc wifi disable
for i in /sys/class/net/*; do ip link set down dev $(basename $i); done
ip link set dev lo up
ip link set dev $IFACE up
ip rule add lookup main

# destroy set network  if any
ndc network default set 0

# create configuration file
<<-CONF cat >$DIR/wpa_supplicant.conf
    network={
        ssid="$SSID"
        psk="$PSK"
        scan_ssid=1
    }
CONF

# scan WiFi and connect to access point
wpa_supplicant -B -i $IFACE -c $DIR/wpa_supplicant.conf
until iw dev $IFACE link | grep -q '^Connected to'; do sleep 1; done

# create 'udhcpc' script
<<-'SCRIPT' cat >$DIR/udhcpc_default.script
#!/system/bin/sh

[ "$1" = bound ] || exit 0

# set IP address, add gateway route and set DNS
ip address add $ip/$mask dev $interface
ip route add default via $router dev $interface
ndc resolver setnetdns 0 '' $dns
SCRIPT

# start DHCP client to obtain IP from server
chmod 0755 $DIR/udhcpc_default.script
busybox udhcpc -v -f -q -i $IFACE -s $DIR/udhcpc_default.script

* Omit the DHCP part if you want to set IP, route and DNS manually.
* I use my own built wpa_supplicant binary. udhcpc is a busybox applet, ip, iw and ndc are part of stock Android.
* For further options see wpa_supplicant.conf and udhcpc samples.

DNS:

Apps built with Android SDK depend on Bionic libc resolver for DNS queries, so we need to set DNS servers through native APIs. But still the Java network stack is down, so some apps depending on Android APIs may not behave normally. Programs linked against other C libraries may require resolv.conf to exist. See details in How to configure DNS? and How does Android OS do DNS name resolution?

WIFI DRIVER AND FIRMWARE:

Another problem could be to load WiFi in-kernel driver (as module) and firmware on boot. This is handled by vendor specific wcnss_service which runs in combination with [email protected] HAL. For instance on my device with Qualcomm Atheros Prima WLAN module the service loads firmware (WCNSS_qcom_cfg.ini and related WCNSS_*) files from /vendor/firmware/wlan/prima/ or /persist.

Once you turn on WiFi after boot, all services are started (including wificond) and firmware is loaded. You can check using rfkill or iw phy commands or directly from /sys/class/rfkill. To manually load driver:

~# echo -n sta >/sys/module/wlan/parameters/fwpath

Some more details can be found here, here and here.

When loading driver/firmware WiFi interface should already be created. Check using iw dev or ip link. Or you can manually create:

~# iw $(busybox rfkill -no device list wifi) interface add $IFACE type managed

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .