sudo ip tuntap add dev tap0 mode tap group kvm sudo brctl addif br0 tap0 sudo ip link set dev tap0 up promisc on #sudo sysctl -w net.ipv4.ip_forward=1
emulator -avd Pixel_3a_API_30_x86 -netfast -accel auto -qemu -device virtio-net,netdev=net0,mac=52:55:00:d1:55:51 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no
adb root adb shell "dhcpclient -i eth1 &" adb# ctrl+z adb# bg adb shell "ip rule add from all lookup main pref 1" adb shell "ip route add default via 172.16.106.254 dev eth1"
I've seen here how to create a bridge in Windows for qemu -> https://wonghoi.humgar.com/blog/2021/05/03/qemu-for-windows-host-quirks/
I've tried to follow that tutorial and then running my emulator with the following:
.\emulator -avd Nexus_6P_API_24 -qemu -device virtio-net-pci,netdev=hn0,mac=52:55:00:d1:55:51 -netdev tap,id=hn0,ifname=TAP,script=no,downscript=no
It runs, and I've a new device under eth1 in which I can use dhcptool to obtain IP..
And it works!