Search code examples
androidemulationandroid-virtual-devicegenymotion

Custom screen density on Android emulator


I want to set a custom screen density for my emulator.

I open AVD manager.

Right click on the virtual device.

Show on disk.

Open config.ini

Set "hw.lcd.density=200"

When I start emulator it shows error: qemu: available lcd densities are: 120, 160, 213, 240, 280, 320, 360, 400, 420, 480, 560, 640

Is it possible to use custom densities for the emulator? Can I do it on real device or on genymotion?


Solution

  • The most simple way is to use ADB, for example: adb shell wm density 220.

    You don't have to change anything in the AVD, this is much faster.