加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

11.adb常用命令

发布时间:2020-12-15 23:21:48 所属栏目:安全 来源:网络整理
导读:帮助 adb --help 启动adb server adb start-server 关闭adb server adb kill-server 获取设备号 a. 设备号就是一个字符串 b. adb devices c. 虚拟机的是:192.168.56.101:5555 d. 获取系统版本 a. adb -s 设备号 shell getprop ro.build.version.release b.
  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.

  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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读