ADB Concepts : How to Enable/Disable WiFi on the Android Device by using ADB Commands

Get a step-by-step walkthrough in the video below!
This Article will walk you through enabling and disabling Wi-Fi on your Android device using ADB commands from a connected computer.
How to Enable/Disable WiFi on the Android Device by using ADB Commands:
# To disable wifi:
Command — To disable wifi
adb shell cmd -w wifi set-wifi-enabled disabled
Example:
Before running the command:
Observe that ‘wifi’ is enabled.

After running the command:
Observe that ‘wifi’ is disabled, after running the above command.

# To enable wifi:
Command — To enable wifi
adb shell cmd -w wifi set-wifi-enabled enabled
Example:
Before running the command:
Observe that ‘wifi’ is disabled.

After running the command:
Observe that ‘wifi’ is enabled, after running the above command.

GitHub Link:
No comments:
Post a Comment