当前位置:网站首页>app 测试 常用 adb 命令集合
app 测试 常用 adb 命令集合
2022-06-11 01:43:00 【佛系的老肖】
查询连接设备:
adb devices
连接设备:
adb connect 设备名称:端口不同的模拟器设计的端口号也不通过,这里使用的是夜神,默认第一台模拟器端口号为62001

网易mumu配置文件:
Mumu/emulator/nemu/vms/myandrovm_vbox86/myadnrovm_vboxx86.nemu,查找ADB_PORT值即可断开连接:
adb disconnect 设备
启动adb服务:
adb start-server关闭adb服务:
adb kiill-server进入Android系统:
adb shell
如果同时连接了多个Android设备,通过
adb -s 设备:端口 shell进入指定的设备上传下载文件
- 上传:
adb push 本地文件 远程目录

- 上传:
下载:
adb pull 远程文件 本地目录
安装卸载应用程序
安装
安装到默认设备:
adb install apk文件[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-helfPCMD-1654856516476)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/793caa633f704684926da5181c869725~tplv-k3u1fbpfcp-watermark.image?)]
安装到指定设备:
adb -s 设备:端口 install apk文件覆盖安装:
adb -r install apk文件
卸载
卸载:
adb uninstall 包名-k,卸载时保留配置及缓存文件查询包名:
方法1:
aapt dump badging apk文件
方法2:
进入android设备:
adb shell查询已安装的所有软件包:
pm list packages
查询第三方软件包:
pm list packages -3
方法3:
在Android设备运行待查询的程序
进入android设备:
adb shell查询:
dumpsys window windows | grep -i current
启动:
adb shell am start -n 包名/主类名启动应用,获取启动时间:
adb shell am start -W -n 包名/主类名[email protected] Desktop % adb shell am start -W -n com.ddnapalon.calculator.gp/com.ddnapalon.calculator.gp.ScienceFragment Starting: Intent { cmp=com.ddnapalon.calculator.gp/.ScienceFragment } Warning: Activity not started, its current task has been brought to the front Status: ok Activity: com.ddnapalon.calculator.gp/.ScienceFragment ThisTime: 0 TotalTime: 0 WaitTime: 15 Complete查询进程:
adb shell ps | grep 包名查询CPU占用情况:
adb shell dumpsys cpuinfo | grep 包名查询内存使用情况:
adb shell dumpsys meminfo | grep 包名[email protected] Desktop % adb shell dumpsys meminfo | grep com.ddnapalon.calculator.gp 36179 kB: com.ddnapalon.calculator.gp (pid 3070 / activities) 36179 kB: com.ddnapalon.calculator.gp (pid 3070 / activities)停止:
adb shell am force-stop 包名在光标处输入:
adb shell input text 内容发送系统按键:
adb shell input keyevent keycodekeycode相关信息连接:https://blog.csdn.net/francisbingo/article/details/74002478
单击指定位置:
adb shell input tap 横坐标 纵坐标获取页面布局:
adb shell uiautomator dump
边栏推荐
- 金属有机骨架材料Fe-MIL-53,Mg-MOF-74,Ti-KUMOF-1,Fe-MIL-100,Fe-MIL-101)负载异氟醚/甲氨蝶呤/阿霉素(DOX)/紫杉醇/布洛芬/喜树碱
- 金属有机框架MOF-Al(DIBA),MOF-Zr(DIBA),MOF-Fe(DIBA)包载姜黄素/羧苄西林/MTX甲氨蝶呤/紫杉醇PTX/阿霉素DOX/顺铂CDDP/CPT喜树碱等药物
- C language principle explanation and code implementation of scalable / reduced thread pool
- 多级介孔有机金属骨架材料ZIF-8负载乳酸氧化酶(LOD)/四氧化三铁(Fe304)/阿霉素DOX/胰岛素/cas9蛋白/甲硝唑/大黄素甲醚
- 可扩/减容线程池C语言原理讲解及代码实现
- Closing method of SQL injection
- Unity determines whether the object is in the camera field of view
- Defense measures for common vulnerabilities
- 环糊精金属有机骨架(β-CD-MOF)装载二巯丁二酸/大黄素/槲皮素/三氯蔗糖/二氟尼柳/奥美拉唑(OME)
- Analysis of common ADB commands
猜你喜欢

378. the k-th smallest element in an ordered matrix

NFT insider 61:animoca brands holds US $1.5 billion of encrypted assets in 340 investments

环糊精金属有机骨架(β-CD-MOF)装载二巯丁二酸/大黄素/槲皮素/三氯蔗糖/二氟尼柳/奥美拉唑(OME)

接口自动化核心知识点浓缩,为面试加分

SQL | return customer name, relevant order number and total price of each order

SQL | 计算总和

421. maximum XOR value of two numbers in the array

Colab报错:ImportError: cannot import name ‘_check_savefig_extra_args‘ from ‘matplotlib.backend_bases‘

贵金属白银行情走势图缘何强势?

English subtitle video translated into Chinese subtitles
随机推荐
CRS-5017
Is it appropriate for a 27 - year-old girl to change her career from zero to software testing?
Oracle收集统计信息
JS Part 5
Project records
CRS-4544 & ORA-09925
Merge sort ()
1031. 两个非重叠子数组的最大和
Find - (block find)
NFT Insider #61:Animoca Brands 在 340 项投资中持有 15 亿美元的加密资产
[3.delphi common components] 6 scroll bar
【无标题】
What is the relationship between precious metal silver and spot Silver
378. the k-th smallest element in an ordered matrix
Analysis of common ADB commands
为什么有的程序员能力一般却能拿到好offer?
The most complete format description of clang format
Do tween record
Optimized dispatching (thermal power, wind energy and energy storage) [matlab code implementation]
Large screen - full screen, exit full screen