change_density
Adjust Android device screen density (DPI) to test app layouts and UI responsiveness across different display configurations.
Instructions
Change screen density - useful for testing different DPI
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dpi | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:943-946 (handler)The handler function for the 'change_density' tool. It uses the run_adb utility to execute the ADB shell command 'wm density [dpi]' which changes the screen density (DPI) on the Android device, useful for testing different screen densities.@mcp.tool() def change_density(dpi: int, device_serial: str | None = None) -> str: """Change screen density - useful for testing different DPI""" return run_adb(["shell", "wm", "density", str(dpi)], device_serial)