I’ve tried to boot Android 9 with the image provided by Tango and at least it boots with a little modification :
#!/bin/sh -e
if [ -n “$1” ]; then
INSTANCE_ID=$(printf “%02d” $1)
INSTANCE_DIR=run-${INSTANCE_ID}
mkdir -p ${INSTANCE_DIR}
shift
else
echo “Must specify instance id”
exit 1
fi
ANDROID_IMAGE_PATH=./
QEMU_ARCH=$(arch)
WIDTH=480
HEIGHT=800
#QEMU_DISPLAY=“-device virtio-gpu-pci,virgl=on,xres=${WIDTH},yres=${HEIGHT} -display gtk,gl=on”
#QEMU_DISPLAY=“-device virtio-gpu-pci,virgl=on,xres=${WIDTH},yres=${HEIGHT} -display egl-headless,gl=on”
QEMU_DISPLAY=“-device virtio-gpu-pci,virgl=on,xres=${WIDTH},yres=${HEIGHT} -display sdl,gl=on”
QEMU_DISPLAY=“${QEMU_DISPLAY} -vnc :${INSTANCE_ID}”
QEMU_OPTS=“-machine virt,gic-version=host -cpu host -smp 4 -enable-kvm”
KERNEL_CMDLINE=“console=ttyAMA0,38400 video=${WIDTH}x${HEIGHT}”
KERNEL=Image
if [ ! -f ${INSTANCE_DIR}/cache.raw -o system.raw -nt ${INSTANCE_DIR}/cache.raw ]; then
rm -f ${INSTANCE_DIR}/*.raw
mkfs.ext4 -L cache ${INSTANCE_DIR}/cache.raw 1G
mkfs.ext4 -L data ${INSTANCE_DIR}/userdata.raw 4G
fi
qemu-system-${QEMU_ARCH}
${QEMU_OPTS}
-append “${KERNEL_CMDLINE} vt.global_cursor_default=0 androidboot.selinux=permissive debug drm.debug=0”
-m 2048
-kernel ${ANDROID_IMAGE_PATH}/$KERNEL
-initrd ${ANDROID_IMAGE_PATH}/ramdisk.img
-drive index=0,if=none,format=raw,id=system,file=system.raw,readonly=on
-device virtio-blk-pci,drive=system
-drive index=1,if=none,format=raw,id=cache,file=${INSTANCE_DIR}/cache.raw
-device virtio-blk-pci,drive=cache
-drive index=2,if=none,format=raw,id=userdata,file=${INSTANCE_DIR}/userdata.raw
-device virtio-blk-pci,drive=userdata
-netdev user,id=mynet,hostfwd=tcp::54${INSTANCE_ID}-:5555 -device virtio-net-pci,netdev=mynet
-device virtio-mouse-pci -device virtio-keyboard-pci
-d guest_errors
-nodefaults
-serial mon:stdio
${QEMU_DISPLAY}
$*
but its not usable. The error that u see does not go away :