当前位置:网站首页>adb常用命令
adb常用命令
2022-08-02 14:15:00 【keer丶】
1.查看连接了多少设备
adb devices
2.adb命令连接MUMU虚拟手机
adb connect 127.0.0.1:7555 7555为mumu的端口号
3.取消链接
adb disconnect 127.0.0.1:7555
4.启动adb服务
adb start-server
5.关闭服务
adb kill-server
6.安装软件包
adb install -r apk路径 -r保留数据-t强制覆盖
7、卸载软件包
adb uninstall 包名 -k保留数据以及缓存文件
8.查看系统包名
adb shell pm list package 获取设备上所有的包名
-s 手机系统自带应用
-3手机系统第三方应用
9.显示当前打开的软件包名
adb shell dumpsys window | findstr mCurrentFocus
10.清楚应用数据与缓存
adb shell pm clear 包名
11.启动、停止应用
启动:adb shell am start 包名/activity名
-W 大写W 获取启动时间
-R 重复启动 后边跟次数
-S每次启动前先停止
停止:adb shell am force-stop 包名
12.获取内存信息
adb shell dumpsys meminfo 包名
13.查看cou占用情况
adb shell top -s cpu 或者adb shell top -s 9
-s按指定行排序 -m显示最大数量
14.monkey
adb shell monkey -p 包名 -v(日志) 次数 > 文件路径、
-p制定包名
-v log详细程度 最高-v-v-v
--throttle 单步延迟(每部操作间隔)ms
-pct-touch点击事件 -v
15.获取安卓版本
adb shell getprop ro.build.version.release
16.获取启动页面的activity
win:adb logcat ActivityManager:I | findstr "cmp"
17.清楚应用数据及缓存
adb shell pm clear <包名>
18.查看日志常用参数
adb logcat 打印默认日志数据
adb logcat -v time 打印时间
adb logcat -v color 使用不同的颜色来显示每个优先级
adb logcat -f <filename> 将日志输出到文件
adb logcat >log.log 保存日志到pc上
adb logcat -c清理已存在的日志
19.根据条件过滤日志
adb logcat -v time "*:W" 打印warning及以上级别的日志
adb logcat ActivityManager:D 过滤tag为 ActivityManager,level为debug及以上级别的日志
20.cpu的使用情况
adb shell dumpsys cpuinfo
21.内存的使用情况
adb shell dumpsys meminfo 查看当前系统的内存
adb shell dumpsys meminfo <应用名> 查看某个应用的内存
22.top命令
adb shell top
adb shell top | grep <包名>
23.电池电量
adb shell dumpsys battery
边栏推荐
猜你喜欢

OpenPose Basic Philosophy

【线程网络】了解线程属性(fork/interview question)

光波导的入射耦合和出射耦合区域

HCIE学习记录——数据封装与常用协议(TCP/UDP)

MySQL协议长什么样子

Optisystem应用:光电检测器灵敏度建模

HCIE学习记录——OSI参考模型
![The relationship between base classes and derived classes [inheritance] / polymorphism and virtual functions / [inheritance and polymorphism] abstract classes and simple factories](/img/c1/c695006706ce91233d9ac8ecb95c50.png)
The relationship between base classes and derived classes [inheritance] / polymorphism and virtual functions / [inheritance and polymorphism] abstract classes and simple factories

光波导k域布局可视化(“神奇的圆环”)

【线程】线程创建 | 理解线程并发 (1)
随机推荐
JCMsuite应用:四分之一波片
【网络安全】学习笔记 --00
C语言函数调用过程-汇编分析
泰伯效应的建模
Apache ShardingSphere 5.1.1 正式发布
Unity中事件的3种实现方法
OpenPose 基本理念
Oauth2.0 security (take WeChat authorized login as an example)
The use of a semaphore/interprocess communication 】 【 Shared memory
【进程间通信】信号量的使用/共享内存
Unity-Ads广告插件
golang gc垃圾回收
Unity-编辑器扩展(Editor)
change the available bandwidth of tcp flow dynamically in mininet
我的2021回忆录
【网络安全】学习笔记 --02 安全通信协议
Litestar 4D – WebCatalog 7:全自动数据管理
基类和派生类的关系【继承】/多态和虚函数/【继承和多态】抽象类和简单工厂
【无标题】
类模板/赋值运算和加等运算