Rahul Vig
Rahul Vig

Reputation: 736

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?

Upvotes: 12

Views: 13750

Answers (1)

Simas
Simas

Reputation: 44118

What about using dumping netstats info:

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

Upvotes: 24

Related Questions