I want to get the average memory usage of some android app. All I want to do is to fetch only the memory usage. For example, below script provide instantaneous memory usage of <
Piping to sed:
sed
adb shell dumpsys meminfo | grep mobile_cep | sed 's/:.*//'
It is also trivial with awk if you are able to execute an awk script you don't need grep either:
awk
grep
adb shell dumpsys meminfo | awk -F'[: ]' '/mobile_cep/ { print $1 }'