adb命令使用bat展示:截屏和双清(清数据和删文件夹)

1.截屏

adb shell screencap -p /sdcard/01.png
adb pull /sdcard/01.png

  

2.双清

@echo off
choice /C cie /M “comiccat,ireader,end”
if errorlevel 3 goto end
if errorlevel 2 goto ireader
if errorlevel 1 goto comiccat
 
:comiccat
adb shell pm clear 包名1
adb shell rm -r /sdcard/文件夹1
goto end
 
:ireader
adb shell pm clear 包名2
adb shell rm -r /sdcard/文件夹2
goto end
 
:end
echo good bye

  

3.adb命令:

安装包:adb install -r XXXX
截图:adb shell screencap -p /sdcard/01.png(截屏);adb pull /sdcard/01.png(下载截图)
抓取崩溃日志:adb logcat -v time >.\logcat.log
查看机型:adb shell getprop ro.product.model
查看包名:adb shell dumpsys window | findstr mCurrentFocus(该应用开启状态)
清除数据和缓存:adb shell pm clear 包名
删除文件夹:#开始shell命令  adb shell
	   #进入到sdcard卡目录 cd sdcard
	   #将列出所有文件夹 ls
	   #删除文件或文件夹 rm -r  Lovel(文件夹名称) 
卸载APK:adb uninstall APK的包名
adb安装指令:adb uninstall com.xiaomi.bussiness.store
覆盖低版本APK:Android设备有更小版本Apk,进行覆盖安装:adb install -r xx.apk
覆盖高版本::Android设备有更高版本Apk,进行覆盖安装:adb install -r -d 
adb install -r -d C:UsersAllenJDesktop线上xiaomi_highger.apk
多个设备时装包:adb -s 设备号 install XXX;adb -s 设备号 adb 命令

  

原文地址:https://www.cnblogs.com/wxcx/p/12213760.html