当前位置:网站首页>How to configure ADB environment variables (where to open environment variables)
How to configure ADB environment variables (where to open environment variables)
2022-07-28 14:05:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
1. To configure ADB environment variable
1.1: Open the control panel > Systems and security > System > Advanced system setup
1.2: Create a new... In the system variable ANDROID_HMOE Variable , Assignment path (D:\install\androidSDK)
1.3. In system variable path Add %ANDROID_HOME%\platform-tools
1.4.cmd Access terminal 2. ADB Commonly used instructions
2.1.1. View device 2.1.2 Turn on / Close the service 2.1.3. Install the software 2.1.4. Uninstall software 2.1.5. View all app The package name 2.1.6. System application 2.1.7. View installed third-party software 2.1.8 Transfer computer files to mobile terminals 2.1.9 Transfer mobile files to the computer 2.2.0 see adb Command help information 2.2.1 screenshots 2.2.2 Log in to the device shell 2.2.3 Check your phone CPU situation 2.2.4 Check application memory usage 2.2.5 Display disk usage information 2.2.6 Clear application cache information 2.2.6 Check battery status 2.2.7 Check battery information
To configure ADB environment variable
1.1: Open the control panel > Systems and security > System > Advanced system setup
1.2: Create a new... In the system variable ANDROID_HMOE Variable , Assignment path (D:\install\androidSDK)
1.3. In system variable path Add %ANDROID_HOME%\platform-tools
1.4.cmd Access terminal verification adb Whether the configuration is successful The following figure shows failure
The following figure shows success
2. ADB Commonly used instructions
2.1.1. View device : Instructions :adb devices This command is to view the currently connected device , Connected to a computer android The device or emulator will list the displays
2.1.2. Turn on / Close the service : Opening service adb start-server Close the service adb kill-server
Startup error diagram :
terms of settlement : First open a command line window adb nodaemon server After returning
Open another command line window adb shell It was successful .
Start the correct schematic :
Here is the lightning simulator
2.1.3. Install the software : Instructions :adb install apk route : adb install E:\ceshi\baidu.apk
2.1.4. Uninstall software : Instructions :adb uninstall < The software name > adb uninstall com.baidu.searchbox Add :adb uninstall -k < The software name > If added -k Parameters , To uninstall the software but keep the configuration and cache files
2.1.5. View all app The package name : Instructions :adb shell pm list packages
2.1.6. System application : Instructions :adb shell pm list packages –s
2.1.7. View installed third-party software : Instructions :adb shell pm list packages -3 nter)
2.1.8 Transfer computer files to mobile terminals : Instructions :adb push Computer path Mobile end path
2.1.9 Transfer mobile files to the computer : Instructions :adb pull Mobile end path Computer path
2.2.0 see adb Command help information : Instructions :adb help
2.2.1 screenshots : Instructions :adb shell screencap -p Screenshot file path adb shell screencap -p sdcard/1.gpg
2.2.2 Log in to the device shell: adb shell adb shell <command command > Back plus <command command > Will be to run the device command directly , Equivalent to executing remote commands
2.2.3 Check your phone CPU situation : Instructions :adb shell dumpsys cpuinfo
2.2.4 Check application memory usage : Instructions :adb shell dumpsys meminfo + Package name : Memory usage of the application adb shell dumpsys meminfo com.baidu.searchbox
2.2.5 Display disk usage information : Instructions :adb shell dumpsys diskstats
2.2.6 Clear application cache information : adb shell pm clear [packagename] Instructions :adb shell pm clear com.baidu.searchbox
2.2.6 Check battery status : Instructions :adb shell dumpsys battery
2.2.7 Check battery information Instructions :adb shell dumpsys batteryproperties Display current battery key attribute values (ac: Direct charging ,USB, wireless 、 state 、 Health index 、 Current state index 、 Power level 、 The volume 、 Temporary sound level 、 The current sound level ):
3.0. adb logcat Check the phone log
adb logcat Command format : adb logcat [ Options ] [ Each filter ], among Options and Each filter stay brackets [] in , Indicates that this is optional ;
“>” Output : “>” Followed by the log file to be output , Can be logcat Log output to file , Use adb logcat > log command (adb logcat >C:\log\c.txt)
Appoint logcat Log output format of :
– “-v” Options : Use adb logcat -v time command , What can see the log output time ; Output the phone log to a local file adb logcat -v time > C:/log/aa.txt
Android The logs are divided into the following levels : V —— Verbose( The minimum , Output the most ) D —— Debug I —— Info W —— Warning E —— Error F —— Fatal S —— Silent( The highest , Output nothing ) Filtering logs by a certain level will output logs of that level and above . such as , command :adb logcat *:W take Warning、Error、Fatal and Silent Log output adb logcat *:E>E:/ceshi/888.txt Show all priorities greater than or equal to “warning” Log
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/128513.html Link to the original text :https://javaforall.cn
边栏推荐
- P1797 heavy transportation problem solution
- The strongest distributed locking tool: redisson
- R language ggplot2 visualization: use the ggviolin function of ggpubr package to visualize violin diagrams, set the palette parameter, and customize the border colors of violin diagrams at different l
- [lvgl events] Application of events on different components (I)
- Several solutions to spanning
- .net for subtraction, intersection and union of complex type sets
- redis哨兵机制
- 了解虚拟列表背后原理,轻松实现虚拟列表
- 协同办公工具:在线白板初起步,在线设计已红海
- Understanding of stack and practical application scenarios
猜你喜欢

Qt5开发从入门到精通——第一篇概述

修订版 | 目标检测:速度和准确性比较(Faster R-CNN,R-FCN,SSD,FPN,RetinaNet和YOLOv3)...

83.(cesium之家)cesium示例如何运行

最强分布式锁工具:Redisson

Algorithm --- different paths (kotlin)

论文研读--Masked Generative Distillation

【飞控开发基础教程7】疯壳·开源编队无人机-SPI(气压计数据获取)

在centos中安装mysql5.7.36

Deploy application delivery services in kubernetes (Part 1)

30 day question brushing plan (III)
随机推荐
【LVGL事件(Events)】事件在不同组件上的应用(一)
30天刷题计划(三)
多级缓存方案
R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图、设置palette参数自定义不同水平小提琴图的边框颜色
30天刷题计划(四)
IP黑白名单
vite在项目中配置路径别名
【翻译】如何为你的私有云选择一个网络网关
UVA1599理想路径题解
Tutorial on the principle and application of database system (058) -- MySQL exercise (2): single choice question
Custom Configuration Sections
ES6 what amazing writing methods have you used
R language uses LM function to build multiple linear regression model, writes regression equation according to model coefficient, and uses conflict function to give 95% confidence interval of regressi
Chapter 6 support vector machine
url相关知识点
创建线程池的四种方式
Holes in [apue] files
《机器学习》(周志华) 第6章 支持向量 学习心得 笔记
算法---不同路径(Kotlin)
R语言使用lm函数构建线性回归模型、使用subset函数指定对于数据集的子集构建回归模型(使用floor函数和length函数选择数据前部分构建回归模型)