当前位置:网站首页>作为测试,常用的adb命令
作为测试,常用的adb命令
2022-08-10 05:35:00 【蓝尼亚】
adb命令
1.常见命令介绍
ADB Shell - Android ADB Commands Manual
https://developer.android.com/studio/command-line/adb
2.测试,常用的adb命令
安装apk
adb install -r -d xxxapk
查询log
adb logcat | findStr "Encryption"
截屏:adb shell screencap /sdcard/a.png
打印日志
adb logcat > 日志存放位置\日志名.txt
获取当前活动的包名和类名
adb shell dumpsys window | findstr mCurrentFocus
查看当前正在运行的进程列表,可以获取进程的名字
adb shell ps
强制关闭应用
adb shell am force-stop com.heytap.cloud
启动应用
adb shell am start -n 包名/启动类的名称
数据传输
从手机拉取文件
adb pull /data/data/com.coloros.gallery3d/databases E:\cloud_bug\370.bug
发送文件到手机
adb push E:/cloud_bug/369.bug/databases /data/data/com.coloros.encryption/database
查询所有的包名
adb shell pm list packages
改变手机电量:
让手机电量显示百分百: adb shell dumpsys battery set level 100
让手机电量显示1: adb shell dumpsys battery set level 1
切换手机电池为非充电状态: adb shell dumpsys battery set status 1
切换手机电池为充电状态:adb shell dumpsys battery set status 2
复位,恢复实际状态:adb shell dumpsys battery reset
设置断开充电6.0以上:adb shell dumpsys battery unplug
设置温度的adb命令:
adb shell dumpsys battery set temp 490
查看区域
adb shell getprop | findstr region
边栏推荐
猜你喜欢
随机推荐
Copy large files with crontab
pytorch-11. Convolutional Neural Network (Advanced)
树结构——二叉查找树原理与实现
LeetCode 292.Nim 游戏(简单)
离散数学的学习记录
LeetCode 162. Finding Peaks (Moderate)
Decentralized and p2p networks and traditional communications with centralization at the core
VTK 初步 (1) ----- 可视化管线
【简易笔记】PyTorch官方教程简易笔记 EP1
51单片机营养液自动配置搅拌系统TDS浓度采集自动加水加营养液
Pytorch配置与实战--Tips
Set Sources Resources and other folders in the IDEA project
STM32单片机手机APP蓝牙高亮RGB彩灯控制板任意颜色亮度调光
一个基于.Net Core跨平台小程序考试系统
WeChat applet wx.writeBLECharacteristicValue Chinese character to buffer problem
【简易笔记】PyTorch官方教程简易笔记 EP2
LeetCode 94.二叉树的中序遍历(简单)
【笔记】集合框架体系 Collection
[List Exercise] Traverse the collection and sort by price from low to high,
我不喜欢我的代码









