Network & Connectivity
Android 4.2+ (API 17+)
Risk: MODIFIES_DEVICE
Toggle Airplane Mode
Enables or disables system-wide Airplane mode and broadcasts the state change.
Command Syntax
adb shell settings put global airplane_mode_on
Generic Syntax:
settings put global airplane_mode_on <1|0> && am broadcast -a android.intent.action.AIRPLANE_MODE
Options & Parameters
| Flag | Description |
|---|---|
| 1 | Enable airplane mode. |
| 0 | Disable airplane mode. |
Real-World Usage Examples
Turn Airplane mode ON
Turns on airplane mode.
adb shell settings put global airplane_mode_on 1 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
Output:
Broadcasting: Intent { act=android.intent.action.AIRPLANE_MODE }
Broadcast completed: result=0
Turn Airplane mode OFF
Turns off airplane mode.
adb shell settings put global airplane_mode_on 0 && adb shell am broadcast -a android.intent.action.AIRPLANE_MODE
Output:
Broadcasting: Intent { act=android.intent.action.AIRPLANE_MODE }
Broadcast completed: result=0