Wrong resolution and dpi for Samsung emulator
Steps:
Use butomo1989/docker-android-x86-7.0 image
Start container: docker run --privileged -d -p 6096:6080 -e DEVICE="Samsung Galaxy S6" --name android-container2 butomo1989/docker-android-x86-7.0
Go to VNC, open terminal inside container and check screen info using command: adb shell dumpsys display | grep mBaseDisplayInfo
Output: 474 x 839 and density 240
Expected: If use Nexus 5 device emulator, output would be: 1080x1920 and density 480 which is looks correct.
Hi @QAutomatron ,
Thank you for opening the issue. Could you maybe help to fix it? It would be great.
I tried to fix this issue and gave up in the end.. the whole skin/profile relationship is more than weird. To get correct screen resolution I use Nexus 5X
Thanks QAutomatron, so that's the cause why my website showed up rendered badly in Samsung Galaxy S6 in docker-android. I could fix it by bashing into the docker: docker exec -it android-container bash cd android_emulator apt update; apt install vim vim config.ini vim hardware-qemu.ini in these two files you can see the bad settings (474 x 839 and density 240) vim ../devices/profiles/samsung_galaxy_s6.xml : here you can find the correct settings: 1440 x 2560 and dpi 575.92 (qemu: available lcd densities are: 120, 160, 213, 240, 280, 320, 360, 400, 420, 480, 560, 640) vim config.ini : change it to hw.lcd.density=575.92 (do NOT fill in 560 or 640!) vim hardware-qemu.ini : change it to hw.lcd.width = 1440 hw.lcd.height = 2560 hw.lcd.depth = 16 hw.lcd.density = 575.92 cd ps auxfw kill -9 <pid of running command /root/emulator/qemu/linux-x86_64/qemu-system-x86_64 @samsung_galaxy_s6_8.1 -gpu off -verbose> /bin/bash ./src/appium.sh go to the vnc url http://localhost:6080/ : SGS6 shows up in correct resolution. But when you kill the pid of the qemu again, then hardware-qemu.ini gets reset again to the wrong settings.
@butomo1989, can you also please update the Quick Start of the readme of https://github.com/butomo1989/docker-android: instead of -e DEVICE="Samsung Galaxy S6" it would be better to have -e DEVICE="Nexus 5".
UPDATE: no, don't. The Nexus 5 seems even more unstable than SGS6 (on 8.1 and up). On 8.1 I was able to use the chrome browser of the nexus 5 after killing the qemu command, start it again with /bin/bash ./src/appium.sh, it rebooted again a few times , I disabled Location it rebooted again and then I could use the chrome browser. No idea what's the pattern for having it work without rebooting.