The situation when you need to connect a new device to a wireless network, but the password is lost, is familiar to many users. Itโ€™s good if you have a smartphone on hand that is already connected to this router. However, what if you want to find out the access key on the phone that not currently connected has a network, but stores it in memory? This is a common scenario: you return home, forget your password, and the phone is trying to connect to a neighbor's network or using mobile data.

Fortunately, the operating system Android stores data about all previously used networks in the system storage. Starting with version 10, and especially in Android 12 and later, access to this data has become much easier thanks to the introduction of security standards WPA3 and user-friendly interfaces. You don't have to be a hacker or have root privileges to extract this information. However, methods may vary depending on the firmware version and the availability of root access.

In this article we will examine in detail all the legal ways to extract saved encryption keys. We will look at the standard system tools, the use of hidden menus and advanced methods for experienced users. It is important to understand that these tools are designed to restore access to your personal networks, and not to hack into others.

Standard Android settings: the easiest way

Starting with Android 10, Google has introduced a QR code generation feature to quickly connect guests. This mechanism also allows the device owner to see the password in plain text. Even if the phone is not connected to the network right now, but the profile of this network is saved in the settings Wi-Fi, you can access the data.

To do this, you need to go to the section Settings โ†’ Connections โ†’ Wi-Fi. In the list of available networks, find the one you connected to previously. If it's in your Saved Networks list (a feature introduced in Android 12+), just tap the gear icon next to it. The menu that opens often contains a "Share" button or a QR code icon.

โš ๏ธ Attention: On some smartphone models (for example, older versions of MIUI or OneUI shells), viewing the password is only possible if the phone is within range of the network, even if there is no connection active.

Click on the QR code generation button. The system will ask you to confirm your identity: enter a PIN code, pattern key or fingerprint. This is a security measure to ensure that only the device owner has access to sensitive data. After successful authentication, a square code will appear on the screen.

Under this code, depending on the Android version and phone model, the password can be written in clear text right away. If there is no text, take a screenshot of this QR code. Then open any QR code scanner or use the Google Lens feature in the gallery. When you point the camera or open a screenshot, the system will decipher the code and show a line like: WIFI:T:WPA;S:MyNetwork;P:SuperSecret123;;. The password you are looking for is located after the symbol P:.

๐Ÿ’ก

If the password is not displayed in text under the QR code, use the built-in Google Lens scanner directly from the camera or gallery widget - this is the fastest way to decode the data without installing third-party applications.

Using the developer menu and USB debugging

If the standard interface does not allow you to view the password for a saved but not active network, you can use deeper system settings. This method requires Developer Mode to be enabled. It works on most devices without the need to obtain root access, but requires a computer at hand.

Activate developer mode first. Go to Settings โ†’ About phone and quickly click 7 times on the "Build number" item. After the message โ€œYou have become a developerโ€ appears, return to the main settings menu and find the new section For developers. Inside, enable the option USB debugging.

Connect the phone to the computer via a USB cable. The platform tools package Android SDK Platform-Toolsmust be installed on the PC. Open a command prompt or terminal in your tools folder. Enter the command to check the connection:

adb devices

A request for debugging permission will appear on the smartphone screen. Confirm it. Now we can access the WiFi system storage. Enter the following command to list all saved networks and their configurations:

adb shell dumpsys wifi | findstr "SSID\|PreSharedKey"

In the command output you will see a list of networks. Look for the block that matches the one you need SSID (network name). A field may be displayed next to it PreSharedKey, which is your password. Please note that on modern versions of Android with enhanced security, this method may show asterisks instead of password characters if the device is not rooted.

What should you do if ADB shows asterisks instead of the password?

If you see PreSharedKey: **** in the command output, this means that the system is encrypting keys at the storages. In this case, without Root access you will not be able to read the password via ADB, and you will have to use the backup or QR code method.

File system and access to wpa_supplicant.conf

The most reliable, but also the most difficult method is direct access to the system file where all wireless connection settings are stored. The file is called wpa_supplicant.conf. It contains a list of all the networks to which the phone has ever connected, along with the encryption type and cleartext passwords.

The problem is that this file is located in a protected directory /data/misc/wifi/. Only the superuser has access to this folder. Therefore, to implement this method, your smartphone must have root access (for example, through Magisk). Without them, the system blocks reading this file by any file manager.

If rights are obtained, install an advanced file manager, for example Root Explorer or Solid Explorer. Give the application superuser rights the first time you launch it. Follow the path:

/data/misc/wifi/wpa_supplicant.conf

Open this file as text. You will see a data structure where each network is described by a block. Find the one you need ssid. Immediately below it there will be a line psk="your_password". This is the information you are looking for. This method works even for networks that were removed from the list of visible ones, but whose configuration remained in the file.

Config parameter Description Example value
ssid Wireless network name "Home_WiFi"
psk Pre-shared key (password) "12345678"
key_mgmt Key management type WPA-PSK
proto Security protocol RSN

โš ๏ธ Attention: Any editing of the file wpa_supplicant.conf manually can lead to the loss of all saved networks. Edit it only in Read-Only mode or make a full copy before making changes.

๐Ÿ“Š Do you have root access on your smartphone?
Yes, I use it all the time
I had before, but I reset it
Never received
I plan to receive

Recovery via backup

There is a method that allows you to extract a password without constantly having root access on the device, but requiring them to be present at the time the backup is created. The essence of the method is to create a backup of system data via ADB Backup, extracting the configuration file on the computer and analyzing it.

Connect the phone to a PC with USB debugging enabled. Enter the command to create a backup copy of only the WiFi settings:

adb backup -f wifi.ab -noapk com.android.providers.settings

On the phone screen you will need to confirm the creation of the backup copy. Once completed, you will have a file wifi.ab. This file is in a proprietary Android format. To read its contents, you need to unpack it using a special script or utility that converts .ab to .tar.

After conversion, inside the archive you will find the same file wpa_supplicant.conf. Open it with any text editor on your computer (Notepad, Notepad++). You will be able to find all saved networks and passwords. This method is convenient because it does not require installing third-party file managers with Root access directly on the phone; all manipulations take place on the PC.

๐Ÿ’ก

The backup method is a compromise option: it requires temporary root access or specific ADB settings, but allows you to safely extract data to your computer for analysis.

Third-party viewing applications passwords

In the store Google Play there are dozens of applications that promise to show WiFi passwords. However, it is important to understand how they work. Applications without root access can only generate QR codes from those networks that the system allows to display through the standard API (as described in the first section).

Applications marked "Root" can actually read the configuration file. They automate the process described in the file system section. Popular utilities like WiFi Password Viewer scan a directory /data/misc/wifi/ and display a list in a convenient form with a copy button.

  • ๐Ÿ“ฑ WiFi Map - more suitable for searching public networks, but has functions for analyzing current connections.
  • ๐Ÿ”“ WiFi Password Viewer (Root) - a simple utility that displays the contents of a system file in the form of a list.
  • ๐Ÿ›ก๏ธ ES Explorer (older versions) - had a built-in network analyzer, but in new versions the functionality is reduced due to Google policies.

Be careful when installing such apps. Many of them contain aggressive advertising or collect telemetry. Download applications only from trusted, highly rated developers. Remember that for most of them to work Root access is a prerequisite.

โš ๏ธ Attention: Installing applications from unverified sources (APK files from forums) to obtain passwords can lead to infection of the device with malware that will steal not only WiFi passwords, but also data from banking applications.

โ˜‘๏ธ Security when using third-party software

Done: 0 / 4

Frequently asked questions and problems (FAQ)

Can I find out the WiFi password if I have never connected to this network?

No, it is impossible. The phone stores only those encryption keys that were successfully entered and used to connect. To guess a password for someone else's network, completely different tools and methods are required that go beyond the standard functions of Android.

Why, after updating Android, do I no longer see the password under the QR code?

In new versions of Android (13 and higher), Google has tightened its security policy. Now the password is often hidden even when generating a QR code. In this case, the only way is to scan the code with another device through Google Lens, which can recognize the text string inside the code.

Will Rooting reset network settings?

Unlocking the bootloader, which is necessary to obtain root access, in 99% of cases leads to a complete reset of the device to factory settings (Wipe Data). This means that all saved WiFi passwords will be deleted during the unlocking process. Make backup copies in advance.

How to find the password on a Samsung or Xiaomi phone if there is no "Share" button?

The logic may differ on the MIUI and OneUI shells. Try clicking on the name of the network in the list of saved ones, rather than on the gear icon. Sometimes the password viewing function is hidden in an additional menu called up by long pressing on the network.

Is it safe to transfer the password via a QR code?

Yes, it is safe if you show the code to a trusted person. The QR code contains the same information as the text password. However, do not post screenshots of the QR code of your home network in the public domain, as anyone can decrypt it and connect to your Internet.

To summarize, we can say that recovering a password from a saved network on Android is a solvable task. For ordinary users, the QR code functionality in the settings is sufficient. Advanced users should pay attention to the capabilities of ADB and the file system, but always remember the risks associated with modifying system files.