mirror of
https://github.com/budtmo/docker-android.git
synced 2026-04-25 20:25:57 +03:00
[GH-ISSUE #56] Wrong resolution and dpi for Samsung emulator #43
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-android#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @QAutomatron on GitHub (Dec 28, 2017).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/56
Steps:
Use
butomo1989/docker-android-x86-7.0imageStart container:
docker run --privileged -d -p 6096:6080 -e DEVICE="Samsung Galaxy S6" --name android-container2 butomo1989/docker-android-x86-7.0Go to VNC, open terminal inside container and check screen info using command:
adb shell dumpsys display | grep mBaseDisplayInfoOutput:
474 x 839 and density 240Expected: If use
Nexus 5device emulator, output would be:1080x1920 and density 480which is looks correct.@budtmo commented on GitHub (Jan 3, 2018):
Hi @QAutomatron ,
Thank you for opening the issue. Could you maybe help to fix it? It would be great.
@JoeSSS commented on GitHub (Jul 9, 2018):
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
@DieterRogiest commented on GitHub (Oct 30, 2018):
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.
@DieterRogiest commented on GitHub (Nov 2, 2018):
@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.