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?