当前位置:网站首页>adb 常用命令解析
adb 常用命令解析
2022-06-11 01:00:00 【小梧敲代码】
查询设备列表
adb devices
安装应用app
adb install xx.apk
卸载应用app
adb uninstall [-k]
查看安装的app包名
adb shell pm list packages
查看前台 Activity
adb shell dumpsys activity activities | grep mFocusedActivity
查看当前正在运行的APK的包名
adb shell dumpsys window | findstr mCurrentFocus
monkey app压测
adb shell monkey -p 包名 -v -v -v 200>D:AAlog.txt
app启动时间
adb shell am start com.android.settings/.HWSettings
通过wifi连接手机
adb connect 手机IP地址:5555
打开wifi页面命令
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
打开蓝牙设置界面
adb shell am start -a android.settings.BLUETOOTH_SETTINGS
打开蓝牙开关
adb shell svc bluetooth enable
关闭蓝牙开关
adb shell svc bluetooth disable
拨打电话
adb shell am start -a android.intent.action.CALL tel:10086
挂断电话
adb shell input keyevent KEYCODE_ENDCALL
adb指定设备
adb -s 设备id
打开手机卡页面
adb shell am start -a android.intent.action.MAIN -n com.android.phone/.settings.MobileNetworkSettings
打开手机通话页面
adb shell am start -a android.intent.action.MAIN -n com.android.contacts/.activities.TwelveKeyDialer
进入手机移动网络页面
adb -s AC9XKK shell am start -a android.intent.action.MAIN -n com.android.phone/com.android.phone.MobileNetworkSettings
增加音量:
adb shell input keyevent 24
降低音量:
adb shell input keyevent 25
播放/暂停:
adb shell input keyevent 85
停止播放:
adb shell input keyevent 86
滑动解锁
adb shell input swipe 300 1000 300 500
打开手机设置页面
adb shell am start com.android.settings/com.android.settings.Settings
指定程序内存使用情况
adb shell dumpsys meminfo $package
指定程序CPU使用情况
adb shell dumpsys cpuinfo p a c k a g e 接 收 的 数 据 流 量 a d b s h e l l c a t / p r o c / u i d s t a t / package 接收的数据流量 adb shell cat /proc/uid_stat/ package接收的数据流量adbshellcat/proc/uidstat/PID/tcp_rcv
发送的数据流量
adb shell cat /proc/uid_stat/$PID/tcp_snd
指定程序电量消耗信息
adb shell dumpsys batterystats $package | more
综合电量消耗
adb shell dumpsys batterystats | more
电池信息
adb shell dumpsys battery
查指定程序pid
adb shell “ps | grep $package”
查看手机信息
adb shell getprop
查看手机序列号
adb shell getprop ro.serialno
查看手机CPU信息
adb shell cat /proc/cpuinfo
查看手机内存信息
adb shell cat /proc/meminfo
重启手机
apk adb reboot
屏幕截图
adb shell screencap /sdcard/screen.png
录制视频
adb shell screenrecord /sdcard/demo.mp4
查看日志
adb logcat *:W
查看进程
adb shell ps
查看实时资源占用情况
adb shell top
点击Home按钮
adb shell input keyevent 3
输入文本
adb shell input text hello
传文件到电脑
adb pull /sdcard/test.flv /Users/fin/test.flv
最后感谢每一个认真阅读我文章的人,下面这个网盘链接也是我费了几天时间整理的非常全面的,希望也能帮助到有需要的你!
这些资料,对于想转行做【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴我走过了最艰难的路程,希望也能帮助到你!凡事要趁早,特别是技术行业,一定要提升技术功底。希望对大家有所帮助……
如果你不想一个人野蛮生长,找不到系统的资料,问题得不到帮助,坚持几天便放弃的感受的话,可以点击下方小卡片加入我们群,大家可以一起讨论交流,里面会有各种软件测试资料和技术交流。
敲字不易,如果此文章对你有帮助的话,点个赞收个藏来个关注,给作者一个鼓励。也方便你下次能够快速查找。
自学推荐B站视频:
零基础转行:25天从零基础转行到入职软件测试岗,今天学完,明天就业。【包括功能测试/接口测试/自动化测试/python自动化测试/性能测试/测试开发】
边栏推荐
- Dialog AlertDialog 、SimpleDialog、showModalBottomSheet、showToast Flutter 自定义 Dialog
- Matlab digital operation function notes
- [leetcode] flat multi-level bidirectional linked list
- [penetration test tool bee] how to install and use the XSS penetration test tool bee?
- [leetcode] same tree + symmetric binary tree
- Shell learning tutorial (super detailed and complete)
- Record the actual record of my question brushing
- How to change the theme of win11 touch keyboard? Win11 method of changing touch keyboard theme
- AI 狂想|来这场大会,一起盘盘 AI 的新工具!
- 2021-3-1matlas MNIST database training for CNN writing
猜你喜欢

Win11触摸键盘主题如何更换?Win11更换触摸键盘主题的方法
![[traffic sign recognition] Based on Matlab GUI YCbCr feature extraction +bp neural network traffic sign recognition [including Matlab source code 1869]](/img/66/3f7134298e7e9a7fbf9b0c99dafb2a.jpg)
[traffic sign recognition] Based on Matlab GUI YCbCr feature extraction +bp neural network traffic sign recognition [including Matlab source code 1869]

Video compression data set TVD

---排列数字---

Virtual joystick of QT quick QML instance

The problem of slow response of cs-3120 actuator during use

Xpath Injection

爱思唯尔---Elseviewer---预印本在线发表通知

Task01: be familiar with the basic process of news recommendation system

记录一下我的刷题实录
随机推荐
[QT] error: qapplication: no such file or directory solution
npm ERR Fix the upstream dependency conflict, or retry
[leetcode] ordered linked list transformation binary search tree
ACM教程 - 堆排序
[matlab] image segmentation
[music] playing "over fire" based on MATLAB [including Matlab source code 1875]
Understanding of pointers
[leetcode] balanced binary tree
The female programmer gives out a salary slip: the salary is high, but she feels she is 10 years old
In May, the main growth ranking list (platform of station B) of the single flying melon data up was released
Programming implementation: input any English month, and output its corresponding Chinese prompt after looking up the month table. Abbreviations can also be found.
[Haas hands on] creative case of new video program launch we started the first phase together E01: Internet of things engineers started the remote control manipulator with you
[traffic sign recognition] Based on Matlab GUI YCbCr feature extraction +bp neural network traffic sign recognition [including Matlab source code 1869]
[matlab] image restoration
Task02: basic use of database (MySQL)
【音乐】基于matlab演奏《过火》【含Matlab源码 1875期】
Task03: building an offline material system
SAP SMARTFORMS文本内容手动换行输出
Introduction and practice of QT tcp/udp network protocol (II) UDP communication
20N10-ASEMI中小功率MOS管20N10