Skip to content

Instantly share code, notes, and snippets.

@savishy
Created March 10, 2016 08:07
Show Gist options
  • Save savishy/3cd744a653d12ecd13dd to your computer and use it in GitHub Desktop.
Save savishy/3cd744a653d12ecd13dd to your computer and use it in GitHub Desktop.
A list of useful adb commands
######################################
# get and set network connection
######################################
# returns 1 if airplane mode is enabled, 0 otherwise.
adb -s $DEVICE_ID shell settings get global airplane_mode_on
# the same for wifi and mobile data.
adb -s $DEVICE_ID shell settings get global wifi_on
adb -s $DEVICE_ID shell settings get global mobile_data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment