How to Completely Disable ‘Display Size’ Scaling (Lock UI) on Android

Android features a built-in accessibility and UI scaling tool known as ‘Display Size’, which allows users to dynamically alter the scaling factor (DPI) of the entire operating system, enlarging or shrinking on-screen elements such as icons, text, menus, and application layouts. While essential for users with visual impairments, granting standard users the ability to modify the Display Size introduces a severe operational liability on provisioned corporate kiosks, digital signage, point-of-sale (POS) systems, or highly customised enterprise applications. If the display size is altered, meticulously designed, pixel-perfect user interfaces can shatter—buttons may be pushed off-screen, critical text can become truncated, and bespoke touch-targets may overlap, rendering the terminal completely unusable and necessitating IT intervention.

This guide explains how to completely disable or lock the ‘Display Size’ scaling capability system-wide on Android, enforcing a strict, immutable UI resolution and preventing users from breaking application layouts.

Lock the Display Size via ADB and Secure Settings

Because the Display Size slider is deeply integrated into the Android Settings app and lacks a native “lock” toggle, we must bypass the UI entirely. To enforce a strict, immutable block that prevents user modification, we must use the Android Debug Bridge (ADB) to hardcode the device’s display density (DPI) at the kernel/Window Manager level.

  1. Connect the provisioned Android device to a PC with ADB (Android Debug Bridge) installed and USB Debugging enabled.
  2. First, determine the device’s native, default physical density. Open a command prompt or terminal and execute:
    adb shell wm density
    The output will resemble: Physical density: 420. Note this number.
  3. To lock the display size and override any user-defined settings in the UI, use the Window Manager (wm) command to explicitly set the density to the native physical value:
    adb shell wm density [YOUR_PHYSICAL_DENSITY_HERE]
    (For example: adb shell wm density 420. By explicitly defining this, you instruct the Android SurfaceFlinger and Window Manager to permanently scale the UI to this exact value, overriding the settings app).
  4. Optional but recommended: To prevent users from accessing the slider at all, use an MDM (Mobile Device Management) profile to blacklist access to the com.android.settings.DisplaySettings intent.

Verify the Configuration Lockdown

Changes executed via the Window Manager using ADB are applied immediately, causing the screen to briefly flicker as the SurfaceFlinger recalculates the UI scaling.

To verify the restriction is actively enforced, disconnect the device and navigate to Settings > Display > Display size and text (or Settings > Accessibility > Display size). Attempt to move the “Display size” slider to the left or right. Because the Window Manager is overriding the UI with a hardcoded ADB density command, manipulating the slider will either immediately snap back to the default position, or the OS will completely ignore the input, resulting in zero actual scaling changes on the screen. The terminal’s UI layout is now strictly secured and immutable against user tampering.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.