Search code examples
androidadb

How to get the name (SSID) of the connected WiFi network using ADB?


I am trying to get the connected Wifi network name through the ADB commands. The only method I could figure out was search the dumpsys for the WiFi network info and get the SSID. But this is cumbersome. Is there a more direct way?


Solution

  • What about using dumping netstats info:

    adb shell dumpsys netstats | grep -E 'iface=wlan.*networkId'