Home » Linux Kernel » Linux Device Drivers » Framebuffer / Display Driver » How to get Android Display Resolution using adb shell command ?

How to get Android Display Resolution using adb shell command ?

Display resolution indicates the height and width of the physical display which the android device is using. In android, we can get the display resolution / screen size using following two ways,

Using Window Manager command

$ adb shell wm size
  size [reset|WxH|WdpxHdp] [-d DISPLAY_ID]
    Return or override display size.
    width and height in pixels unless suffixed with 'dp'.

So, the output of this command for our mobile was,

$ adb shell wm size
Physical size: 1080x2160

As we can see, our display width was 1080 dp and height as 2160 dp.

Using Dumpsys command

We can use the dumpsys command as,

$ adb shell dumpsys window | grep DisplayFrames

So, the output of above command for our mobile was,

$ adb shell dumpsys window | grep DisplayFrames
  DisplayFrames w=1080 h=2160 r=0

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment