How can i configure and enable/disable the WiFi Hotspot by using terminal command without ROOT? Also I want to kick user from my hotspot using terminal command
Setting and enabling hotspot (software access point) is possible by calling methods
wifi service. But at least since Android 8, the former requires permission
OVERRIDE_WIFI_CONFIG while the latter requires
NETWORK_STACK. Both permissions have Protection Level
signature, not to be used by third party apps. Neither
adb shell has any of the both permissions. So it's not possible without root access.
A workaround is to simulate
adb shell input command, though it's not a commandline solution in true sense.