1.关闭wifi
# adb shell svc wifi disable
2.打开wifi
# adb shell svc wifi enable
3.查看当前activity
linux环境 # adb shell dumpsys activity activities | grep mResumedActivity
window环境# adb shell dumpsys activity activities | find "mResumedActivity"
或:
adb shell dumpsys activity top | find “ACTIVITY”
或:
adb shell dumpsys activity activities | find "realComponentName"
4.adb 进入 wifi 设置界面
# adb shell am start -a android.net.wifi.PICK_WIFI_NETWORK
or # adb shell am start -a android.settings.WIFI_SETTINGS
5.亮屏
# adb shell input keyevent 26
adb 命令查看当前显示界面
6.adb shell 进入WiFi保存页面命令
am start -a android.settings.WIFI_SETTINGS
查找方法:
adb shell dumpsys activity activities | find "intent"