当前位置:网站首页>A collection of common ADB commands for app testing
A collection of common ADB commands for app testing
2022-06-11 02:31:00 【Lao Xiao of Buddhism】
Querying connected devices :
adb devices
Connecting device :
adb connect Equipment name : portThe port numbers of different simulator designs also do not pass , The night God is used here , The default port number of the first simulator is 62001

NetEase mumu The configuration file :
Mumu/emulator/nemu/vms/myandrovm_vbox86/myadnrovm_vboxx86.nemu, lookupADB_PORTvaluedisconnect :
adb disconnect equipment
start-up adb service :
adb start-serverclose adb service :
adb kiill-serverGet into Android System :
adb shell
If multiple are connected at the same time Android equipment , adopt
adb -s equipment : port shellEnter the specified deviceUpload and download files
- Upload :
adb push Local files Remote directory

- Upload :
download :
adb pull Remote files Local directory
Install uninstall application
install
Install to default device :
adb install apk file[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-helfPCMD-1654856516476)(https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/793caa633f704684926da5181c869725~tplv-k3u1fbpfcp-watermark.image?)]
Install to the specified device :
adb -s equipment : port install apk fileOverlay installation :
adb -r install apk file
uninstall
uninstall :
adb uninstall Package name-k, Keep the configuration and cache files when uninstallingQuery package name :
Method 1:
aapt dump badging apk file
Method 2:
Get into android equipment :
adb shellQuery all installed packages :
pm list packages
Query third-party software packages :
pm list packages -3
Method 3:
stay Android The device runs the program to be queried
Get into android equipment :
adb shellInquire about :
dumpsys window windows | grep -i current
start-up :
adb shell am start -n Package name / Main class nameStart the application , Get start time :
adb shell am start -W -n Package name / Main class name[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 CompleteQuery process :
adb shell ps | grep Package nameInquire about CPU Occupancy :
adb shell dumpsys cpuinfo | grep Package nameQuery memory usage :
adb shell dumpsys meminfo | grep Package name[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)stop it :
adb shell am force-stop Package nameEnter... At the cursor :
adb shell input text ContentSend system key :
adb shell input keyevent keycodekeycode Related information connection :https://blog.csdn.net/francisbingo/article/details/74002478
Click to specify the location :
adb shell input tap Abscissa OrdinateGet page layout :
adb shell uiautomator dump
边栏推荐
猜你喜欢

2022 simulated 100 questions and answers for crane driver (limited to bridge crane) examination

SD3.0笔记

MySQL备份与恢复

Jetpack Compose Scaffold和BottomAppBar(底部导航)

When a logical deletion encounters a unique index, what are the problems and solutions?

Redis learning notes (continuously updating)

Modify release opening animation

421. maximum XOR value of two numbers in the array

2022 safety officer-b certificate examination question bank and answers

What is the relationship between precious metal silver and spot Silver
随机推荐
SQL | external connection
P4338 [zjoi2018] history (tree section) (violence)
Jetpack compose scaffold and topappbar (top navigation)
[3.delphi common components] 6 scroll bar
Dynamically add attributes to objects
Colab报错:ImportError: cannot import name ‘_check_savefig_extra_args‘ from ‘matplotlib.backend_bases‘
Jetpack Compose Scaffold和BottomAppBar(底部导航)
Bingbing learning notes: find the greatest common divisor and the least common multiple. Complex version reverse string
In the past 10 years, from zero foundation testing to test architect, he has made himself successful
Can annuity insurance financial products be compounded? What is the interest rate?
[3.delphi common components] 5 List class component
889. 根据前序和后序遍历构造二叉树
Analysis of common ADB commands
C language principle explanation and code implementation of scalable / reduced thread pool
1031. maximum sum of two non overlapping subarrays
扁平数据转tree与tree数据扁平化
SQL | 计算总和
如何3步精读《PMBOK指南》(经验+资料分享)
安全生产月知识竞赛——新安法知多少
Epoll 反应堆模型核心原理及代码讲解