Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 943
Lava Sangeetham Avatar asked Oct 20 '25 14:10

Lava Sangeetham


1 Answers

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.

like image 78
Gareth Higgins Avatar answered Oct 22 '25 02:10

Gareth Higgins