1

I need to find out device-width to keep track the set the different actions based on different width of every device, which is further used to write a script to automate the process. Through my research I get to find out using certain commands like-

$ adb shell wm size
Output-Physical size: 720x1280

adb shell wm density
Output-Physical density: 320

Curious to know, if there is any other better way of doing this?

1 Answers1

-1

precise format of the dumpsys command depends on the hardware vendor (of graphics chipset/driver and handset itself) but you should be able to find that info in the adb shell dumpsys display output

Nitesh Pareek
  • 362
  • 2
  • 10
  • I have tried that as well, device diagonal screen size is not there –  May 09 '16 at 09:41
  • Check this Link http://stackoverflow.com/questions/11201659/whats-the-android-adb-shell-dumpsys-tool-and-what-are-its-benefits – Nitesh Pareek May 09 '16 at 09:44
  • dumpsys window displays will return something like this-Display: mDisplayId=0 init=1080x1920 480dpi cur=1080x1920 app=1080x1920 rng=1080x1005-1920x1845 layoutNeeded=false. This is not the thing I need. –  May 09 '16 at 09:49