Is there a way to get the configured WiFi-SSIDS from an Android (not rooted) device via ADB? This should be working independant from the WiFi on/off state.
Thank yo
generally all the configured WIFIs with their passwords are stored in wpa_supplicant.conf which saved in
/data/misc/wifi/wpa_supplicant.conf
but you cant access it unless you have root permission.
you can pull the file by this command
if using windows
adb pull /data/misc/wifi/wpa_supplicant.conf c:\
if using ubuntu
adb pull /data/misc/wifi/wpa_supplicant.conf ~/
Finally found out that
adb shell dumpsys wifi | grep -i ssid
gives the configured wifis
Edit: Only if wifi is enabled
Not possible. WifiManager.getConfiguredNetworks() only works when WiFi is on.
adb pull does work on unrooted devices. u need to run the command as root first. try the following:
in the same command prompt box,
-type [adb root] to restart adb as root. click enter.
-Now type [adb shell], click enter. makes sure the prompt shows [root@[device]: ]
-At the # prompt type [cd /data/misc/wifi] click enter.
-Lastly type [cat wpa_supplicant.conf] click enter.
this should dump data of WiFi you've previously connected to on your phone, to your pc screen.
*type in without brackets []
these command works on my unrooted device after running into the “remote object does not exist” issue.