Skip to content

WiFi


Gets the country code as a two-letter string.

adb shell cmd wifi get-country-code

Enables or disables Wi-Fi on this device.

adb shell cmd wifi set-wifi-enabled enabled|disabled

Sets whether scanning should be available even when Wi-Fi is off.

adb shell cmd wifi set-scan-always-available enabled|disabled

Lists the latest scan results.

adb shell cmd wifi list-scan-results

Starts a new scan.

adb shell cmd wifi start-scan

Lists the saved networks.

adb shell cmd wifi list-networks

Removes the network mentioned by <networkId>.

adb shell cmd wifi forget-network <networkId>

Displays the current Wi-Fi status.

adb shell cmd wifi status

Sets verbose logging to be enabled or disabled.

adb shell cmd wifi set-verbose-logging enabled|disabled

Checks whether verbose logging is enabled or disabled.

adb shell cmd wifi is-verbose-logging

Temporarily disables all Wi-Fi networks except merged carrier networks with the given subId.

adb shell cmd wifi start-restricting-auto-join-to-subscription-id subId

Undoes the effects of the start-restricting-auto-join-to-subscription-id command.

adb shell cmd wifi stop-restricting-auto-join-to-subscription-id

Remove a Network Suggestion with Provided SSID

adb shell cmd wifi remove-suggestion <ssid> -l

Remove All Suggestions Added via Shell

adb shell cmd wifi remove-all-suggestions

List Suggested Networks Added via Shell

adb shell cmd wifi list-suggestions

Set a single LTE cell channel

adb shell cmd wifi set-coex-cell-channels lte 5 455000 10000 315000 10000

Set a single NR cell channel

adb shell cmd wifi set-coex-cell-channels nr 78 365000 5000 410000 5000

Set multiple LTE cell channels

adb shell cmd wifi set-coex-cell-channels lte 1 450000 8000 310000 8000 lte 2 455000 10000 315000 10000

Set multiple NR cell channels

adb shell cmd wifi set-coex-cell-channels nr 55 375000 6000 405000 6000 nr 56 380000 7000 410000 7000

Set a combination of LTE and NR cell channels

adb shell cmd wifi set-coex-cell-channels lte 3 460000 12000 320000 12000 nr 70 385000 8000 415000 8000

Set an unknown frequency and bandwidth for a cell channel

adb shell cmd wifi set-coex-cell-channels lte 4 UNKNOWN: -1 UNKNOWN: 0 UNKNOWN: -1 UNKNOWN: 0

Start Soft AP with an open network

adb shell cmd wifi start-softap <ssid> open

Start Soft AP with a WPA2 network

adb shell cmd wifi start-softap <ssid> wpa2 <passphrase>

Start Soft AP with a WPA3 network

adb shell cmd wifi start-softap <ssid> wpa3 <passphrase>

Start Soft AP with a WPA3 Transition network

adb shell cmd wifi start-softap <ssid> wpa3_transition <passphrase>

Start Soft AP with an OWE network

adb shell cmd wifi start-softap <ssid> owe

Start Soft AP with an OWE Transition network

adb shell cmd wifi start-softap <ssid> owe_transition

Start Soft AP with a specific band preference (2.4GHz)

adb shell cmd wifi start-softap <ssid> open -b 2

Start Soft AP with a specific band (5GHz)

adb shell cmd wifi start-softap <ssid> open -b 5

Start Soft AP with a specific band preference (6GHz)

adb shell cmd wifi start-softap <ssid> open -b 6

Start Soft AP with no band preference

adb shell cmd wifi start-softap <ssid> open -b any

Start Soft AP as a bridged AP (2.4GHz + 5GHz)

adb shell cmd wifi start-softap <ssid> open -b bridged

Start Soft AP as a bridged AP (2.4GHz + 5GHz)

adb shell cmd wifi start-softap <ssid> open -b bridged_2_5

Start Soft AP as a bridged AP (2.4GHz + 6GHz)

adb shell cmd wifi start-softap <ssid> open -b bridged_2_6

Start Soft AP as a bridged AP (5GHz + 6GHz)

adb shell cmd wifi start-softap <ssid> open -b bridged_5_6

Start Soft AP with a specific channel frequency

adb shell cmd wifi start-softap <ssid> open -f <int>

Start Soft AP with multiple channel frequencies

adb shell cmd wifi start-softap <ssid> open -f <int> <int>

Start Soft AP with SSID as hex digits instead of plain text

adb shell cmd wifi start-softap <ssid> open -x

Reload Wi-Fi resources

adb shell cmd wifi reload-resources

Stop Softap (hotspot)

adb shell cmd wifi stop-softap

PMKSA flush

adb shell cmd wifi pmksa-flush <networkId>

Reset Coex Cell Channels

adb shell cmd wifi reset-coex-cell-channels

Get Coex Cell Channels

adb shell cmd wifi get-coex-cell-channels

Set Connected Score

adb shell cmd wifi set-connected-score <score>

Reset Connected Score

adb shell cmd wifi reset-connected-score

Interface Priority Interactive Mode

adb shell cmd wifi interface-priority-interactive-mode enable|disable|default

Set One-Shot Screen-On Delay

adb shell cmd wifi set-one-shot-screen-on-delay-ms <delayMs>

Set IP Reachability Disconnect (Enabled)

adb shell cmd wifi set-ipreach-disconnect enabled

Set IP Reachability Disconnect (Disabled)

adb shell cmd wifi set-ipreach-disconnect disabled

Get IP Reachability Disconnect

adb shell cmd wifi get-ipreach-disconnect

Query STA Interface

adb shell cmd wifi query-interface <uid> <package_name> STA

Query AP Interface

adb shell cmd wifi query-interface <uid> <package_name> AP

Query AWARE Interface

adb shell cmd wifi query-interface <uid> <package_name> AWARE

Query DIRECT Interface

adb shell cmd wifi query-interface <uid> <package_name> DIRECT

Query STA Interface (New)

adb shell cmd wifi query-interface <uid> <package_name> STA -new

Query AP Interface (New)

adb shell cmd wifi query-interface <uid> <package_name> AP -new

Query AWARE Interface (New)

adb shell cmd wifi query-interface <uid> <package_name> AWARE -new

Query DIRECT Interface (New)

adb shell cmd wifi query-interface <uid> <package_name> DIRECT -new

Enable network selection for all networks (priority 0)

adb shell cmd wifi set-network-selection-config enabled enabled -a 0

Enable network selection for all networks (priority 1)

adb shell cmd wifi set-network-selection-config enabled enabled -a 1

Enable network selection for all networks (priority 2)

adb shell cmd wifi set-network-selection-config enabled enabled -a 2

Disable network selection for all networks (priority 0)

adb shell cmd wifi set-network-selection-config enabled disabled -a 0

Disable network selection for all networks (priority 1)

adb shell cmd wifi set-network-selection-config enabled disabled -a 1

Disable network selection for all networks (priority 2)

adb shell cmd wifi set-network-selection-config enabled disabled -a 2

Disable network selection for all networks except the saved ones (priority 0)

adb shell cmd wifi set-network-selection-config disabled enabled -a 0

Disable network selection for all networks except the saved ones (priority 1)

adb shell cmd wifi set-network-selection-config disabled enabled -a 1

Disable network selection for all networks except the saved ones (priority 2)

adb shell cmd wifi set-network-selection-config disabled enabled -a 2

Disable network selection for all networks (priority 0)

adb shell cmd wifi set-network-selection-config disabled disabled -a 0

Disable network selection for all networks (priority 1)

adb shell cmd wifi set-network-selection-config disabled disabled -a 1

Disable network selection for all networks (priority 2)

adb shell cmd wifi set-network-selection-config disabled disabled -a 2