Sadly you forgot to backup the WiFi settings (and google failed to re-sync them) but performed a Nandroid backup?
story backgroung: after a buggy CM12 update and a failed rollback, my wifi settings were gone and google had synced the "blank" wpa_supplicant.conf file, i had no choice but trying to find a way to recover all the passphrases.
- Take your backup,
- Seek for data.f2fs.win
- Copy it to a dedicated folder and
- Rename it to data.tar.gz
- Open terminal and type: cd /storage/usbdisk/TWRP/backup/
- Make sure the file is there: ls
- Untar: tar -xvzf data.tar.gz
- After the unarchiving is completed you can search for ./misc/wifi/wpa_supplicant.conf
- Rename the existant one (/data/misc/wifi/wpa_supplicant.conf to wpa_supplicant.conf.bak)
- Paste the new one there and
- Give proper permissions/owner/group (-rw-rw----, owner 1000-system, group 1010-wifi).
If you want to discuss about this subject, meet us at xdadevelopers.com