Store and retrieve wifi password without installing an app
Android's debugging bridge adb supports backup/restore:


  adb backup -f wifisettings.bak


presents you a message on screen which you need to confirm (and maybe enter a passphrase) to create the backup.


  adb restore wifisettings.bak


restores it. Just set up your phone to a very simple initial state (nothing else besides the wifi settings, or so). Then backup. adb also supports partial backups (adb -f backup.bak com.app.name), but the wifi settings are not part of a particular app, at least I haven't figured out which package to backup to catch the wifi settings.

Another way: Is your phone rooted? Then "adb push stored_wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf" will restore your password file.