feat: android-x86

This commit is contained in:
ange 2024-02-29 16:21:40 +01:00
parent aca9cb6bde
commit ceef751695
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
3 changed files with 42 additions and 0 deletions

18
android-x86/create.sh Normal file
View File

@ -0,0 +1,18 @@
#!/bin/bash -e
cd "$(dirname "$0")"
. ../lib.sh
if ! [ -f android.iso ]; then
ask_yn "android.iso not found, download?" \
&& bash ./download_isos.sh \
|| exit 1
fi
qemu-img create -f qcow2 hda.qcow2 40G
CMD=(
"${CMD[@]}"
-drive file=android.iso,media=cdrom,readonly=on
)
"${CMD[@]}"

5
android-x86/download_isos.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash -e
android='https://sourceforge.net/projects/android-x86/files/latest/download'
curl -LC- -o android.iso "$android"

19
android-x86/run.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash -e
cd "$(dirname "$0")"
. ../lib.sh
if ! [ -f hda.qcow2 ]; then
ask_yn "hda.qcow2 not found, create?" \
&& bash ./create.sh \
|| exit 1
fi
CMD=(
"${CMD[@]}"
-nic user,model=virtio-net-pci
-vga std
# USB passthrough, might need root privileges
#-device usb-host,vendorid=0xffff,productid=0xffff
)
"${CMD[@]}"