How do I fix the display on my android AVD? The UI is completely out of whack. I'm using the following command line options to launch the AVD, but nothing I do within the 'scale' and 'dpi-device' options helps fix the messed up display (see example screenshot). I'm running on Arch Linux with the latest Nvidia proprietary driver 346.35. Any help is greatly appreciated.


$ emulator -verbose -scale 0.9 -dpi-device 480 -noaudio -no-boot-anim -noskin -no-snapshot @lollipop -qemu -m 1536 -enable-kvm

Also, according to this StackOverflow post, I also did:

$ adb shell setprop qemu.sf.lcd_density 480
$ adb shell stop
$ adb shell start

Doing this has made no difference to the messed up display on my emulator.

Note that I have to use the -noskin option because it refuses to launch the emulator for me otherwise.

AVD display 2 AVD display 1


I don't launch from the command line, but this question came up while I was trying to solve a similar problem.

I eventually solved it by replacing the hw.lcd.density value in the .android/avd/<avd_name>.avd/config.ini file with the value from this answer nearest to the value in the skin's hardware.ini file (in my case that's at <android-studio-location>/plugins/android/lib/device-art-resources/<skin-name>/hardware.ini).

In my case, I'm emulating a Samsung Galaxy S6, and the Samsung provided skin has an hw.lcd.density of 200, but the dimensions they provide are 1440x2560 and the provided background images are small, so they make the screen fit into a much smaller space (474x839), so the config.ini file has a hw.lcd.density value of 640. Decreasing it to 213 and restarting the emulator fixes the problem (but I guess it doesn't quite accurately emulate the screen appearance. I don't know whether it's better than just using a different screen resolution value).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.