I have a list of about 100 WiFi SSIDs and passwords that I've extracted from my old phone and I want to add them to the new phone that runs Android 10 and I couldn't find any useful information on the net as everything seems outdated and not working.
A bit about my phone: it's a OnePlus 7 with OxygenOS 10.0.1, rooted with TWRP and Magisk. The wifi networks come from an old OnePlus One with Cyanogenmod wich is not rooted. I obtained the passwords following https://www.reddit.com/r/Android/comments/86zkzf/restoring_wifi_passwords_from_old_device/
The closest thing I've found is this: https://github.com/steinwurf/adb-join-wifi but it works only one network at the time and it doesn't work very well, often passwords aren't added and I have problem escaping the SSID and passwords.
I've also tried to look for wpa_supplicant.conf
but apparently it's not used anymore, instead I've found a file called WifiConfigStore.xml
but I'm not sure if it can be edited manually or it needs a program, I tried to use wpa_cli
but I get an error at startup, I looked for apps but nothing like I need.
I believe the way to go is through WifiConfigStore.xml
but its format looks non trivial so that I'm not confident to update it manually plus there's the change it's managed by a service and any change I make will be erased.
How can I add programmatically my networks? Is there an adb command, a file I could edit on the phone or an app that can help me with this?