ADB启动或关闭APP

  • 查看启动的包名及activity
adb shell dumpsys activity top | find "ACTIVITY"
# 实例输出
  ACTIVITY com.tencent.mm/.ui.LauncherUI 717a383 pid=5505
  ACTIVITY com.huawei.android.launcher/.unihome.UniHomeLauncher 70fbc87 pid=2211
  ACTIVITY com.eg.android.AlipayGphone/.AlipayLogin 6dfd648 pid=19941
  • 启动对应APP
adb shell am start com.android.settings/.HWSettings
  • 关闭APP
adb shell pm clear app com.android.settings

猜你喜欢

转载自blog.csdn.net/weixin_45639174/article/details/115473387