Connecting an AVD with an android device I want to test an android application using WiFi-Direct, and i want to ask if i can connect an virtual device created with VirtualBox with my real device android ?  thanks in advance.
No you cannot connect an virtual device. Because Avd of pc is just simulator and doesnt have facility to such connections. You can check wifi in avd using internet connection of pc or VirtualBox but not to your real wifi.