Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Android phone which is connected to a secured Wi-Fi hotspot. How can I find out the password of the hotspot from the phone?

share|improve this question
up vote 12 down vote accepted

On my phone, the credentials are stored in /data/wifi/bcm_supp.conf. You'll probably need root to see it directly on your phone but you may be able to use adb pull (requires the Android SDK) from your PC to get the file.

As noted in the comments, the location may vary based on your ROM or device (specifically the Wi-Fi chip; mine's a Broadcom). Check /data/wifi/, /data/etc/wifi/ and /data/misc/wifi/ for relevant config files if you don't find the ones suggested by eldarerathis or me.

share|improve this answer
Hm, interesting. What type of phone are you using ATM? I don't have that file, but I was just about to post an answer saying to look for /data/misc/wifi/wpa_supplicant.conf. Maybe WPA Supplicant is just a CyanogenMod thing... – eldarerathis Apr 2 '12 at 18:41

On CyanogenMod devices, and possibly other AOSP ROMs, you should be able to grab it from the /data/misc/wifi/wpa_supplicant.conf file. On a non-rooted device I don't think this is possible since you won't have permission to read the /data directories where the settings are stored and the Settings menu simply displays (Unchanged) if you go into the network configuration.

This is what I see on my CM7 EVO (network name and password redacted):

# cd /data/misc/wifi/
# ls
sockets              wpa_supplicant.conf
# more wpa_supplicant.conf

share|improve this answer
My phone is rooted. I have 'superuser' app installed. But how can I get 'adb shell' with root accessed. I tried '$ adb shell shell@android:/ $ su Permission denied 1|shell@android:/ $ cd /data shell@android:/data $ ls opendir failed, Permission denied 255|shell@android:/data $ su Permission denied 1|shell@android:/data $ – michael Apr 2 '12 at 20:34
Ah, this is actually a new setting in CyanogenMod. You'll need to use su to get a root shell, but first check in Settings->Developer Options (your phone's main settings) to see what the "Root Access" setting is. By default it is "Apps only". You'll need to switch it to "Apps and ADB" in order for su to work from the shell. – eldarerathis Apr 2 '12 at 21:08
@michael I always do adb root followed by adb shell. – ott-- Dec 1 '12 at 17:41

protected by Community Oct 19 '13 at 16:21

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.