一、adb工具的下載配置
1、下載
下載地址 http://adbdownload.com/
2、配置
解壓壓縮包,在系統環境變量配置解壓縮的位置
3、檢查
配置好環境變量后打開控制台輸入adb查看是否安裝成功
二、簡單的使用
1、簡單的adb命令
查看連接設備
adb device
關閉服務
adb kill-server
啟動服務
adb start-server
安裝apk
adb install 安裝包名稱
-r 覆蓋安裝apk
查看本機應用列表
adb shell pm list packages
-s 查看系統應用
-3 查看第三方應用
卸載應用
adb uninstall 安裝包名
-k 卸載但保存緩存
屏幕截圖
adb shell screencap -p 截圖文件路徑
cpu使用情況查看
adb shell dumpsys cpuinfo
顯示磁盤使用信息
adb shell dumpsys diskstats
查看電池狀態
adb shell dumpsys batteryproperties
輸出日志
adb logcat >路徑
日志等級
V Verbose(低)
D Debug
I Info
W Warning
E Error
F Fatal
S silent(高)
過濾輸出日志操作
adb logcat *:等級 >路徑