Skip to main content
Glama

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
NameRequiredDescriptionDefault
dpiYes
device_serialNo

Implementation Reference

  • 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)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server