Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 760
Ivan Fork Avatar asked Feb 02 '17 06:02

Ivan Fork


1 Answers

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.

like image 163
Pavel Kostal Avatar answered Sep 27 '22 18:09

Pavel Kostal