Skip to content

Instantly share code, notes, and snippets.

@kiwiandroiddev
Created January 4, 2017 00:47
Show Gist options
  • Select an option

  • Save kiwiandroiddev/38df80fed9ae84f1fb012b68a28a143a to your computer and use it in GitHub Desktop.

Select an option

Save kiwiandroiddev/38df80fed9ae84f1fb012b68a28a143a to your computer and use it in GitHub Desktop.
Bash script to enable Airplane mode on the running Android emulator
#!/bin/bash
# adb must be running in root mode to broadcast intents
adb -e root
adb -e shell settings put global airplane_mode_on 1
# radios won't actually turn off until this is broadcasted
adb -e shell am broadcast -a android.intent.action.AIRPLANE_MODE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment