- 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
C:\Users\54013>adb shell wm size
Physical size: 1080x2340
C:\Users\54013>adb shell wm size 1080x1920
C:\Users\54013>adb shell wm size
Physical size: 1080x2340
Override size: 1080x1920
adb modify dpi
C:\Users\54013>adb shell wm density
Physical density: 480
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