美文网首页
android 常用命令

android 常用命令

作者: wisdom2018 | 来源:发表于2021-10-11 17:37 被阅读0次

    1. dumpsys

    adb shell dumpsys cpuinfo| grep packagename

    dumpsys activit
    dumpsys activity intents
    dumpsys activity broadcasts
    dumpsys activity providers
    dumpsys activity services
    dumpsys activity activities
    dumpsys activity processes
    
    

    获取当前activity名称
    adb shell dumpsys window windows | findstr Current

    获取当前activity的信息和包名
    adb shell dumpsys activity top

    2. am

    adb shell am force-stop package

    3. cold start and hot start

    adb shell am start -W -n package/activity

    4. pm

    pm list packages 列出package信息
    pm install 安装
    pm uninstall 卸载
    pm clear 清空数据
    pm get-install-location

    pm install

    1. 流量监控值的获取方法
      1.获取进程的ID
      adb shell ps | grep packagename
    2. 获取进程的ID流量
      adb shell cat/proc/pid/net/dev
      eth0、eth1 两个网卡的Receive 和Transmit即可
      流量= Recieve(app接收到的请求)+Transmit(app发出的请求)

    5.内存
    adb shell top

    相关文章

      网友评论

          本文标题:android 常用命令

          本文链接:https://www.haomeiwen.com/subject/chzloltx.html