当前位置:网站首页>ADB common commands

ADB common commands

2022-07-06 18:06:00 u010799534

adb Command wants to cmd Directly used in , You need to configure the environment variables first , take androidsdk Under the platform-tools Folder configuration to path Environment variable .

View all connected devices

adb devices -l

Check the port number occupied by the application

adb shell ps | grep/findstr Package name  

Check that the error category under the specified port is Error Log

adb logcat *:E findstr Port number  

View the log corresponding to the specified package name

adb logcat -v process|grep/findstr Package name  

Save the log to the specified file

adb logcat -v time > D:log.txt   

Switch to a utf-8, Solve the problem of Chinese garbled code

 chcp 65001     

Clear the cache of the specified package

adb shell pm clear Package name

apk install

adb install xx.apk

apk Overlay installation

adb install -r xx.apk

apk uninstall

adb uninstall xx.apk

apk Retain data uninstall

adb uninstall -k xx.apk

Check all package names installed on your phone

adb shell pm list packages If you only want to see the non system package name :adb shell pm list packages -3

screenshots

adb shell screencap /sdcard/xx.png

or

adb shell screencap /storage/emulated/0/DCIM/q.png
 

原网站

版权声明
本文为[u010799534]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060944178856.html