adb shell ps 查看所有進程及內存佔用等
adb shell dumpsys meminfo 包名 或者進程id 查看某個進程的內存佔用情況
grep用於過濾條件
adb shell ps|grep com.xxx可以過濾前綴是這個名字的進程,比如qq,它有三個進程,看qq裏的騰訊新聞的時候還會開兩個進程
windows下這個指令會提示grep找不到,可以加雙引號解決 adb shell "ps|grep com.xxx"
然後我嘗試adb shell "dumpsys meminfo|grap com."也會把符合條件的都打印出來