Search code examples
androidandroid-emulatorandroid-virtual-devicesamsung-mobile

Samsung Galaxy S4 AVD icons too small, UI not scaling correctly


I created my own AVD for Samsung Galaxy S4

Screen 1080 x 1920, size normal, xxhdpi, use host GPU emulation

There was no need to use the Sony xperia z AVD installation, I just created the AVD manually

It works well and shows in the correct resolution, but the UI does not scale correctly. More specifically, everything is a little small - the icons and text are too small. It looks more like a tablet UI than a phone. I've also compared the UI scale with screenshots of the real device and I clearly see the difference.

How do I fix the scaling issue?


Solution

  • Unfortunately, the UI scaling does not yet (SDK tools 21,22) work automatically.

    After the emulator starts and completes the boot sequence, open a command line where adb.exe resides (in the platform tools directory of the Android SDK) and run:

    > 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.

    You'll have to do it every time you start the emulator until this is fixed.. use a batch file