Tuesday, 12 April 2011

Android Wifi password locations

The other day, I realised that I had forgotten my WiFi network password back at home.

The easy way to fix this would have been to use an already connected PC to access the router and change the password there, or to use an application like WirelessKeyView to recover the password of the said PC.

If I used method 1, I'd have to give the key to my housemates, which adds a bit of hassle.

When I tried method 2, the PC I was using was running XP I got a hex string which is not very user friendly (XP automatically converts WPA-PSK keys to a 64bit non-(easily?) reversible hash).

I then decided to try to get the key off my (rooted) Desire Z. Easy enough, the passwords are stored in plaintext in the following file:

I then wrote a quick application to make the extraction a bit more painless (links at the bottom of the post), but when I was testing it on my Galaxy Tab, I realised that the file was not there. After a bit of digging around, I found the passwords here:

Also, here is the location of the file on the Streakroid ROM (this could be the default for all Dell Streaks, but as I don't have one I can't check):

The formatting of the files is identical and can be found here: http://linux.die.net/man/5/wpa_supplicant.conf, but the location is different (based on the whims of each developer/company I guess).

To access the files, you need root permissions.

Application Links:

If anyone has a device on which the app does not work, do two things:
  1. Make sure you are rooted.
  2. If you are certain you are rooted and it still does not work, email me (my email can be found here: http://aschillings.co.uk/html/contact.html).
I have no way to contact you if you post anonymously in the comments section!


  1. I saw an application that does basically that the other day. It's a little easier to get the passwords that way. You might check it out: https://market.android.com/details?id=com.nevercertain.wifipasswords.pro

    Thanks for the post.

  2. I already wrote one myself:


    And its freeware :)

  3. hey Alex. do you have any download link for desktop and install to my tab directly? i found one in 4shared.com, im not sure if thats what you wrote since i cant open it...password protected.. thanks

  4. Hi,
    unfortunately on my motorola defy the password must be stored somewhere else, any ideas?

  5. Alexandros, good morning.

    What I don't understand is your fear of giving your password to your "mates".
    If you didn't give it to them the first time.....how did they ever log on? And if you gave it to them once, why not again?

  6. Goodmorning!

    You misunderstood.

    There is no fear in giving out the password. My mates had the password because I gave it to them, and I would again if I had to change it.

    The problem is that if I changed the password, I would have to let them know of the change and possibly disrupt their work until they change the password and reconnect.
    As part of said work is unattended and professional (remote desktoping, running simulations, etc.) it is more inconvenient that say, a lost WoW raid.

    Plus, it was more fun to poke around android :)

  7. If anyone has a device on which the app does not work, do two things:

    1. Make sure you are rooted
    2. If you are certain you are rooted, email me (my email can be found here: http://aschillings.co.uk/html/contact.html).

    If you post anonymously, there is not much I can do :)

  8. Hello Alexandros first of, thanks for the wonderful app, it is really helpful when i forgot the passwords and need to share it with others.

    It'll be nice to see an import feature built in into the app to complement the export feature

    thanks again

  9. Hi Alt236,
    Is there a way that we get wifi password without rooting the device ? If yes please specify how ?

  10. very nice decent app does what it says it does congrats my friend really good Job!!!

  11. Is there a way that we get wifi password without rooting the device ? If yes please specify how ? thx

  12. No, there is no way to get the keys without rooting because of where the file sits on disk. The location is in a portion of the filesystem where only the root user (read: administrator) has and write permission. If you could just write an app that did that without needing root permission what good would it be in the first place since it would be a big, gaping security hole.

  13. Je resulta ke mi clave aparece encriptada! Alguna idea??

  14. I have read your blog and know the process of how to get Android wi-fi password location ? it is really interesting way to explain it and i understand it easily. Thanks . .

  15. pls give here tutorial video or pictures

  16. Thanks for this information.... its very useful for android users.

  17. Thanks for this useful application.

  18. Great App, thanks for your work.
    Is there any option to restore the backup txt-file?
    I had a crash and reinstalled my phone. Lucky for me, that I saved days before all my WIFI keys as a txt-file.
    In your app is no restore function, so isn't it possible to get all keys back in this app?

  19. I like your post it is very interesting i would like to visit your website frequently.....

  20. Hi the App worked great. But now with Android 4.3 it is not available in Playstore. Maybe only an setting in the Supported OS?

  21. it doesn't give me the password it gives me something else like numbers & letters too long (MD5)

  22. plz hlep me to fix it using wintouch Q93

  23. Hi the app worked great up until yesterday when i switch phones. On the Samsung I9505 i gives the password in the hash form you described on your introduction.
    I have looked almost everywhere. Is there a way to fix this? P.S. On other devices it works great (Nexus 5, Xperia Ray etc)

  24. A small update. As it seems the issue is not related with the app per se. It has to do with the way some smartphones save the information in the wpa_supplicant.conf in /data/misc/wifi. The passwords are stored encrypted and it seems to be affecting samsung devices that have the 4.3+ android OS. I dont think there is a way to fix this unless maybe changing the way the information are stored :(

  25. This comment has been removed by the author.

  26. A VERY GOOD APP (WifiKeyRecovery) to backup the 40Items in my list- export goes good, BUUUUUT I have install a new ROM how I can IMPORT the list back?? :-)

  27. Hy i have problem it s not giving to me the real password .. maybe you can help me ok

  28. doesn't showing correct password .. glaxy s5 rooted phone here

  29. I have a Backup. I change the phone. how can i restore the backup in my new phone?

  30. In the wpa_supplicant file the psk shows a long line of numbers and letters, not the passphrase I used to connect to the wifi. I even changed the build.prop security line to false but still no change. How can I see the same password I used connecting to my network?
    email is iibebex@yahoo.com

  31. Hi, i found the file but the Password is, I think, encrypted. Eg. psk=sg5652csdfw6e84313dfs4d6fe1c54sdf497966.
    how can I view the password?

  32. hi alex
    I downloaded the source code from GitHub
    But in Eclipse run-time, library error was
    Please also email me "NewQuickAction3D" Library
    thank you

    My email: mahdiseydi00@gmail.com

  33. Hi,
    Nice blog Post very informative for newbies.

  34. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
    iOS App Development Company

  35. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

  36. This is a great post. So clear and easy to follow. Thanks for the tangible and attainable help. All your hard work is much appreciated. Mobile App Development Company

  37. Mobisoft Infotech delivers the Android technology expertise necessary for your Android app development project. We also help businesses to improve their operational efficiencies, cost structure and remain technologically competitive.

  38. Thanks for sharing the great blog post with us! We provide custom Uber for trucking app development solution and truck dispatch software for logistics and freight businesses to bring simplicity and efficiency to their dispatch operations.
    Hire Angularjs Developers | Truck Dispatch Software | Taxi App Development

  39. This is a great post. So clear and easy to follow. Thanks for the tangible and attainable help. All your hard work is much appreciated.