zoukankan      html  css  js  c++  java
  • 11.adb常用命令

    1. 帮助

        adb --help
      
    2. 启动adb server

        adb start-server
      
    3. 关闭adb server

        adb kill-server
      
    4. 获取设备号

        a. 设备号就是一个字符串
        b. adb devices
        c. 虚拟机的是:192.168.56.101:5555
      

      d. 获取设备号

    5. 获取系统版本

        a. adb -s 设备号 shell getprop ro.build.version.release
        b. 实际命令即:“adb -s 192.168.56.101:5555 shell getprop ro.build.version.release”
      
    6. 发送文件到手机

        adb push 电脑的文件路径/需要发送的文件 手机存储的路径
      
    7. 从手机拉取文件
      a. adb pull 手机的路径/文件 发送到电脑的路径

      b. 手机与电脑间文件的传输

    8. 查看手机运行日志

        adb logcat
      
    9. 手机shell命令行

        a. adb shell
        b. adb shell ls (会留在电脑而不是Linux)
      
    10. 获取包名和启动名

        a. adb shell dumpsys window windows | findstr mFocusedApp
        b. com.baidu.searchcraft/.widgets.login.SSLoginGuideActivity
      

      c. 获取包名与启动名

    11. 安装app到手机

        a. adb install 路径/xxx.apk
        b. adb install f:simple.apk
      

      c. 安装APP

    12. 卸载app

        a. adb uninstall 包名
        b. adb uninstall com.baidu.searchcraft
      
    13. 获取app启动时间

        a. adb shell am start -W 包名/启动名
        b. adb shell am start -W com.baidu.searchcraft/.widgets.login.SSLoginGuideActivity
        c. ThisTime 启动耗时
        d. TotalTime 应用自身启动耗时 = ThisTime + 应用等资源启动时间
        e. WaitTime 系统启动应用耗时 = TotalTime + 系统资源启动时间
      

      f. APP启动时间

  • 相关阅读:
    状态同步和帧同步
    SVN和Git的使用
    客户端知识点
    客户端性能优化
    H5游戏开发面试经验
    2.0 pomelo-treasure官方demo的使用
    1.0 pomelo环境的搭建和部署
    python 网络编程
    冒泡排序
    面向对象-反射和元类
  • 原文地址:https://www.cnblogs.com/liqing45/p/9460931.html
Copyright © 2011-2022 走看看