android的adb命令整理

adb.exe的路径在Android\Sdk\platform-tools 把这个路径加入到系统的path环境下。

先用usb连接设备,比如一台android手机

adb tcpip 5555

adb devices

ddb connect device_ip_address

adb -s serialNumber shell

进入设备的shell后可以查看进程:

ps -A | grep com.tencent.mm

 

 第2列红色部分就是进程ID

查看进程的oom_adj的数值:

cat /proc/进程id/oom_adj

 

导出Error级别的日志:

 

adb logcat -v time -s com.monckxa.nearme.gamecenter *:E|findstr /c:"12239"  | find /V " W/" | find /V " I/" | find /V "java.net.SocketTimeoutException" | find /V "Missing google_app_id" > E:\log_file\com.monckxa.nearme.gamecenter__12239__2023-01-31-134817.txt

注意这个*:E

find /V "java.net.SocketTimeoutException"这个用法表示含有java.net.SocketTimeoutException这种的错误就跳过,最终这种错误不会导出。

posted @ 2020-09-05 16:10  tochenwei  阅读(106)  评论(0编辑  收藏  举报