How to get the Android device screen size from the

2019-01-16 05:51发布

I need a way to detect device screen size and density with adb. If there is no solution, where can I get the complete list of all existing android device with their screen size and density ?

标签: android adb
8条回答
孤傲高冷的网名
2楼-- · 2019-01-16 06:44

If you need to get the current status of range of Android device available in the market with it Screen Sizes and Densities Click here

This data is based on the number of Android devices that have accessed Android Market within a 7-day period ending on the data collection date

查看更多
萌系小妹纸
3楼-- · 2019-01-16 06:45

LCD density is in the build.prop:

adb shell getprop ro.sf.lcd_density

And the resolution is availble in the dumpsys of the input activity:

# windows
adb shell dumpsys window | find "DisplayWidth"
# linux
adb shell dumpsys window | grep DisplayWidth

It works on all the devices I've tested with (2.2, 2.3.3, 2.3.4, 4.0.3; Acer Liquid E, HTC Wildfire S, HTC Incredible S, Motorola Atrix 4G, Samsung Galaxy Note, Samsung Galaxy Nexus), as well as the emulator, although the emulator's outputs are too clean to serve as a good example for parsing.

查看更多
登录 后发表回答