Loss of access to a wireless network is one of the most common problems faced by mobile device users. When a smartphone forgets the network or you purchase a new gadget, a logical question arises: where are Wi-Fi passwords stored on Android is it possible to remove them without re-entering them? The answer lies in the deep system sections of the operating system, where the average user does not have direct access for security reasons.
By default, Android encrypts and hides network credentials in a protected system file, preventing malware from stealing them. However, there are legal methods to view this data if you have root privileges or USB debugging access. Understanding the architecture of storing this data will allow you to quickly restore the connection on any device in your home.
In this article we will examine in detail the file structure of the system, methods for retrieving security keys through console commands, and the built-in functions of new OS versions. You will learn how to bypass interface restrictions and gain full control over your network settings.
The architecture of network data storage in Android
All saved wireless network settings, including SSID and encryption keys, are written to a special system file. In the classic Linux structure on which Android is based, this file is located at /data/misc/wifi/. The specific file containing the connection history is usually called wpa_supplicant.conf or, in newer versions of the system, may have the extension .xml.
Access to this directory is blocked for all applications and users without privileges root. This is a fundamental Android security mechanism designed to protect the user from traffic interception and identity theft. Without obtaining superuser rights, the file manager simply will not open this folder, giving an access error.
The file structure is a text document, where each network is described by a separate configuration block. Inside the block there are authentication parameters, encryption type (WPA2, WPA3) and the password itself in clear text, unless the file is additionally encrypted with the manufacturer’s proprietary algorithms.
⚠️ Attention: Direct editing of system Wi-Fi configuration files can lead to a complete loss of network settings and the inability to connect to the Internet. Always create a backup copy of the file before making any changes.
In modern versions of Android, starting with 10 and especially 12 and 13, the storage mechanism has become even more complex. The data may be split into multiple files or encrypted using the device's hardware keys (Keystore), making it impossible to simply read the file even if rooted without additional decryption.
If you plan to change networks or restore settings frequently, use Google Cloud Backups, which automatically sync some settings, although Wi-Fi passwords may not always be included in this process depending on manufacturer policies.
Methods for viewing passwords without root access
For users who do not want to root their device, Google has introduced a convenient function for viewing passwords directly into the settings interface. This option became available starting with Android 10, but a full implementation with QR code generation appeared in Android 12 and later.
To use this method, you need to go to the menu Settings → Network and Internet → Wi-Fi. Here you will see a list of saved networks. When you click on the gear icon next to an active or previously connected network, the system will offer the “Share” option or a QR code icon.
After confirming your identity using a fingerprint, PIN code or pattern, a QR code will appear on the screen. Below this code, depending on the version of the manufacturer's shell (for example MIUI, OneUI or clear Pixel UI), a text password may be displayed.
- 🔍 If the password text is hidden, take a screenshot of the QR code.
- 📷 Open the screenshot via Google Lens or any third-party QR code scanner.
- 📝 The scanner will decipher the code and show the connection string, where the password will be specified after the prefix
P:.
This method is the most secure and does not require installing additional software. It works stably on most certified devices released in the last few years.
Using ADB to retrieve configuration
A more advanced method, which does not require permanent root access on the device, but requires a computer, is the use of tools Android Debug Bridge (ADB). This method allows you to execute a command on behalf of the system and display the contents of the configuration file directly on the computer screen.
First, you need to activate developer mode on your smartphone. Go to Settings → About phone and quickly click 7 times on the “Build number” item. After this, the “For Developers” section will appear in the settings menu, where you need to enable USB debugging.
Connect your smartphone to the PC with a cable and open the command line or terminal in the folder with ADB installed. Enter the following command to try to read the file:
adb pull /data/misc/wifi/wpa_supplicant.conf
On devices without root access, this command will return a “permission denied” error. However, on some older firmware or with specific vulnerabilities, the system may allow reading through the shell. An alternative is to use the command adb shell to view the content directly if SELinux policies allow it.
⚠️ Warning: On devices with a locked bootloader and strict security policies (for example, Samsung Knox or Google Pixel with Verified Boot enabled), access via ADB without root will be blocked at the kernel level.
If you have temporary root access through ADB (for example, through Magisk), the command will look different. You can dump the file directly into the console:
adb shell su -c "cat /data/misc/wifi/wpa_supplicant.conf"
The result of the command will display the entire list of networks. Look for the line psk="your_password" inside the block network={...}corresponding to the desired network name (SSID).
What to do if the file has the extension .xml?
In Android 11+ the configuration can be stored in XML format inside the WifiConfigStore.xml file. The data structure is complicated by ConfiguredNetwork tags, where the password is in the PreSharedKey field, often in encrypted form, requiring additional analysis.
Working with the file system with root access
Having superuser rights allows direct access to the system partition /data. To work with files, you will need a file manager with root support, for example Root Explorer, Solid Explorer or MT Manager.
After granting the application root access, go to the path /data/misc/wifi/. Here you will find the configuration file. Depending on the version of Android, this may be wpa_supplicant.conf, WifiConfigStore.xml or a file with a name containing the user's hash.
Copy this file to a readable folder, such as internal storage (/sdcard/). Open the copied file with any text editor. You will see a data structure where each block describes one network.
| Parameter in file | Description | Example value |
|---|---|---|
ssid |
Wireless network name | "Home_Network" |
psk |
Pre-collaboration key (password) | "SuperSecret123" |
key_mgmt |
Key management method | WPA-PSK |
proto |
Protocols used security | RSN |
Please note that in some cases the field psk may contain not the password itself, but its hash (a long string of numbers and letters). This happens if the network was connected by entering an already hashed key, which is rare, but possible when importing settings.
Having root access gives full control over the file system, but removes the warranty from the device and can disrupt the operation of banking applications and services with a high level of protection.
Third-party applications for restoring access
There are many utilities in the Google Play store that promise to show saved passwords. Most of them require root access to work correctly, since they are essentially a convenient shell for reading a system file. Applications like wpa_supplicant.conf.
Applications like WiFi Password Viewer or WiFi Key Recovery automatically scan the system and display a list of networks in an understandable form. They save time by eliminating the need to manually search and parse text files.
- 📱 Make sure the app has a high rating and recent reviews.
- 🔒 Check the requested permissions: the app only needs root and network access.
- ⚠️ Avoid apps that require access to contacts or SMS without a good reason.
There are also applications that work without root, but their functionality is limited. They can only show the passwords of the networks they are currently connected to, using system APIs that have become available in new versions of Android for sharing functions.
⚠️ Attention: Application interfaces and capabilities may change with Android updates. What worked on Android 8 may be completely blocked in Android 14 due to stricter privacy policies. Always check compatibility in the app description.
Using third-party software always carries the risk of data leakage. It is recommended to use proven open source solutions or built-in system tools whenever possible.
☑️ Checking the security of the application
Restoring access through a Google account
The Google ecosystem offers another level of data backup. If syncing is enabled on your device, some network data may be saved to the cloud. However, directly viewing the password in a Google account via the web interface is currently impossible for most users.
However, when setting up a new device under the same account, Android may offer to automatically restore Wi-Fi settings. In this case, passwords will be transferred to the memory of the new device “transparently” for the user.
This mechanism works based on an encrypted backup. You cannot retrieve the password from the cloud manually, but you can transfer it to another trusted device, where you can then use the QR code viewing feature described above.
To check the synchronization status, go to Settings → Google → Backup. Make sure the Backup Data switch is enabled. This ensures that if you lose or replace your phone, you will not lose access to your networks.
When selling or transferring your phone, be sure to perform a Factory Reset to remove all saved Wi-Fi passwords and account data from the device memory.
Compatibility issues and common errors
Users often encounter a situation where a configuration file exists, but the password in it is displayed as a set of characters or is missing. This may be due to the use of enterprise security certificates (EAP-TLS), where a password as such is not used.
Another common problem is incompatible file formats after a firmware update. If you updated Android from version 11 to 13, the old configuration file may have been converted to a new format that older password viewers do not understand.
In such cases, it is recommended to use universal methods, such as logging into the router's control panel. Knowing the IP address of the gateway (usually 192.168.0.1 or 192.168.1.1), you can go to the router settings and view or change the password there if you have access to the admin panel.
Remember that the security of your data depends on the complexity of the passwords. Using simple combinations makes the network vulnerable, even if the configuration file is reliably protected by the system.
Is it possible to view a Wi-Fi password on Android without root access on older versions?
On Android versions below 10 (for example, 6.0, 7.0, 8.0), the built-in function for viewing passwords did not exist. Without root access or connecting to a computer via ADB (which also often requires unlocking the bootloader), it was impossible to find out the password using standard means. The only option is to enter the router settings.
Why is the password encrypted in the wpa_supplicant.conf file?
If instead of text you see a long string of characters in the psk field, this means that the system has saved the password hash, and not the password itself. This could happen when using specific connection methods or third-party utilities. It is almost impossible to decrypt such a hash back into text; you will need to guess the password (brute force).
Is it safe to give root applications access to Wi-Fi files?
Granting root access to any application removes all system protections. Theoretically, a malicious application with root access can steal not only Wi-Fi passwords, but also banking application data, encryption keys and personal correspondence. Trust only trusted open source software.
What if the configuration file is empty?
If the file is empty or 0 bytes, this may indicate a file system failure or that the system is using alternative storage (for example, an encrypted SQLite database). In this case, methods with a text editor will not work, and you will need to use specialized utilities to dump Android databases.
Can a virus steal the Wi-Fi password from my phone?
Yes, if the device has malware that has access rights to system files (which is difficult without root, but possible through vulnerabilities), it can read the configuration file and send it to attackers. Regularly check your phone with an antivirus and do not install applications from dubious sources.