Android uses adb to modify mobile phone resolution and dpi

  • In order to adapt to mobile phones with different screen sizes, the easiest way is to modify the resolution and dpi through adb

adb install

adb official website download

adb modify size

  • View resolution
C:\Users\54013>adb shell wm size
Physical size: 1080x2340
  • modify resolution
C:\Users\54013>adb shell wm size 1080x1920
C:\Users\54013>adb shell wm size
Physical size: 1080x2340
Override size: 1080x1920

adb modify dpi

  • view dpi
C:\Users\54013>adb shell wm density
Physical density: 480
  • modify dpi
C:\Users\54013>adb shell wm density 320
C:\Users\54013>adb shell wm density
Physical density: 480
Override density: 320

adb restore default settings

  • restore default size and dpi
C:\Users\54013>adb shell wm size reset

C:\Users\54013>adb shell wm density reset

references

Guess you like

Origin blog.csdn.net/yu540135101/article/details/127294377