Tuesday, March 24, 2015

Tip of the day: restoring WiFi settings after a factory reset

For some reason you may want to perform a clean install but don't want to waste all your spare time setting your complicated WiFi setup ?
Sadly you forgot to backup the WiFi settings (and google failed to re-sync them) but performed a Nandroid backup? 

 all the following steps can be performed directly on device, tested on Falcon running CM12 

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.

If you used TWRP, then things will be quite easy: 

  • Take your backup, 
  • Seek for data.f2fs.win 
  • Copy it to a dedicated folder and 
  • Rename it to data.tar.gz 

Assuming the backup is on your USB otg: 

  1. Open terminal and type: cd /storage/usbdisk/TWRP/backup/ 
  2. Make sure the file is there: ls 
  3. Untar: tar -xvzf data.tar.gz 
  4. After the unarchiving is completed you can search for ./misc/wifi/wpa_supplicant.conf 
  5. Rename the existant one (/data/misc/wifi/wpa_supplicant.conf to wpa_supplicant.conf.bak)
  6. Paste the new one there and 
  7. Give proper permissions/owner/group (-rw-rw----, owner 1000-system, group 1010-wifi). 

 Your WiFi settings are back and you can now focus on more interesting things.

If you want to discuss about this subject, meet us at xdadevelopers.com

No comments:

Post a Comment