Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any suggestions on getting xxhdpi working in the android emulator?

Tags:

android

I've tried manually configuring an AVD to support xxhdpi (480 dpi), however the android emulator maxes out at xhdpi (320 dpi).

Yes, the docs say that xhdpi will scale, however, I'd like to see it working.

I'm currently attempting to build android from the source code, to see if I can tweak anything manually.

like image 277
aprock Avatar asked Oct 16 '12 16:10

aprock


People also ask

What to do if emulator is not working?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.

How to fix emulator in Android Studio?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


1 Answers

This can be accomplished with a few additional adb-commands after the emulator has started. Taken from an installation troubleshooting page at developer.sonymobile.com (http://developer.sonymobile.com/knowledge-base/sdks/sony-add-on-sdk/install-the-sony-add-on-sdk/), the following statement is available:

In the Android SDK Tools version 21.1, the xxhdpi screen resolution for the emulator display is not yet supported. However, you could do a manual override of the LCD properties of the emulator. This will ensure that the correct resources are being dispatched for the Xperia™ Z emulator. To do so, please execute the following in your command line after the Xperia™ Z emulator has completed the boot sequence:

adb shell setprop qemu.sf.lcd_density 480

adb shell stop

adb shell start

The emulator will then restart. After it has rebooted the emulator should use the correct screen density and UI scaling. We recommend you to execute these commends using a batch file or a shell script if you are using these settings often.

like image 168
shellström Avatar answered Oct 05 '22 04:10

shellström