一、通用
adb -s {DEVICE_ID} {COMMAND}
adb connect 192.168.137.97:5555
adb shell {COMMAND}
二、Android组件相关
adb shell dumpsys activity
adb shell pm list packages -f
- 使用ActivityManager启动Activity
adb shell am start -n {PACKAGE_NAME}/{ACTIVITY_CLASS_NAME}
# -D 为使用Debug模式启动
adb shell am start -D -n {PACKAGE_NAME}/{ACTIVITY_CLASS_NAME}
adb shell screencap -p {PNG_FILE_NAME}
三、网络相关
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
adb shell settings put global http_proxy {PROXY_HOST}:{PROXY_PORT}
adb shell settings delete global http_proxy