If your Android device is rooted, you can read the saved WiFi passwords directly from the system configuration file. This guide shows you how to locate and decrypt the stored credentials using a file manager or a terminal emulator, and what to do if the file format has changed on newer Android versions.
What You’ll Need
- A rooted Android device (root access confirmed with an app like Magisk or SuperSU).
- A file manager that can access root directories (e.g., Solid Explorer, Root Explorer, or the built-in file manager with root permission). Alternatively, a terminal emulator app.
- For Android 10 and newer: a way to view the
WifiConfigStore.xmlfile (same root file manager) and possibly a hex editor or a text editor that handles binary files. - Basic familiarity with navigating folder paths.
Step-by-Step
- Grant root access to your file manager. Open the file manager app, go to its settings, and enable the “Root explorer” or “Root access” option. When prompted by the superuser app, grant permission.
- Navigate to the WiFi configuration directory. The path is
/data/misc/wifi/. In most file managers, you can tap the three-dot menu and choose “Go to path” or “Navigate to” and type this address. - Locate the configuration file. On Android 9 and earlier, look for a file named
wpa_supplicant.conf. On Android 10 and later, the file isWifiConfigStore.xml(often inside a subfolder likeWifiConfigStore.xmldirectly in the wifi folder). - Open the file as text. Long-press the file and choose “Open with” then select a text editor. If the file is binary (Android 10+), you may need a hex editor or a text editor that can handle binary content (e.g., “Hex Editor” from the Play Store).
- Find the password entry. In
wpa_supplicant.conf, look for lines likessid="MyNetwork"followed bypsk="password123"orpsk=hash. If the psk is a hash (64 hex characters), you cannot recover the original password—only the hash. InWifiConfigStore.xml, search forConfigKey(the SSID) and then look forPreSharedKeywhich contains the password in plain text (often quoted). - Copy the password. Select the text between the quotes after
psk=or inside thePreSharedKeyelement. That is your WiFi password. - Alternative: use a terminal command. If you prefer the command line, open a terminal emulator, type
suto get root, thencat /data/misc/wifi/wpa_supplicant.conf(orcat /data/misc/wifi/WifiConfigStore.xml). Scroll through the output to find the password.
Common Mistakes
- Wrong file path: On some devices, the wifi folder may be at
/data/misc/wifi/but on others it could be/data/misc/wifi/is standard, but always double-check. Some custom ROMs may place it elsewhere. - Not granting root to the file manager: If you don’t see the
datafolder or get a permission denied error, you haven’t enabled root access in the file manager’s settings. - Confusing the hash with the password: On some devices, the
pskfield may contain a 64-character hex hash instead of the plaintext password. This is not the password; it’s a one-way hash. You cannot recover the original from it. - Editing the file: Do not modify the file unless you know exactly what you’re doing. A typo can break your WiFi connectivity.
- Looking for the wrong file on Android 10+: If you search for
wpa_supplicant.confon Android 10 and newer, you won’t find it. UseWifiConfigStore.xml.
Tips
- Use a dedicated app: Apps like “WiFi Key Recovery” (requires root) automate this process and display passwords in a clean list. They read the same files but save you the manual digging.
- Back up the file first: Before making any changes, copy the configuration file to your internal storage or SD card. This way, if you accidentally edit it, you can restore it.
- Check the file permissions: The file is usually readable only by root. If you can’t open it, ensure your file manager is truly running as root (check the superuser app logs).
- For Android 10+ with hex editor: If the XML is encoded in a binary format, use a hex editor and search for the SSID string. The password will appear as plain text nearby, but it may be split by null bytes.
- Use a terminal with grep: To quickly find the password in a large file, use
grep -r "psk=" /data/misc/wifi/orgrep -r "PreSharedKey" /data/misc/wifi/.
Troubleshooting
I can’t see the /data folder. Make sure your file manager has root access enabled. In some apps, you need to tap the “Root” icon at the top. If it still fails, try a different file manager like MixPlorer or Solid Explorer.
The file is empty or doesn’t exist. If you’re on Android 10+, the file might be in a subdirectory like /data/misc/wifi/ but with a different name (e.g., WifiConfigStore.xml). If it’s truly missing, it could be that the WiFi service uses a different location on your custom ROM. Use a root search app to find any file containing “wifi” in the /data/misc folder.
I see a hash instead of the password. This is common on Android 9 and earlier when the network uses WPA2-Enterprise or when the device is configured to store only the hash. Unfortunately, you cannot recover the original password. Try connecting to the network and then viewing the saved password using the native Android settings—sometimes it shows the actual password.
The password is there but doesn’t work. Make sure you copied the entire string including any special characters. Also, check if the SSID is correct—there might be multiple entries for the same network (2.4GHz vs 5GHz).
Root access not working. If the superuser app shows no permission prompt, your root might not be properly installed. Reboot the device and try again. If you’re using Magisk, ensure the app is installed and the manager has been granted root.
I get a “Permission denied” error in terminal. Type su first and confirm on the phone. If you see a # symbol, you have root. If not, your su binary might be broken.
Frequently Asked Questions
Is it legal to view saved WiFi passwords on my own device?
Yes, if the device is yours and you’re viewing your own saved networks. However, using this to access someone else’s network without permission is illegal.
Will this work on Android 11 and 12?
Yes, the file location remains the same, but the format may be binary. You’ll need a hex editor to read it. The process is still possible with root.
Can I view passwords without root?
No, the files are protected by the system and require root access. Without root, you can only see saved passwords on some devices via the WiFi settings if the network is currently connected (and the device allows it).
What if the password is stored as a hash?
You cannot reverse a hash to get the original password. You would need to use a brute-force attack, which is impractical for strong passwords. The only workaround is to reset the network and enter the password manually.
Why does my file show a different SSID format?
Some devices add quotes around the SSID, or the SSID may be stored in hex. If you see a hex string, convert it to ASCII to see the actual network name. The password is usually still in plain text.
Is there a way to view passwords using ADB?
Yes, if you have USB debugging enabled and ADB installed on your computer, you can run adb shell, then su, and then cat /data/misc/wifi/wpa_supplicant.conf. This is a more technical approach but works the same.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- Fix Outlook Inbox Corruption with DISM in Windows
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac