adb常用命令
1.查看最上层 Activity 名字 Linux adb shell dumpsys activity | grep "mResumedActivity" Windows adb shell dumpsys activity activities | findstr mResumedActivity 2.启动组件 启动 Activity adb shell am start -n com.google.android.network2/com.my.MainActivity 启动 Service adb shell am startservice -n com.google.android.network2/com.my.MainActivity 发送 Broadcast adb shell am broadcast -a android.intent.action.BOOT_COMPLETED 3.重启设备 重启到 Recovery 界面 adb reboot recovery 重启到 bootloader 界面 adb reboot bootloader 4.其他 强制结束应用 adb shell am force-stop <PACKAGE> 5.以调试模式启动应用 adb shell am set-debug-app -w {package_name} 清除调试模式 ...