Hi! Im trying to connect a virtual device created with genymotion QEmu hypervisor to internet but I can’t manage to set the device online in adb devices and when i try the solution in this post from Genymotion
https://support.genymotion.com/hc/en-us/articles/4402754157969-How-to-access-a-local-host-or-service-from-a-virtual-device-
for example, using:
adb reverse tcp:80 tcp:80
all I get is:
adb: error: device offline
I’m pretty lost here
if anyone wants to help me i would really appreciate it 
Could be because you are trying to use a privileged port. Run the service on a non-priviliged port such as 8080 or 5000.
I still get the same result
adb reverse tcp:8080 tcp:8080 adb: error: device offline
the same with 5000
EDIT:
I tried to check for listening port to see if that info can be usefull
sudo lsof -i -P -n | grep LISTEN ✔
[sudo] contraseña para xxxx:
cupsd 626 root 6u IPv6 17542 0t0 TCP [::1]:631 (LISTEN)
cupsd 626 root 7u IPv4 17543 0t0 TCP 127.0.0.1:631 (LISTEN)
uget-gtk 2349 xxxx 3u IPv4 26241 0t0 TCP 127.0.0.1:14777 (LISTEN)
dnsmasq 8995 nobody 6u IPv4 69348 0t0 TCP 192.168.100.1:53 (LISTEN)
dnsmasq 9097 nobody 6u IPv4 84030 0t0 TCP 192.168.122.1:53 (LISTEN)
adb 45273 xxxx 9u IPv4 238785 0t0 TCP 127.0.0.1:5037 (LISTEN)
ktorrent 88608 xxxx 35u IPv6 428894 0t0 TCP *:6881 (LISTEN)
qemu-syst 89016 xxxx 12u IPv6 439419 0t0 TCP [::1]:23555 (LISTEN)
qemu-syst 89016 xxxx 13u IPv4 439420 0t0 TCP 127.0.0.1:23555 (LISTEN)
qemu-syst 89016 xxxx 23u IPv4 425863 0t0 TCP *:25000 (LISTEN)
qemu-syst 89016 xxxx 24u IPv4 425864 0t0 TCP *:24810 (LISTEN)
qemu-syst 89016 xxxx 25u IPv4 425865 0t0 TCP *:24800 (LISTEN)
qemu-syst 89016 xxxx 26u IPv4 425866 0t0 TCP *:24296 (LISTEN)
qemu-syst 89016 xxxx 27u IPv4 425867 0t0 TCP *:24297 (LISTEN)
qemu-syst 89016 xxxx 28u IPv4 425868 0t0 TCP *:22468 (LISTEN)
qemu-syst 89016 xxxx 29u IPv4 425869 0t0 TCP *:6379 (LISTEN)
qemu-syst 89016 xxxx 30u IPv4 425870 0t0 TCP *:6555 (LISTEN)
The service is supposed to run on your host system e.g. a REST api - so if you have no service running on your host using the specified port - it won’t work.
It is not an internet connection per se - more like an internal network connection allowing you to test how an app would work when talking to the specified service.
So I tried killing the server and restarting it to see if the device would become online:
adb kill-server && adb start-server 1 ✘
* daemon not running; starting now at tcp:5037
* daemon started successfully
Then I Tried to set the port 5037 use 6881 used by kget but i still get the same result:
adb reverse tcp:5037 tcp:6881 1 ✘
adb: error: device offline
I checked if 6881 it’s open and I think it is:
sudo netstat -tulpn | grep LISTEN | grep :6881 0|0|1 ✘
tcp6 0 0 :::6881 :::* LISTEN 88608/ktorrent
I think the problem is the device been offline and as it’s a virtual device I have no idea on how to set it online, the device is running but still appears offline
EDIT: restarting the adb server and the android virtual device seems to set the device online, now i get:
adb devices 1 ✘
List of devices attached
127.0.0.1:6555 device
and when I use
adb reverse tcp:5037 tcp:6881 ✔ 5037
but still no connection
EDIT 2:
I think i was using and incorrect TCP for the device, as it say in devices list the TCP is 6555 but!!!, even using the correct TCP still the results are the same, no connection, I tried to bind 6555 with ports used by programs with internet connection and nothing, I mounted an a server in 8000 and set that port for 6555 and the result is the same
…
I don know what to do 