当前位置:网站首页>Detailed explanation of common ADB operation commands of "suggestions collection"
Detailed explanation of common ADB operation commands of "suggestions collection"
2022-07-23 08:49:00 【Test kid】
1、 View all currently running devices
adb devices 
Return to the current device list
This command is to view the currently connected device , Connected to a computer android The device or emulator will list the displays
2、 Install the software
adb installVerify success . Need to go to the device data/app Check the package name under the path

This command will specify apk Files are installed on the device
3、 Uninstall software
adb uninstall < The software name >
adb uninstall -k < The software name >If added -k Parameters , To uninstall the software but keep the configuration and cache files .

This should be emphasized
Yesterday I was using adb Uninstall program , As a result, it can't be unloaded . The command and system prompt I entered are as follows
[email protected]:~$ adb uninstall com.cto51.student-1.apk
Failure
[email protected]:~$ adb uninstall com.cto51.student-1
FailureLater found that the original program to unload , only adb uninstall The following parameter should not be .apk file , It's the package name , namely AndroidMainifest.xml Under the node in the file ,package The name specified by the element , As shown below :
[email protected]:~$ adb uninstall com.cto51.student
SuccessThat suffix "-2" No more , Because it is not part of the package name , When repeated installation for many times Android Automatically added by the system .
4、 Log in to the device shell( Enter the mobile device terminal )
adb shell
This command will log in to the device shell. After that, you will directly run the equipment command , Equivalent to executing remote commands
5、 Upload files from your computer to your mobile device
adb push use push The command can copy files or folders on the local computer to the device ( mobile phone )
6、 Download files from your device to your computer
adb pull
use pull The command can put the device ( mobile phone ) Copy the files or folders on the computer to the local computer
7、 Display help information
adb help8. Delete system application :
adb remount ( Remount the system partition , Make the system partition writable again ).
adb shell
cd system/app
rm *.apk9、 restart adb command
After running the simulator for a while ,adb It's possible that the service ( stay Windows This service can be found in the process , This service is used for simulators or through USB Real machine service connected by data cable ) There will be anomalies . At this time, we need to re adb Service shutdown and restart .
Of course , restart Eclipse It might solve the problem . But that's more troublesome . If you want to close it manually adb service , You can use the following command .
adb kill-server
Closing adb After service , To start with the following command adb service .
adb start-serverPictured :

10. Port forwarding command , That is, change the network of the simulator TCP Communication port
use : If there are multiple devices , If you want to specify a device operation ; Such as A machine
adb -s Specify the device number when entering the command :adb forward tcp:6100 tcp:7100 // PC On all the 6100 Port communication data will be redirected to the mobile terminal 7100 port server There is no need to input the previous command every time to specify .
adb start-server Choose whether the service starts adb Service process .
adb kill-server End adb Service process .
adb logcat Output log data to screen .
adb shell dumpsys [options]
meminfo Display memory information
cpuinfo Show CPU Information
account Show accounts Information
activity Show all activities Information about
window Display keyboard , Windows and their relationships
wifi Show wifi Information 边栏推荐
猜你喜欢
随机推荐
图的存储 ~
二叉树遍历
Arcgis js api二次开发——加载国家天地图
Basic operations of DDL and DML in SQL (database)
[GNN report] Li Jia, Hong Kong University of science and technology: Rethinking graph anomaly detection - what kind of graph neural network do we need?
计划了近半年的跳槽,最终是面试四家,过3家……
[openvx] VX for basic use of objects_ context
实现 FinClip 微信授权登录的三种方案
pinia的基本使用
C#中使用async和await实现异步Udp通讯
【OPENVX】对象基本使用之vx_node
[openvx] VX for basic use of objects_ graph
三个数从大到小输出最详细讲解
打印100~200之间的素数
bs4根据属性索引与名称索引对象
坚持陪同学习
svg+js鼠标悬浮视差js特效
生成13位条形码
Talking about -- network security architecture design (III)
我用Flutter开发了一个类似微信可运行小程序的App









