Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active August 15, 2023 13:24
Show Gist options
  • Save pojntfx/de806dd09a6c2df9f0abc576a6548682 to your computer and use it in GitHub Desktop.
Save pojntfx/de806dd09a6c2df9f0abc576a6548682 to your computer and use it in GitHub Desktop.
QEMU Android-X86 with 3D hardware acceleration, audio & webcam support
# Without webcam access
sudo GDK_SCALE=1 qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev alsa,id=snd0,out.buffer-length=500000,out.period-length=726 -device virtio-mouse-pci -device virtio-keyboard-pci -net nic -net user -device virtio-vga,virgl=on -display gtk,gl=on -hda android-x86.img -cdrom android-x86.iso
# With webcam access (requires sudo; change hostbus=2,hostaddr=4 to match your webcam's USB address).
sudo pulseaudio -D --system
sudo GDK_SCALE=1 qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev alsa,id=snd0,out.buffer-length=500000,out.period-length=726 -device virtio-mouse-pci -device virtio-keyboard-pci -net nic -net user -device virtio-vga,virgl=on -usb -device usb-ehci,id=ehci -device usb-host,hostbus=2,hostaddr=4 -display gtk,gl=on -hda android-x86.img -cdrom android-x86.iso
# More information on changing things like the screen resolution: See https://web.archive.org/web/20210117124628/https://linuxhint.com/android_qemu_play_3d_games_linux/
# To much input latency or alt-tab not working? Try using X11 instead of Wayland & disable screen scaling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment