A way to get the current resolution size and DPI from the command line/terminal/adb?
the result and 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