zoukankan      html  css  js  c++  java
  • Android adb 命令大全

    描述

    命令

    1、查询已连接设备/模拟器

    adb devices

    2、指定设备获取屏幕分辨率

    adb -s 设备号 shell wm size

    3、给指定设备安装应用

    adb -s 设备号 install test.apk

    4、启动 adb server 命令

    adb start-server

    5、停止 adb server 命令

    adb kill-server

    6、查看adb版本

    adb version

    7、指定 adb server 的网络端口

    adb -P <port> start-server

    8、通过 IP 地址连接设备

    adb connect <device-ip-address>

    9、断开无线连接

    adb disconnect <device-ip-address>

    10、查看所有应用

    adb shell pm list packages

    11、查看系统应用

    adb shell pm list packages -s

    12、查看第三方应用

    adb shell pm list packages -3

    13、卸载应用(<packagename> 表示应用的包名,-k 参数可选,表示卸载应用但保留数据和缓存目录。)

    adb uninstall [-k] <packagename>

    14、清除应用数据与缓存

    adb shell pm clear <packagename>

    15、复制设备里的文件到电脑

    adb pull <设备里的文件路径> [电脑上的目录]

    16、复制电脑里的文件到设备

    adb push <电脑上的文件路径> <设备里的目录>

    17、电源键

    adb shell input keyevent 26

    18、菜单键

    adb shell input keyevent 82

    19、HOME 键

    adb shell input keyevent 3

    20、返回键

    adb shell input keyevent 4

    21、增加音量

    adb shell input keyevent 24

    22、降低音量

    adb shell input keyevent 25

    23、静音

    adb shell input keyevent 164

    24、播放/暂停

    adb shell input keyevent 85

    25、停止播放

    adb shell input keyevent 86

    26、播放下一首

    adb shell input keyevent 87

    27、播放上一首

    adb shell input keyevent 88

    28、恢复播放

    adb shell input keyevent 126

    29、暂停播放

    adb shell input keyevent 127

    30、滑动解锁(参数 300 1000 300 500 分别表示起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标。)

    adb shell input swipe 300 1000 300 500

    31、输入文本

    adb shell input text hello

    32、清空日志

    adb logcat -c

    33、查看设备型号

    adb shell getprop ro.product.model

    34、电池状况

    adb shell dumpsys battery

    35、屏幕分辨率

    adb shell wm size

    36、屏幕密度

    adb shell wm density

    37、显示屏参数

    adb shell dumpsys window displays

    38、查看Android 系统版本

    adb shell getprop ro.build.version.release

    39、查看IP 地址

    adb shell ifconfig | grep Mask

    40、Mac 地址

    adb shell cat /sys/class/net/wlan0/address

    41、CPU 信息

    adb shell cat /proc/cpuinfo

    42、内存信息

    adb shell cat /proc/meminfo

    43、使用 Monkey 进行压力测试(表示向 <packagename> 指定的应用程序发送 500 个伪随机事件。)

    adb shell monkey -p <packagename> -v 500

    44、查看进程

    adb shell ps

    45、查看实时资源占用情况

    adb shell top

  • 相关阅读:
    精通特征工程
    reduce_mem_usage 降低内存使用 绘制学习率曲线和验证曲线
    正态性检验 Python正态性检验
    pd.melt Pandas 的melt的使用
    pandas dataframe 格式设置 set_option
    常用模块
    第9章 列表生成式、生成器和迭代器
    全栈作业(一)
    第8章 装饰器、模块和包
    第7章 Python 函数
  • 原文地址:https://www.cnblogs.com/yudx/p/11215075.html
Copyright © 2011-2022 走看看