wpa_supplicant keeps getting replaced

Search This thread

horse178

Member
Aug 15, 2016
5
0
Hi

I have successfully rooted my phone and have taken the wpa_supplicant.conf file from my previous phone, I have copied it through adb numerous times and everytime I reboot it is replaced with a blank file.
I tried copying it through twrp which partially worked; the file was full however wifi would not work. I checked and this was because the permissions were set to root:root, I switched it to system:wifi and rebooted. No go the file was replaced with a blank one... at least wifi is working again!

Is there another part of the phone that is checking the file and reverting it? I have trawled google and struggled to find anything similar.

thanks
 
G

GuestK00204

Guest
Hi

I have successfully rooted my phone and have taken the wpa_supplicant.conf file from my previous phone, I have copied it through adb numerous times and everytime I reboot it is replaced with a blank file.
I tried copying it through twrp which partially worked; the file was full however wifi would not work. I checked and this was because the permissions were set to root:root, I switched it to system:wifi and rebooted. No go the file was replaced with a blank one... at least wifi is working again!

Is there another part of the phone that is checking the file and reverting it? I have trawled google and struggled to find anything similar.

thanks
you can try to change the owner and group of the file to wifi:
PHP:
mount -o rw,remount /system
chown wifi:wifi /data/misc/wifi/wpa_supplicant.conf
ls -la /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- wifi     wifi         2343 2016-07-11 10:31 wpa_supplicant.conf
 

horse178

Member
Aug 15, 2016
5
0
you can try to change the owner and group of the file to wifi:
PHP:
mount -o rw,remount /system
chown wifi:wifi /data/misc/wifi/wpa_supplicant.conf
ls -la /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- wifi     wifi         2343 2016-07-11 10:31 wpa_supplicant.conf

Thanks, I have just tried this and it also doesn't work. The phone is presently locked to vodafone, and there is always an entry in the replaced supplicant file that is "VodafoneWiFI". Also even though the phone is rooted I have removed the stock facebook app amongst others and everytime I reboot these are replaced like nasty little viruses lol.
 
G

GuestK00204

Guest
Thanks, I have just tried this and it also doesn't work. The phone is presently locked to vodafone, and there is always an entry in the replaced supplicant file that is "VodafoneWiFI". Also even though the phone is rooted I have removed the stock facebook app amongst others and everytime I reboot these are replaced like nasty little viruses lol.
Stock rom will reinstall all stock apps on reboot.

try this
PHP:
 su -c "cat /data/misc/wifi/wpa_supplicant.conf > /storage/sdcard1/wifi-networks.txt"
Make the necessary changes and revert
PHP:
su -c "cp /storage/sdcard1/wifi-networks.txt /data/misc/wifi/wpa_supplicant.conf"

you should be able to see the info inside the .conf file with any notepad and recover the passwords
 
Last edited:

horse178

Member
Aug 15, 2016
5
0
Stock rom will reinstall all stock apps on reboot.

try this
PHP:
 su -c "cat /data/misc/wifi/wpa_supplicant.conf > /storage/sdcard1/wifi-networks.txt"
Make the necessary changes and revert
PHP:
su -c "cp /storage/sdcard1/wifi-networks.txt /data/misc/wifi/wpa_supplicant.conf"

you should be able to see the info inside the .conf file with any notepad and recover the passwords

Ahh so there's not much I can do against the stock rom to prevent it from reinstalling apps apart from flashing a custom rom? I suppose the stock rom is replacing the file also? thanks for the above although recovering the passwords isn't my problem I was hoping to have it use the new configuration and not have to put passwords everytime I connect to a network I have been to before.
I was amassing quite the city network lol
 
G

GuestK00204

Guest
Ahh so there's not much I can do against the stock rom to prevent it from reinstalling apps apart from flashing a custom rom? I suppose the stock rom is replacing the file also? thanks for the above although recovering the passwords isn't my problem I was hoping to have it use the new configuration and not have to put passwords everytime I connect to a network I have been to before.
I was amassing quite the city network lol
you can try and copy paste like i said.

apps like facefook you can disable them.
go to apps>all>facebook
close disable and wont show.
 

horse178

Member
Aug 15, 2016
5
0
you can try and copy paste like i said.

apps like facefook you can disable them.
go to apps>all>facebook
close disable and wont show.

Success! Apparently copy and paste works any ideas why? or that it's just picky? Thanks very much, and I had forgotten disable was possible which will have to do till I s-off and remove it totally.
 
G

GuestK00204

Guest
Success! Apparently copy and paste works any ideas why? or that it's just picky? Thanks very much, and I had forgotten disable was possible which will have to do till I s-off and remove it totally.
it works because its the same file (permitions intact) you just put more info