adb启用禁用:默认端口5037
1、查看手机时候链接
adb devices
2、查看手机中的apk列表
adb shell pm list package -f
3、Mac终端:查看手机app的包名(app在手机端运行状态):
adb shell dumpsys window | grep mCurrentFocus
3.1、windows的cmd:查看手机app的包名(app在手机端运行状态):
adb shell dumpsys window | findstr mCurrentFocus
4、Mac终端:查看app当前的appActivity(app在手机端运行状态)
adb shell dumpsys activity activities | grep mResumedActivity
4.1、windows的cmd:查看app当前的appActivity(app在手机端运行状态)
adb shell dumpsys activity activities | findstr mResumedActivity
5、其他
adb kill-server
adb start-server
adb install apk包
adb unintall 应用包名
6、获取进程号命令:
adb shell dumpsys activity top | findstr ACTIVITY
获取进程名称:
adb shell ps 进程号