1.查看内存 adb shell dumpsys meminfo $package_name or $pid
获取Total, dumpsys meminfo com.huawei.systemserver | grep ”TOTAL:“ | awk ‘{TOTAL = $2}END{print TOTAL}‘
dumpsys meminfo com.huawei.systemserver |grep "TOTAL SWAP PSS" | awk -F ‘ ‘ "{print $2}" (奇怪 linux上无效)
2.dumpsys activity