ADB Concepts : How to Check, Enable & Disable ‘Airplane Mode’ Using “ADB Commands”

Get a step-by-step walkthrough in the video below!
Brief description on “
adb shell cmd connectivity airplane-mode" command
Command:
This command adb shell cmd connectivity airplane-mode
is used with Android Debug Bridge (ADB) to control or query the device's airplane mode status directly from a connected computer.
Syntax:
adb shell cmd connectivity airplane-mode [enable|disable|get]
To Check/Get Current status of “airplane mode”
Command:
This command shows whether airplane mode is currently enabled or disabled.
adb shell cmd connectivity airplane-mode
Example:

Enable “airplane-mode”:
Command:
This command enables ‘airplane mode’ on the device, if it is in disabled mode.
adb shell cmd connectivity airplane-mode enable
Example:
Before running the command:
Observe that ‘airplane mode’ is disabled.

After running the command:
Observe that ‘airplane mode’’ is enabled.

Disable “airplane-mode”:
Command:
This command disables ‘airplane mode’ on the device, if it is already enabled mode.
adb shell cmd connectivity airplane-mode disable
Example:
Before running the command:
Observe that ‘airplane mode’ is available/enabled.

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

GitHub Link:
No comments:
Post a Comment