Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x86_64:/ # root@ziomario-Z390-AORUS-PRO:/usr/bin# nano qemu-android
- run_qemu_on_port()
- {
- $QEMU -enable-kvm \
- -kernel kernel \
- -append "root=/dev/ram0 androidboot.selinux=permissive buildvariant=userdebug console=ttyS0 RAMDISK=vdb $DATADEV" \
- -initrd initrd.img \
- -m 2048 -smp 2 -cpu host \
- -usb -device usb-tablet,bus=usb-bus.0 \
- -machine vmport=off \
- -soundhw ac97 \
- -serial mon:stdio \
- -boot menu=on \
- -drive index=0,if=virtio,id=system,file=$SYSTEMIMG,format=raw,readonly \
- -drive index=1,if=virtio,id=ramdisk,file=ramdisk.img,format=raw,readonly \
- -netdev user,id=mynet,hostfwd=tcp::$port-:5555 -device virtio-net-pci,netdev=mynet \
- $DATA $@
- }
- run_qemu()
- {
- port=5555
- while [ $port -lt 5600 ]; do
- run_qemu_on_port $@ && break
- let port++
- done
- }
- # Try to run QEMU in several VGA modes
- run_qemu -vga virtio -display gtk,gl=off $@ || \
- run_qemu -vga qxl -display gtk $@ || \
- run_qemu -vga std -display gtk $@ || \
- run_qemu $@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement