Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling procrank doesn't work on real devices

according to a google io video about getting to know how much memory you app takes , you can use procrank and read the USS value of it.

i've tried it out on emulators (no matter which version i use - from 2.3.x to 4.1) and it works well , but running on an actual device , it didn't work (tested on galaxy s3 with android 4.0.4) . it's as if the command doesn't exist .

how could it be ? is there an alternative to get this USS value?

like image 812
android developer Avatar asked Jul 06 '12 07:07

android developer


3 Answers

You can use dumpsys command

Steps:

  1. issue command line: dumpsys meminfo packageName
  2. The Private Dirty column is you wanted.
like image 69
Nigel Ding Avatar answered Nov 09 '22 14:11

Nigel Ding


U can also use

adb shell dumpsys meminfo

or

adb shell dumpsys meminfo  + pid

command

like image 21
Hugo Avatar answered Nov 09 '22 14:11

Hugo


adb shell dumpsys meminfo [pid] (Private Dirty + Private Clean)

is same as

procrank (USS)

like image 28
neel Avatar answered Nov 09 '22 15:11

neel