一、adb shell am
使用此命令可以从cmd控制台启动 activity, services;发送 broadcast等等
1、am start <packageName/.className> 或者是
am start packageName/packageName.className 直接启动指定activity
-n packageName/packageName.className 或者packageName/.className
-a action
-d date
-m MIME-TYPE
-c category
-e 扩展数据
举例:adb shell am start com.android.dialer/com.android.dialer.DialtactsActivity 或者是
adb shell am start com.android.dialer/.DialtactsActivity
2、am force-stop <packageName> -> 强制关闭一个应用程序
举例:adb shell am force-stop com.primatelabs.geekbench
二、adb shell pm
1、pm clear <packageName> -> 清除指定apk包的数据:
举例:adb shell pm clear com.primatelabs.geekbench
2、pm list packages <intent> -> 列举出所有包含<intent>的package
举例:adb shell pm list package com.it