Skip to content

Instantly share code, notes, and snippets.

@pojntfx
pojntfx / main.sh
Last active August 15, 2023 13:24
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_qem