Turning airplane mode on via ADB

后端 未结 15 1589
暖寄归人
暖寄归人 2020-12-01 06:43

I\'ve looked all over and I haven\'t found a concrete answer to this question. I\'m hoping to find a way to toggle airplane mode from ADB that doesn\'t involve the GUI in an

15条回答
  •  無奈伤痛
    2020-12-01 07:21

    Use the following command to launch Settings > Wireless networks, toggle Airplane mode and return (by pressing Back):

    • Windows/DOS: adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS & adb shell input keyevent 19 & adb shell input keyevent 23 & adb shell input keyevent 4
    • Unix/Linux: adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS ; adb shell input keyevent 19 ; adb shell input keyevent 23 ; adb shell input keyevent 4

    Tested on Samsung Galaxy S (Android OS 2.3.3).

提交回复
热议问题