Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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

3 Answers 3

up vote 10 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
3  
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

Common locations where the wifi credentials are stored in plain text are:

  • /data/misc/wifi/wpa_supplicant.conf
  • /data/wifi/bcm_supp.conf
  • /data/wifi/
  • /data/etc/wifi/
  • /data/misc/wifi/
share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

2  
What are these? Can you explain what OP is supposed to do with these folders or files? –  geffchang Jun 25 '13 at 5:35

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
ctrl_interface=eth0
update_config=1

network={
        ssid="SomeWifiNetwork"
        psk="MyPlaintextPassword"
        key_mgmt=WPA-PSK
        priority=1
}
#
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
1  
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 answers, posting an answer now requires 10 reputation on this site.

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.