Changing your smartphone is always stressful, as it involves transferring a huge amount of data, from contacts to photos. However, one of the most common everyday problems is the inability to remember your home password. Wi-Fi, which was once saved on your old device. If you simply discard your old device or reset it to factory settings without prior preparation, you will lose access to your security keys.
Fortunately, modern mobile operating systems provide tools to extract this information, although they are often hidden from the average user's view. Android And iOS Approaches to this issue vary, and the solutions depend on the software version and device model. In this article, we'll cover all available methods, from standard features to advanced techniques.
Don't panic if you've already sold your phone or it's broken—in some cases, data can be restored from cloud backups. However, the most reliable method is to back up the data beforehand or use QR codes while you still have both devices. Let's look at the technical details of the process.
Using a QR code on Android 10 and later
Starting with the tenth version of the operating system, Android A native QR code generation function for connecting to the network has been introduced. This is the simplest and most secure method, and does not require root rights or installing third-party software. You don't need to know the password itself in plain text; simply scan the code with your new phone's camera.
To do this, open the Wi-Fi settings on your old device. Tap the gear icon next to your network name or select "Share." A picture will appear on the screen, which you'll need to capture with your new smartphone's camera. The system will automatically scan the data and prompt you to connect.
If you're critically interested in seeing the actual text password, rather than just connecting, there's a little trick. After generating the code, some shells (for example, MIUI or OneUI) allow you to see the password under the QR code. In stock Android, you can take a screenshot of the code and open it through Google Lens (Google Lens), which will recognize the text and show the password.
⚠️ Warning: The QR code contains your password in plain text. Do not take screenshots of this code or send them via messenger, as anyone with access to the image will be able to connect to your network.
It's worth noting that functionality may vary depending on the manufacturer. Below is a table listing implementation features in popular shells:
tr>
| Shell / Brand | Location of the function | Shows the password in plain text |
|---|---|---|
| Stock Android (Pixel, Motorola) | Settings → Network → Wi-Fi → Gear | No (QR only) |
| OneUI (Samsung) | Settings → Connections → Wi-Fi | Yes, at the bottom of the screen |
| MIUI (Xiaomi, POCO) | Settings → Wi-Fi → Tap over network | Yes, under code |
| ColorOS (Oppo, Realme) | Settings → Wi-Fi → Tap over network | Yes, the "View" button |
Methods for older Android versions (before 9 Pie)
Owners of devices that haven't received the update to Android 10 will have a more difficult time, as there is no system mechanism for viewing saved passwords in the interface. However, if your device has root rights, the task can be solved in a couple of minutes using a file manager with access to system partitions.
You will need an app like Root Explorer or Solid Explorer. It is necessary to follow the path /data/misc/wifi/There you will find the file. wpa_supplicant.confThis text file contains a list of all the networks the phone has ever connected to, along with the passwords in the psk.
If you don't have root access, the only legal option is to sync with your Google account, if it was enabled previously. When you sign in to the same account on a new phone, your passwords may automatically be pulled into the system, even if you can't see them on your old device.
What to do if you don't have root rights and your Android is old?
In this case, you can try using apps like Titanium Backup to back up your settings, but they often still require superuser privileges to function properly. Alternatively, you can view the router password if you have access to it.
Extracting passwords via ADB without root
For advanced users who don't want to root but have access to the computer, there is a method using USB debugging (ADB). This method works on many devices, but requires enabling developer mode.
First, you need to activate the developer options by tapping the build number seven times in the "About phone" section. Then, enable "USB debugging." Connect your phone to your PC and run the following command in the terminal:
adb shell pm dump com.android.providers.settings | grep "wifi"
However, a more effective method is to use specialized scripts or utilities that extract the file WifiConfigStore.xml from hidden memory partitions without full root access (temporary privilege escalation via ADB is required). This file contains all the necessary security keys.
- 🔌 Connect your phone to a computer with ADB installed.
- 💻 Open the command prompt and type
adb devicesto check the connection. - 📂 Use the command to export the Wi-Fi configuration.
- 🔍 Find the field in the output text
PreSharedKey.
Features of copying to iPhone (iOS)
In the ecosystem Apple Security comes first, so direct access to Wi-Fi password files is prohibited. You can't simply copy the configuration file, as you can on Android. However, the data transfer mechanism between Apple devices is brilliantly implemented.
If you have an old iPhone and a new one, and both devices are signed in with the same Apple ID, passwords will sync via iCloud KeychainYou don't need to copy anything manually. Simply turn on Wi-Fi and Bluetooth on both devices and bring them close together. The new device's screen will prompt you to use the password from the old one.
In iOS 16 and later, you can now view your passwords in Settings. Go to Settings → Wi-Fi, click on the icon (i) next to the network and tap the hidden "Password" field. The system will ask for Face ID or Touch ID, after which you can copy the password.
⚠️ Important: For automatic password transfer over the air, your iPhone must be unlocked (on the Home screen) but not on the Lock screen. Make sure Bluetooth is enabled.
If automatic transfer doesn't work, check that Keychain sync is enabled. Without it, the "Share Password" feature may not appear.
☑️ Checklist for transferring a password to an iPhone
Using Wi-Fi manager apps
There is a category of applications such as WiFi Password Viewer or WiFi Map, which promise to show saved networks. It's important to understand: on modern versions of Android (without root), these apps can't show real passwords for system security reasons.
They can only show the networks you're connected to or (on older operating systems) read a system file. On newer devices, they often function as QR code generators for the networks the phone is already connected to, which is also a useful feature.
Using such utilities requires caution. Many free apps are cluttered with ads or collect telemetry. It's better to use proven tools or built-in system functions.
- 📱 WiFi QR Code Scanner — generate codes for guests.
- 🔑 Keychain Access (macOS) — View iPhone passwords on Mac.
- 🛡️ Google Password Manager — check your saved passwords in the cloud.
Restore via cloud backups
If you've already discarded your old phone, but you made a full backup beforehand, you can retrieve the password from there. On Android, this is done via your Google account; on iOS, via iCloud.
When setting up your new phone for the first time, select "Restore from a backup." During the system settings restoration process, Android or iOS will prompt you to save your Wi-Fi passwords. Once complete, your network settings will be available automatically.
There is also a service for Android users passwords.google.comIf you had password syncing enabled, you might find saved Wi-Fi network keys there, as the system often saves them in the Google Password Manager.
Frequently Asked Questions (FAQ)
Is it possible to copy a Wi-Fi password if the phone is not connected to the network right now?
Yes, if your phone has previously connected to this network and saved the connection profile, the password remains in the device's memory. You can generate a QR code or view it in settings (on Android 10+ and iOS 16+), even when outside the router's range.
Is it safe to use third-party password viewer apps?
Most of these apps require root access, which reduces the overall security of the device. Furthermore, unknown developers can use the app to steal data. It's better to use built-in system tools or official password managers.
What to do if the QR code is not readable by the new phone?
Make sure your old phone's screen isn't cracked in the code area and that the brightness is set to maximum. Also, try using a third-party QR code scanning app on your new device, as the built-in camera may not recognize specific encoding formats.
Where are Wi-Fi passwords stored in the Android file system?
Passwords are stored in a file wpa_supplicant.conf or WifiConfigStore.xml in the directory /data/misc/wifi/Access to this folder is denied without root privileges or special ADB permissions.