Mastering Wi-Fi Management on Android: The Ultimate Guide
Step into the realm of advanced Wi-Fi management on Android with this detailed guide. Whether you're a developer, tech enthusiast, or a user seeking to enhance your device's Wi-Fi capabilities, this guide offers a treasure trove of commands and insights. Learn how to enable/disable Wi-Fi, manage network suggestions, configure Soft APs, and navigate the complexities of Wi-Fi and cellular coexistence. Equip yourself with the knowledge to manipulate Wi-Fi settings, optimize connectivity, and troubleshoot common Wi-Fi issues on Android devices. Unlock the full potential of your device's wireless capabilities and elevate your Android experience.
Gets the country code as a two-letter string.
cmd wifi get-country-code
Enables or disables Wi-Fi on this device.
cmd wifi set-wifi-enabled enabled|disabled
Sets whether scanning should be available even when Wi-Fi is off.
cmd wifi set-scan-always-available enabled|disabled
Lists the latest scan results.
cmd wifi list-scan-results
Starts a new scan.
cmd wifi start-scan
Lists the saved networks.
cmd wifi list-networks
Removes the network mentioned by <networkId>.
cmd wifi forget-network <networkId>
Displays the current Wi-Fi status.
cmd wifi status
Sets verbose logging to be enabled or disabled.
cmd wifi set-verbose-logging enabled|disabled
Checks whether verbose logging is enabled or disabled.
cmd wifi is-verbose-logging
Temporarily disables all Wi-Fi networks except merged carrier networks with the given subId.
cmd wifi start-restricting-auto-join-to-subscription-id subId
Undoes the effects of the start-restricting-auto-join-to-subscription-id command.
cmd wifi stop-restricting-auto-join-to-subscription-id
Remove a Network Suggestion with Provided SSID
cmd wifi remove-suggestion <ssid> -l
Remove All Suggestions Added via Shell
cmd wifi remove-all-suggestions
List Suggested Networks Added via Shell
cmd wifi list-suggestions
Set a single LTE cell channel
cmd wifi set-coex-cell-channels lte 5 455000 10000 315000 10000
Set a single NR cell channel
cmd wifi set-coex-cell-channels nr 78 365000 5000 410000 5000
Set multiple LTE cell channels
cmd wifi set-coex-cell-channels lte 1 450000 8000 310000 8000 lte 2 455000 10000 315000 10000
Set multiple NR cell channels
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
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
cmd wifi set-coex-cell-channels lte 4 UNKNOWN: -1 UNKNOWN: 0 UNKNOWN: -1 UNKNOWN: 0
Start Soft AP with an open network
cmd wifi start-softap <ssid> open
Start Soft AP with a WPA2 network
cmd wifi start-softap <ssid> wpa2 <passphrase>
Start Soft AP with a WPA3 network
cmd wifi start-softap <ssid> wpa3 <passphrase>
Start Soft AP with a WPA3 Transition network
cmd wifi start-softap <ssid> wpa3_transition <passphrase>
Start Soft AP with an OWE network
cmd wifi start-softap <ssid> owe
Start Soft AP with an OWE Transition network
cmd wifi start-softap <ssid> owe_transition
Start Soft AP with a specific band preference (2.4GHz)
cmd wifi start-softap <ssid> open -b 2
Start Soft AP with a specific band (5GHz)
cmd wifi start-softap <ssid> open -b 5
Start Soft AP with a specific band preference (6GHz)
cmd wifi start-softap <ssid> open -b 6
Start Soft AP with no band preference
cmd wifi start-softap <ssid> open -b any
Start Soft AP as a bridged AP (2.4GHz + 5GHz)
cmd wifi start-softap <ssid> open -b bridged
Start Soft AP as a bridged AP (2.4GHz + 5GHz)
cmd wifi start-softap <ssid> open -b bridged_2_5
Start Soft AP as a bridged AP (2.4GHz + 6GHz)
cmd wifi start-softap <ssid> open -b bridged_2_6
Start Soft AP as a bridged AP (5GHz + 6GHz)
cmd wifi start-softap <ssid> open -b bridged_5_6
Start Soft AP with a specific channel frequency
cmd wifi start-softap <ssid> open -f <int>
Start Soft AP with multiple channel frequencies
cmd wifi start-softap <ssid> open -f <int> <int>
Start Soft AP with SSID as hex digits instead of plain text
cmd wifi start-softap <ssid> open -x
Reload Wi-Fi resources
cmd wifi reload-resources
Stop Softap (hotspot)
cmd wifi stop-softap
PMKSA flush
cmd wifi pmksa-flush <networkId>
Reset Coex Cell Channels
cmd wifi reset-coex-cell-channels
Get Coex Cell Channels
cmd wifi get-coex-cell-channels
Set Connected Score
cmd wifi set-connected-score <score>
Reset Connected Score
cmd wifi reset-connected-score
Interface Priority Interactive Mode
cmd wifi interface-priority-interactive-mode enable|disable|default
Set One-Shot Screen-On Delay
cmd wifi set-one-shot-screen-on-delay-ms <delayMs>
Set IP Reachability Disconnect (Enabled)
cmd wifi set-ipreach-disconnect enabled
Set IP Reachability Disconnect (Disabled)
cmd wifi set-ipreach-disconnect disabled
Get IP Reachability Disconnect
cmd wifi get-ipreach-disconnect
Query STA Interface
cmd wifi query-interface <uid> <package_name> STA
Query AP Interface
cmd wifi query-interface <uid> <package_name> AP
Query AWARE Interface
cmd wifi query-interface <uid> <package_name> AWARE
Query DIRECT Interface
cmd wifi query-interface <uid> <package_name> DIRECT
Query STA Interface (New)
cmd wifi query-interface <uid> <package_name> STA -new
Query AP Interface (New)
cmd wifi query-interface <uid> <package_name> AP -new
Query AWARE Interface (New)
cmd wifi query-interface <uid> <package_name> AWARE -new
Query DIRECT Interface (New)
cmd wifi query-interface <uid> <package_name> DIRECT -new
Enable network selection for all networks (priority 0)
cmd wifi set-network-selection-config enabled enabled -a 0
Enable network selection for all networks (priority 1)
cmd wifi set-network-selection-config enabled enabled -a 1
Enable network selection for all networks (priority 2)
cmd wifi set-network-selection-config enabled enabled -a 2
Disable network selection for all networks (priority 0)
cmd wifi set-network-selection-config enabled disabled -a 0
Disable network selection for all networks (priority 1)
cmd wifi set-network-selection-config enabled disabled -a 1
Disable network selection for all networks (priority 2)
cmd wifi set-network-selection-config enabled disabled -a 2
Disable network selection for all networks except the saved ones (priority 0)
cmd wifi set-network-selection-config disabled enabled -a 0
Disable network selection for all networks except the saved ones (priority 1)
cmd wifi set-network-selection-config disabled enabled -a 1
Disable network selection for all networks except the saved ones (priority 2)
cmd wifi set-network-selection-config disabled enabled -a 2
Disable network selection for all networks (priority 0)
cmd wifi set-network-selection-config disabled disabled -a 0
Disable network selection for all networks (priority 1)
cmd wifi set-network-selection-config disabled disabled -a 1
Disable network selection for all networks (priority 2)
cmd wifi set-network-selection-config disabled disabled -a 2