1.应用界面
# 前台activity
adb shell "dumpsys window | grep mCurrentFocus "
# Top列表activity
adb shell "dumpsys activity top | grep ACTIVITY "
# 应用安装路径
adb shell pm path [package]
# 所有应用信息
adb shell dumpsys package
# 所有应用编译状态
adb shell dumpsys package dexopt
adb shell dumpsys package com.mediatek.engineermode
# speed-profile优化
adb shell cmd package compile -m speed-profile -f $package
# 启动应用
adb shell am start -W [package]/[activity]
adb shell am start -n com.twitter.android/com.twitter.android.StartActivity
# 查看启动应用入口
adb logcat ActivityManager:I *:S
2.硬件信息
# 查看Free RAM
adb shell cat proc/meminfo | grep -E "MemTotal|MemFree|MemAvailable|Buffers|Cached|SwapCached|SReclaimable"
# 查看分辨率
adb shell wm size
3.进程
# 查看进程
adb shell ps|findstr package
adb shell “ps -A |grep com.tcl.camera”
# 杀死进程
# 方法1:强制停止APP进程,不会清除APP进程在系统中产生的数据
adb shell am force-stop package
# 方法2:停止APP进程,并且清除这个APP进程产生的所有数据,相当于reset
adb shell pm clear package
# 方法3:杀进程
kill -9
4.导入导出
# 导入build.prop文件(见文章)
# 导出日志
adb pull /data/debuglogger C:\LogAnalyse\log
# 导出录频和截图
adb pull /sdcard/DCIM/Camera C:\Users\wei242.wang\Desktop
# 导出开机日志
adb pull /proc/bootprof
5.跳过开机向导
# 设置
adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1
6.查看属性
# 查看prop文件中watermark属性值
find -name "*.prop" | xargs grep watermark
参考:
https://confluence.tclking.com/pages/viewpage.action?pageId=160978119
adb shell命令查看并杀死app进程_adb 杀死进程-优快云博客