Search code examples
androidperformanceadbandroid-memory

adb shell command to find the device RAM


I am trying to find device RAM (512 MB or 1GB) using adb shell commands.

Following commands giving more details about the free,used & total memory. But how to find the device overall RAM?

adb shell "cat /proc/meminfo"
adb shell dumpsys meminfo
adb shell procrank

Solution

  • So it looks to me that MemTotal is probably the field you are looking for:

    MemTotal — Total amount of physical RAM, in kilobytes.

    While it is not the strictly Android, another Linux flavour CentOS provides the following page regarding /proc/meminfo. It seems that Red Hat, and other variants also describe it similarily.

    Is there something that is making you suspect that this is not the physical RAM? On my device the value reported for MemTotal matches what I expect.