How to get saved WiFi password from my android 5.1.1 without rooting?
I checked the path
adb pull from terminal, but it's empty
You can't get the passwords without root access because shell (adb) is not privileged to access the file containing those passwords. As you would know, the file
wpa_supplicant.conf contains all the saved Wi-Fi passwords. In order to even ascertain the existence of that file, you must have read or executable permission until
wifi directory. It just happened that the permissions on that directory is
drwxrwx---, is owned by user
wifi and group
id tells us that shell is not part of
wifi group, so it ultimately would be considered
others. As you can see, the permissions for others are blank
--- i.e. no read/write/execute permission is available, hence, you can't enter that directory, let alone copy a particular file residing inside it.
Root the device if you want that file badly.
Related reading: File permissions and attributes
Reading memorized wifi passwords by device is only possible if you have a rooted device. There are two methods to do it.
1)You can do it manually by pulling file wpa_supplicant.conf Or
2)By simply using applications like wifi password by farproc on play store. Install app, grant root permission and it will automatically show you all saved wifi passwords.
I have to say I am surprised that the answer to this is hidden so well on the internet.
It is a myth that retrieving the WiFi passwords from an unrooted device is impossible.
These prerequisites may differ depending on operating system. android version and manufacturer. Answers on how to prepare these on your specific platform can be easily obtained with a search on your favourite search engine. Keep in mind that a USB cable that is good for charging your phone not necessarily provides a data connection. Use the cable that came with your phone if in doubt.
Backup your WiFi passwords with adb (from command line).
adb backup com.android.providers.settings
Enter a password for the file on your phone. The resulting file will be named "backup.ab" and appear in the directory where you executed adb.
Download and install Android Backup Extractor.
Convert the backup file into a TAR archive using the password that you entered earlier:
java -jar abe.jar unpack backup.ab backup.tar *password*
The archive will contain a file called "flattened-data". This file contains all networks that are saved on your phone. The psk entries are the passwords.
It may be easier to move the backup file into the same directory as abe.jar before converting it.
Tested on Android 7 and Ubuntu, adb version 1.0.36, android-backup-extractor v20180521. If adb doesn't work, make sure you device is found using
adb devices. On the same device, I tried to access the passwords directly using
adb pull which didn't work (as was expected).
@Firelord is right but there's a file browser for Android that doesn't require root for some IO operations, and looking from the path for the saved passwords it should have full rights. It's called XPlorer, hope this helps