Turn on airplane mode:
You must execute 1 first and then execute 2
--执行1
adb shell settings put global airplane_mode_on 1
--执行2
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
Turn off airplane mode:
--执行1
adb shell settings put global airplane_mode_on 0
--执行2
adb shell am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false