常用adb指令

adb shell am force-stop com.mob.mc.demo 强制杀死包进程
adb shell am start -s 包名/xxxActivity,eg:adb shell am start -S com.mob.mobpush.demo/com.mob.demo.mobpush.SplashActivity 启动activity
# 安卓8.1之前:adb shell dumpsys activiady | findstr "mFocusedActivity"
# 安卓8.1之后:adb shell dumpsys activity | findstr "mResume"

查看某个端口详情:
(linux)netstat -anp |grep 3306
(Mac ) lsof -i tcp:port
(Windows) netstat -ano |findstr 3306


查看某个进程详情:
(linux)ps -aux | grep pid
(mac)ps -ef |grep pid
(windows) tasklist|findstr pid

杀死某个进程
Linux : kill -9 pid
Windows : taskkill /pid pid号 /f

json里获取每个字段的value值:response.then().extract().path("data.id")

-----------------------
adb shell getprop ro.product.brand
adb shell getprop可以看所有信息
adb shell ps "| grep com.mob.mobpush.demo"

原文地址:https://www.cnblogs.com/lucylu/p/14659594.html