This method needs a rooted Android device with the free app ES File Explorer installed on it. Follow these simple steps to recover your WiFi password:
Open ES File Explorer. Now in the menu, go to Local, then tap on Select Device. Here ES File Explorer will ask for the Super User permission, click and allow it.
Now open the folder named data and look for folder misc.
Now open the folder “wifi” where you will spot a file named wpa_supplicant.conf.
Open it as text and look for your WiFi name (SSID). Below the SSID, you’ll find your lost WiFi password (psk).