• adb常用命令


    adb --help

    设备管理

    adb devices查看连接设备

    adb start-server | adb kill-server 启动/停止adb服务

    adb –s <deviceName> 指定设备进行操作

    adb connect <deviceName> 连接指定设备 应用管理

    adb push/pull 在PC和手机之间复制文件

    adb install <apk文件名> 安装应用到手机

    adb uninstall <包名> 卸载手机上的应用

    pm命令

    adb shell pm list package [-s系统应用] [-3第三方应用] [-f列出应用包名及apk存放地址] [过滤关键字] 列出设备上的应用

    adb shell pm install/uninstall 安装/卸载存放在设备上的包名

    am命令

    adb shell am start [-W等待启动] [-S关闭后重启] <Activity名> 启动Activity

    am start –a android.intent.action.VIEW –d http://www.baidu.com 启动浏览器访问百度

    logcat命令

    adb shell logcat –v time >[路径] 将日志保存到指定文件

    dumpsys命令 adb shell dumpsys 查询系统服务信息

    adb shell dumpsys activity |findstr “mFoc” 查找当前交互的界面

    input命令

    adb shell input text <text> 输入文本

    adb shell input keyevent <KEYCODE> 模拟按键操作

    adb shell input tap <X,Y> 模拟点击

    adb shell input swipe <X0,Y0,X1,Y1,TIME> 模拟滑动屏幕

    获取系统版本:adb shell getprop ro.build.version.release

    查看包名:adb shell pm list packages | findstr qq

    查看启动入口:adb shell dumpsys activity | findstr com.tencent.mobileqq | findstr LAUNCHER

  • 相关阅读:
    Asp.net mvc5开源项目"超级冷笑话"
    SQLServer清空日志
    Quartz.net配置文件实例及cron表达式详解
    2.eclipse 插件安装烦死人(2)
    2.eclipse 插件安装烦死人(1)
    1.jdk安装和环境配置
    IOS UI 设计 技术
    ios 缓存策略
    ios 缓存相关信息收集
    ios 流媒体 资料
  • 原文地址:https://www.cnblogs.com/nnniki/p/12604220.html
Copyright © 2020-2023  润新知