Search code examples
androidsizeram

How to get total RAM size of a device?


I want to get full RAM size of a device. memoryInfo.getTotalPss() returns 0. There is not function for get total RAM size in ActivityManager.MemoryInfo.

How to do this?


Solution

  • Standard unix command: $ cat /proc/meminfo

    Note that /proc/meminfo is a file. You don't actually have to run cat, you can simply read the file.