Step by step guide to build androidx86 with virtual box guest os integrations Androidx86.org says that to use 3d acceleration for my androidx86 virtual machine i have to install Linux guest additions.I would like to know how to do that.
I am using a

ubuntu 20.10 (64bit)
core i5 4th gen(@3.1 ghz)
Nvidia gt 730
Virtualbox 6.1
To use GPU acceleration for android x86 vm it's easier if you use qemu.Check this out(the method i used and this video are not fully same.i used the latest version)
Linux exclusive-Feel free to comment your questions

Install the following build dependencies(no need to build for arch linux read below) usingsudo apt install -y build-essential libepoxy-dev libdrm-dev libgbm-dev libx11-dev libvirglrenderer-dev libpulse-dev libsdl2-dev libgtk-3-dev libsdl1.2-dev ninja-build

cd into directory you want to download and build qemu(if you use arch linux you don't have to build qemu.just use the package in official repository.also it is not necessary to add your user to kvm group.it just works.)
Download latest qemu sources using git clone https://git.qemu.org/git/qemu.git
run cd qemu
run ./configure --enable-sdl --enable-opengl --enable-virglrenderer --enable-system --enable-modules --audio-drv-list=pa --target-list=x86_64-softmmu --enable-kvm --enable-gtk
run make
run sudo adduser yourusername kvm
run sudo chmod 666 /dev/kvm
run sudo touch /lib/udev/rules.d/99-kvm.rules
add line KERNEL==&quot;kvm&quot;, GROUP=&quot;kvm&quot;, MODE=&quot;0666&quot; to 99-kvm.rules
you can do that by sudo gedit /lib/udev/rules.d/99-kvm.rules and pasting the line then saving.
run sudo apt install qemu-utils
cd to the directory where you want create the virtual hard disk.
qemu-img create -f qcow2 Android.img 10G
10G refers to size of hard disk drive,in this case 10 Gigabytes.
Download androidx89.(latest kernel version performed better for me or was it just a placebo?)
cd to directory were u git cloned qemu
cd to directory qemu/build/x86_64-softmmu/ ie cd qemu/build/x86_64-softmmu/
run

qemu-system-x86_64 -boot d \
    -enable-kvm \
    -smp 2 \
    -cdrom &quot;/path/to/android/iso&quot; \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/android/Android.iso,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -net nic -net user,hostfwd=tcp::4444-:5555


smp refers to number of cpu cores given to the virtual machine. -m refers to ram allocated.in this case 2048 megabytes.you can use -display gtk,gl=on also but display gtk does not work nvidia proprietary drivers for some reason.
Use arrow keys to navigate and enter to select.do as follows
Select Installation

Select create/modify partition

dont use gpt

Select new

select primary

press enter

select write and type yes .then select quit

select the partition we just created

select ext4

select yes to format

select yes to install grub

select yes to make /system read write (recommended)

Once all operations are over u can boot into android.
To boot directly to hard disk use

qemu-system-x86_64 -boot c \
    -enable-kvm \
    -smp 2 \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/android/Android.iso,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -net nic -net user,hostfwd=tcp::4444-:5555


to use adb use adb connect localhost:4444
if arm translator does not install automatically do this


instructions to manually install native bridge

Download this file(http://dl.android-x86.org/houdini.php?v=9_y) in your vm.9 refers to android version if you have a previous version change it accordingly.or you can check it here

change the name of the file according to the version of android in my case houdini9_y.sfs.move that file to system/etc/ it can be done using terminal or root browser.



using terminal type mv /sdcard/Download/houdini9_y.sfs /system/etc if you are not comfortable with this method use a root browser app.


now got to terminal emulator type su (if you get a prompt asking weather to give superuser access say yes forever)
then type system/bin/enable_nativebridge
You might get some errors but they are safe to ignore i suppose.(i got two errors but arm translators worked)
Go to settings androidx86-options enable native bridge

Setting up tap networking
For better guest-host integrations i use a tap network.
sudo ip link add name br0 type bridge
sudo ip addr flush enp3s0
sudo ip link set enp3s0 master br0
sudo ip tuntap add mode tap name tap0 user yourusername
sudo ip link set tap0 master br0
sudo ip link set enp3s0 up
sudo ip link set tap0 up
sudo ip link set br0 up
sudo dhclient -v br0

replace enp3so with your network interface.use the following to command to launch the emulator
qemu-system-x86_64 -boot c \
    -enable-kvm \
    -smp 2 \
    -name linuz \
    -device virtio-vga,virgl=on,xres=1280,yres=720 \
    -cpu host \
    -device AC97 \
    -m 2048 \
    -display sdl,gl=on \
    -drive file=/path/to/imgfile,if=virtio \
    -object rng-random,id=rng0,filename=/dev/urandom \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-keyboard \
    -boot menu=off \
    -device virtio-tablet \
    -machine type=q35 \
    -serial mon:stdio \
    -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no \
    -device virtio-net-pci,netdev=mynet0,mac=51:55:00:a1:11:32