I would like to make change in some file under the root so that Android on my device be able to connect only to specific Wi-Fi hotspots by their names and be disable to connect to all others hotspots. I mean to specify a list of the allowed hotspots in a file. I'm interested only in changing a file or files under the root and not in a program/app or changing of settings.

Which file should I change and how to?

If I make my device rooted, then add specific networks in data/misc/wifi/wpa_supplicant.conf and then switch update_config to 0, new networks are not added to the file, OK. But I still can connect to any network by typing its password manually. So how to disable this? Or how to change graphic interface to be disable to type the password manually?

ps. It's not a duplicate of Only connect to certain Wi-Fi networks

  • IMHO manipulating the device or it's configuration is the wrong way. Instead you should use the existing functionality in a creative way. What you want to achieve is e.g. very similar if you set-up a VPN server that is only accesible using the "allowed Wifi" network. Then set-up this VPN as "Always-on VPN" (should also be posible to set via Device Admin API/MDM solution). The device can now connect to any Wifi network but no data can be transmitted because the connection to teh VPN server is missing.
    – Robert
    Aug 17 '19 at 13:22
  • @Robert I need only a way which can be set up under the root, there is a reason
    – stckvrw
    Aug 17 '19 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.