adb 命令详解

1. 查询进程占用端口

netstat -ano|findstr "端口号"

2. 查询任务ID

tasklist |findstr "端口号"

3. 杀掉进程

tasklist /f /pid "端口号"

4. 安装apk

adb install -r "apk路径"

5. 查询app包名

aapt dump bading "apk路径"|fingstr package

6. 实时监听进程变化

adb shell "top|grep com.huhuo.asdwq(包名)"

7. 查看PID进程状态

adb shell ps -x PID

8. 监听进程状态

adb shell "top -n 10(监听次数)|grep com.huohu.auto(包名)"

9. 查看app的activity值

aapt dump bading "apk路径"|findstr activity

10. 重启app

adb shell am start -W -n com.huhuo.auto(包名)/com.huohu.auto.activity.Startivity(activity值)

11. 停止app但不会清除进程在系统中产生的数据

adb shell am force-stop com.sohu.sohuvido(包名)

12. 停止并清除app在系统中产生的数据

adb shell am force-stop com.sohu.sohuvido(包名)

13. Top用法

adb shell top -m num -n nm -d num -s col -t -h|grep com.huohu.auto(包名)

-m num 最多显示num个进程

-n num 刷新次数

-d num 刷新间隔时间(默认为5秒)

-s col 按哪列排序

-t 显示线程信息而不是进程

-h 显示帮助文档

14. 截图

adb shell system/bin/screencap(设备路径) -p /sdcard/text.png(图片名)

adb push /sdcard/text.png(图片路径) C:\Users\Desktop(电脑路径)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Felix丶南枫

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值