ADB Concepts : How to Modify Android Device settings — Resolution, Screen density, Display area

Get a step-by-step walkthrough in the video below!
User can modify an Android device’s resolution, screen density (DPI), and display area using adb shell
commands. These settings are handled via the wm
(window manager) command and can be reset to defaults when needed.
Topic-1: Android Display Settings — Resolution:
- To Check Current Settings
Command:
adb shell wm size
Example:

2. To Change Screen Resolution
Command:
adb shell wm size 480x1024
Example:

3. To Reset Display Settings to Default
Command:
adb shell wm size reset
Example:

Topic-2: Android Display Settings — Screen density:
- To Check Current Settings
Command:
adb shell wm density
Example:

2. To Change Screen density
Command:
adb shell wm density 160
Example:

3. To Reset Display Settings to Default
Command:
adb shell wm density reset
Example:

Topic-3: Android Display Settings — Display area:
1. To Change Display area
Command:
adb shell wm overscan 0,0,0,200 - |LEFT,TOP,RIGHT,BOTTOM]
Syntax: wm overscan <left>,<top>,<right>,<bottom>
Example:

2. Reset Display Settings to Default
Command:
adb shell wm overscan reset
Example:

Note: Newer Android versions may ignore overscan
or handle it differently based on device OEM and API level.
Important Notes
- Some changes may require restarting the System UI or the device.
- Not all devices honor DPI/size changes the same way (especially Samsung, Huawei, etc.).
- Be cautious — setting an invalid resolution or density can make the screen unusable.
GitHub Link:
No comments:
Post a Comment