Closed milan-fabian closed 1 year ago
Well, that is how it is supposed to work (that' why there is adb reboot
in the README.md
, which should've rebooted your phone).
As I needed to do that only after upgrading or changing to a new phone, one extra reboot was not a problem, and it wasn't working without it IIRC, so I've put it into instructions.
However, if your needs are different and that reboot is an big issue (I'm curious now why?), probably there are other ways to accomplish it. Perhaps just going to airplane mode
and back might reload wifi passwords instead if you're lucky?
If not, I'd try (in root adb shell) using lsof | grep -i wifi
and ps -ef | grep -i wifi
and see if I can spot which process is responsible for Wifi, and that try to kill
that PID to see if it restarts by itself. Unfortunately I currently lack a phone to try that.
Sorry for missing the adb reboot
command. I am trying to automate the process and rebooting the device makes the entire workflow more difficult.
I tried using ps -ef | grep -i wifi
and then killing all processes:
rk3399_mid:/ # ps -ef | grep -i wifi
wifi 275 1 0 11:22:41 ? 00:00:00 android.hardware.wifi@1.0-service
wifi 302 1 1 11:22:42 ? 00:02:54 wificond
wifi 803 1 0 11:22:48 ? 00:00:02 wpa_supplicant /vendor/etc/wifi/wpa_config.txt
root 3612 3553 0 14:59:45 pts/0 00:00:00 grep -i wifi
android.hardware.wifi@1.0-service
and wificond
restarted automatically, but wpa_supplicant
did not and WiFi setting UI was entirely frozen until I rebooted the device.
if it doesn't restart by its own, you should be able to restart it manually.
ps -efwww | grep -i wifi
to see it it has any more arguments on the command line. su wifi
? verify with id
)wpa_supplicant /vendor/etc/wifi/wpa_config.txt
)ps -efwww
that its line looks exactly as it did before. if it does, Wifi UI (with some luck) might be able to connect to new instance automatically.Figured out how to restart WiFi services so they start up again correctly:
svc wifi disable
ps -efwww | grep -i wifi
kill {PIDs from previous command}
svc wifi enable
After this, I can access WiFi Settings UI just fine.
The problem is that this sequence of commands doesn't force Android to reload WiFiConfigStore.xml. The file on the file system is with the new entries, but I can still see only the old entries in the list of saved WiFi networks on UI. If I reboot the device, I can then see the new entries in UI.
Well, I'm out of ideas. If you do find a solution, do write it here so it can help others.
Another place you can ask is https://forum.xda-developers.com/
Hello,
First of all, thank you for providing this tool. I am having a slight issue with the change applied only after the Android device is rebooted, not right after the WiFi is enabled again.
Steps to reproduce (tested on a box with Android 9):
Is there a way to apply the changes without rebooting the entire device?