Genymotion emulator no internet connection - android

I am trying to connect my genymotion emulator to internet and got this message:
emulator network configuration:

On Mac Os I solved No Internet Connection Problem on Genymotion emulator using next steps:
Go to Android Settings -> System -> Developer Options -> Turn On Developer Options
In Settings go to Network & Internet -> Mobile Network -> Turn Off Data Roaming
In Settings go to Network & Internet -> Data usage -> Turn Off Mobile Data
In Settings go to Network & Internet -> Wi-Fi -> Turn On Wi-Fi
And Internet Connection should be established. Also restarting the emulator may be required.
I didn't change anything in VirtualBox:

Best network configuration for an optimal use of Genymotion
To run properly, Genymotion uses two different network configurations:
An internal and technical network (Network > Adapter 1 of VirtualBox settings)
This network is used for example to display the virtual device screen or forward events (clicks or widgets) to the virtual device.
Changing this network configuration may prevent Genymotion to run properly.
If you get the message Unable to connect to the virtual device, please refer to When I start a virtual device, why does the window remain black?.
A network simulating access to your local network and to the Internet (Network > Adapter 2 of VirtualBox settings)
You can configure it as desired, but be aware that an error in this configuration may prevent Genymotion to access the local network and the Internet.
We recommend that you use the following configuration:
NAT, if you are using Genymotion on your local machine.
Bridged Adapter, if you need your virtual device to use an IP address of your local network (a DHCP server in your local network is required).
Currently, this network is regarded as the Wi-Fi connection of your virtual device.
Reference:
https://www.genymotion.com/#!/support?chapter=network-configuration#faq

First of, check your VirtualBox Host-Only Network #2 in: Control Panel\Network and Internet\Network Connections, has the correct properties as follows:
Navigate to Control Panel\Network and Internet\Network Connections and Right click the Connection: VirtualBox Host-Only Network #2
Select Properties
From the popup, activate the VirtualBox NDIS6 Bridged Networking Driver by checking/ticking the check-box and click OK
Lastly, navigate to Oracle VM Box\Google Nexus 7 4.4.4 ...\Settings\Network\Adapter 2 and enable the Network Adapter 2.
Hope this helps resolve your issue.
PS.
If you are connected via wireless and you have followed the above, do try un-checking the cable connected check box under Adapter 2 as shown in the image below.

Try this:
Just turn Wifi on and select WiredSSID network.

1) Open the Oracle VM VirtualBox manager
2) Settings->Network
3) Select the Adapter 2 (Adapter 1 is used primary by Genymotion and cannot change)
4) Select the NAT
5) Restart the VM and Genymotion
Otherwise:
Try on the virtual device > go into Settings > Wi-Fi > Select the IP automatically > After that just click on Done > and now... connected to the internet.

try to uninstall your android virtual device that cannot access internet in genymotion, and re-install a new virtual device. I tried and fixed.
The reason I guess is I installed genymotion and add virtual device before install the virtualbox.

Update Virtualbox and clear-cache work in my case
update virtualbox
genny motion - preference - misc - clear-cache -> restart emulator

I faced the same issue and followed all above instructions, but not worked.
Open Oracle VM Virtual box
Select the custom phone ->right click->settings->General->Basic
Change the type to your current OS (My case Mac OS X)
Choose Version of the Mac OS (64 bit)
Only this solved my problem.

My problem was that I changed the IP of my machine, and I already had the vitual device configured. To solve, I clicked on wifi on the virtual device, clicked on the WiredSSID network and chose the "forget" option.

Open the Oracle VM VirtualBox manager, Settings->Network, Select the Adapter 2 because Adapter 1 is used primary by Genymotion and that's why each time you change it and restart the vm it reset itself to old settings, using Bridged Adapter and select the working network card. if you are behind proxy, please use NAT

In my Mac, genymotion device's WiFi was off. So I solve this issue only by turning on the WiFi. and internet starts back to work

Try to ping your VM ip :
ping 192.168..
it is possible that a firewall blocks the connection. try to stop it : go to process and search for firewall and stop it.

I had similar issue:
I had a LAN cable internet connection to my laptop. (No wifi )
In Genymotion, I opened wifi and there was a wifi network available , just connected to that network. Then it worked.
(But actually I haven't turned my modem wifi, I think its some kind of virtual wifi)

In your Computer go to Control Panel > All Control Panel Items > Network Connections then change the Network Adapter Preferred DNS Server to 8.8.8.8 which is Google Server

Below steps helped me:
(i) Enabled network from sidebar
(ii) Enabled Developer Options

Late but I had a similar issue when running Genymotion(3.2.1) on Windows10
I had the Windows "Virtual Machine Platform" on as I was using WSL2
I disabled it,restarted my system and Genymotion got connected to internet.
Hope someone finds this useful.

What worked was pulling down the notification bar and clicking the Wi-Fi icon to turn it off and then back on again 😂

Related

USB debugging on physical device within a virtual machine development environment

I have a development environment set up in a Hyper-V virtual machine (Windows 10). Using Visual Studio 2019 as my IDE with Xamarin (a monodroid project).
My physical device is unable to "passthrough" due to decisions made by the Hyper-V designers, from what I've read.
I have also tried to use workarounds, unfortunately, the device does not show up (even in Device Manager) in the Guest machine.
I was unable to see the device (within the IDE) initially, however, after some research and work, I've managed to get the device showing. I used this to "trick" adb running on the Guest to see the device (which is connected to my physical machine).
Host machine runs the script with IP 192.168.1.13 on port 6037 (adb daemon runs on 5037, which is default). Guest machine runs the script, with remotehost set to the Host IP, with the same port. I believe this configuration is fine, according to the documentation.
Unfortunately, even though I am able to deploy to my device, the debugger is unable to connect, and I receive Cannot start debugging: Cannot connect to 127.0.0.1:29300: No connection could be made because the target machine actively refused it 127.0.0.1:29301
Couldn't connect debugger. You can see more details in Xamarin Diagnostic output and the full exception on logs.
From what I have gathered, the debugger is trying to connect to localhost, and since the IDE is running within the Guest, the physical device will not be at localhost:29301. I assume if I could get the IDE to connect to 192.168.0.13:29301 (Host IP) instead, it would find the device, given that's where it is connected.
When I run adb devices, both the Host and Guest show the physical device, and after attempting to run the debugger, running adb forward --list, the forward rules are as such:
V4QBB18807150883 tcp:29300 tcp:29300
V4QBB18807150883 tcp:29301 tcp:29301
I can also see in Xamarin Diagnostics that setprop "debug.mono.extra" "debug=127.0.0.1:29302:29303,timeout=1585047190,loglevel=0,server=y" is executed. I assume manipulating that would give me some joy, but, I don't know how.
I'm not too familiar with adb and networking, so anyone with more experience in the matter could shed some light on my situation.
How can I get the debugger (within the Guest) to connect to my physical device?
PS: I've searched a lot before asking here. I know this exists: How can I connect to Android with ADB over TCP? and even after trying multiple answers on that page, I was unable to solve my problem.
After considerable amount of research, I came across this. Instead of searching for a way to set up adb port forwarding, I tried to see if there was a way to set up a USB passthrough via Hyper-V.
If using RDP is an option (directly connecting through "Hyper-V Manager" also works):
On host machine
Press Win+R type gpedit.msc and hit enter
Go to Computer configuration > Administrative templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client > RemoteFX USB Device Redirection
Select the only GPO there and Enable it and change the access rights to "Administrators and Users"
On VM:
Press Win+R type gpedit.msc and hit enter
Go to Computer configuration > Administrative templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection
Select GPO "Do not allow supported Plug and Play device redirection" and disable it
Reboot both machines...
You may need to force update Group Policy, as per this comment:
I had to force update group policy (gpupdate) for it to take effect. Just shutting down and restarting both host and vm wasn't enough. Thanks
Eventually, after carrying out those steps (I ran gpupdate and restarted both machines), I had an extra option of listed devices, "Other supported RemoteFX USB devices", within that was my physical device. After checking the tick box, the VM detected the device without the need to port forward.
This can potentially cause security risks allowing a passthrough like this, however, my VM is not public and only accessible via my Host.
I would appreciate if someone in security could comment on the possible security risks just to inform myself and potential others that come across this post.
This is an old post but for anyone stumbling upon it, I found an alternative way to connect a physical device to a Hyper-V VM. I was able to get this working on a Hyper-V VM running Ubuntu 20.04. There was no way I could edit the group policy so instead I found a way to connect my VM to the same wifi as my device. Once connected, I could use Android Studio to pair it that way.
I followed the guidance here: https://superuser.com/questions/1403016/how-do-i-setup-a-working-wifi-internet-connection-on-windows-10-hyper-v
Open Hyper-V Manager
Click "Virtual Switch Manager"
Click "New virtual network switch"
Name: NAT, Connection type: "External network", Select the correct network adapter. Tick "Allow management operating system to share this network adapter.
Right click Ubuntu, select "Settings"
In Network Adapter, Virtual switch, select "NAT"
Go to "Control Panel > Network and Internet > Network Connections" in Windows 10
Right click the network adapter that is in use. For me, it is "Ethernet 2"
"Properties > Sharing", tick "Allow other network users to connect through this computer's Internet connection" and select "vEthernet (NAT)" in the drop down.
Tick "Allow other network users to control or disable the shared Internet connection", then OK.
Start Ubuntu virtual machine and test!
Once I followed those steps, Android Studio was able to pair with my device over the wifi.

Wi-fi not connecting to Android Studio emulators

My windows m/c's Wi-fi not connecting to Android Studio emulators. I have been using Emulators last one year or so, I have never faced this type of issue. Whenever I was starting Emulators, Wi-fi was getting connected immediately automatically. But last few day it wasn't happening. Wi-fi not getting connected in Emulators. I have tried so many things but it couldn't get solved.
Interestingly Wi-fi connecting in Genymotion android emulators.
Android studio setting
Settings/Appearence & Behaviour/System settings/HTTP Proxy
No Proxy Enabled.
Emulator setting
Try to update the version of Android Studio to the latest one and when creating a new emulator make sure that the emulator has GooglePlay service enabled,
as also shown down below:
I hope this will save your troubles.
After super struggle I found answer. For windows o/s go to
Control Panel\Network and Internet\Network Connections
Select your internet connected adapter
Right click--Properties
Check & Select IPv4(if already checked IPv4 than select so property will be activated)
Click properties
Check 2nd radio button-- Use the following DSN server addresses
Enter DNS address as 8.8.8.8 click Ok.
To not to confuse, IPv4 =Internet Protocol Version 4(TCP/IPv4) option
That's finish..Enjoy

Genymotion overrides dhcp of virtualbox network adapter

I am running an android image with genymotion 2.8.0 and virtualbox 5.0.28 on osx. My network has a router with dhcp 192.168.1.1 and I want to access my host system (the mac) from android by using 10.0.2.3 or the IP of the MAC. The problem is that the virtual network adapter is always getting an ip in the wrong net vboxnet1 => inet 192.168.57.1
Therefore I tried to changed the interface by setting the dhcp settings. Now every time when I do start the image with genymotion the dhcp settings are getting overridden as show in the screenshot.
So how can I persist the dhcp settings?
The Cause of the Problem
Genymotion is rewriting your network settings in VirtualBox because it has it's own way to handle network connection. That is due to the fact that Genymotion needs to make the android emulator think it has a cellular network or WiFi connection.
Defining Network Through Genymotion Settings
Because you said that Genymotion keeps resetting your VirtualBox's network configurations, I think it might have something to do with Genymotion's own network configuration.
In order to define your network setting in Genymotion, you need to do the following:
Open Genymotion => Settings => Network tab. You will get the following screen and in there you need to enable HTTP Proxy:
It is called a proxy, but it is supposed to work as kind of a "bridge" between your machine's DHCP and the emulator.
You might need to define the connection inside android system too, depending on the case.
If so, inside the emulator itself, go to: Settings => Wi-Fi => Long Click on WiredSSID => Modify network => Advanced options and modify the setting there too accordingly.
If that's not helping, you might need to change the specific setting of your emulator's virtual box:
Network Configuration via Virtualbox Settings
Genymotion uses two different kinds of network configurations in VirtualBox in order to operate.
An internal and technical network (defined in Network =>
Adapter 1 of VirtualBox settings) that helps Genymotion to display
the virtual device screen or forward events (clicks or widgets) to
the virtual device. This network configuration needs to remain untouched. Changing this may prevent Genymotion to run properly.
A network simulating access to your local network and to the Internet (defined in Network => Adapter 2 of VirtualBox settings). This network configuration is the one responsible for the emulator's internet connection.
So, you can configure Network => Adapter 2 of VirtualBox settings as desired, according to the following cases:
Use NAT, if you are using Genymotion on your local machine.
Use Bridged Adapter, if you need your virtual device to use an IP address of your local network (a DHCP server in your local network is required).
You will need to choose the Bridged Adapter option, in your case.
Make sure to change that setting in your specific VirtualBox device.

How to enable Genymotion emulator to use the WIFI internet the host is using

The app I am running on Genymotion emulator needs internet. The internet does not seem to work on the Genymotion emulator. I tried to confirm this by opening the browser, and this is what I got:
I am running Windows 7 on my laptop and using the Wifi internet. I opened Oracle VM Virtual box, navigated to Settings > Network, and the following two images show what I see there:
So how do I enable the emulator to use the internet from my computer?
Note: Please tell me in layman terms. I saw articles and questions talking in terms of IP addresses and other things which are strange for me.
EDIT 1:
goto settings in the device and turn on the device wifi, in the android OS. You haven't mentioned it in your post I'm just covering the basic solutions here.
Simply choose the Host-only Adapter for Adapter 1 and NAT for Adapter 2.
Make sure the cable-connected is selected(ticked).
Host-only can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.
This works for me.
Hope it helps.
Try just turning on the WiFi in GenyMotion and selecting the WiredSSID.
I know this question been answered, but thought a picture would be easy to understand. Hope it helps.
No of the above solution worked for me, I fixed the issue by changing the ip address settings on the adapter by going to File >> Preferences >> Network in VirtualBox:
Adapter
IP: 192.168.217.2
Network Mask: 255.255.255.0
DHCP Server
Server Address: 192.168.217.100
Server Mask: 255.255.255.0
Lower Address Bound: 192.168.217.101
Upper Address Bound: 192.168.217.254
Go to settings >> Network in VirtualBox: adapter 1 >> advanced >> MAC address button generated new mac address.
I hope it solves the problem.
Go to your PC Ethernet or WIFI Settings and change the Adapter Preferred DNS Server to 8.8.8.8
In Genymotion,
Go to settings of your device and make sure adapter that you have selected is NAT(Default) not bridged or anything..
Now, make sure that your PC is connected to Internet...
It will work , most probably

genymotion generic unknown error

I have recently downloaded Genymotion in hopes of having a speedier emulator for working in Android Studio. Everything looks like it downloaded correctly, and I have linked my Genymotion to my Android Studio. The problem is when I try to sign into Genymotion, it keeps saying "unknown generic error." I have contacted Genymotion many times about this issue, and they have not gotten back to me. I even tried re-downloading Genymotion, and creating a new account. Nothing seems to help.
In your GenyMotion go to:
Settings -> Network
Check Use HTTP Proxy
Insert HTTP Proxy and Port
Click "OK"
Now try to login genymotion.
Hopefully it helps
Mine got resolved by doing the following:
Opening Virtual Box -> Preferences -> Network - > host-only networks -> Edit Virtual Host-Only Ethernet Adapter -> DHCP Server -> uncheck Enable server.
it may help some.
I had the same issue but I solved it by this steps
1. get your Ip address that you use it to enter internet
2. open network and sharing center
3. open virtualbox host-only network
4. put your internet Ip as default gateway and prefered dns server
it should work after that.
Explanation: virtual machine made a network card and give it default IP "192.168.56.1" if this IP can't access internet so you can't login so but your internet ip as default gateway and dns
that's worked for me.
I had the same issue and I logged in at Genymotion website and then I tried logging in with app. It worked for me.
Almost like #Flowra mentioned:
Find the IP address and default gateway of your network (cmd ->
ipconfig).
Open Network and Sharing Center and click on Virtual Box host only Network.
Click Properties -> IP4 Properties
Put your network's default gateway (eg. 192.168.1.1) in the default gateway and your IP address as the Preferred DNS Server
Then restart Genymotion.
I fixed it by enabling network access in AhnLab Internet Security blabla installed in my computer.... That app is blocking the network access in Genymotion...
I have faced the same issue...
First
Open Virtual Box -> Preferences -> Network - > host-only networks -> Edit Virtual Host-Only Ethernet Adapter -> DHCP Server -> uncheck Enable serve
Then
Open setting "Open Network and Sharing Center" > Change Adaptor Setting > Right Click on "Virtual Box Host-Only Network" > Properties > Select "Internet Version Protocol 4 (TCP / IPv4)" > Click on "Properties" Tab > Check "Obtain IP Address Automatically" as well as "Obtain DNS Server Automatically"
At this point, the problem still wasn't solved
Finally
Open Antivirus >Internet & Network > Programme Rules > Allow Genymotion
and it's done!
Try different types of networks. If it fails, click the login-in button more than one time, and then it will work.
I use window 7 n use Internet Connection by wireless, not LAN cable.
Open settiing "Open Network and Sharing Center"
I've 2 network :
2.1 Wireless connection (that have Internet connection)
2.2 VirtualBox network (that no network to access internet)
Check my IP Address from wireless connection (2.1)
Example : 192.168.aa.bb subnet : 255.255.255.0 gateway: 192.168.aa.1
Open my VirtualBox network n I found this:
IP Address : 192.168.xx.yy subnet: 255.255.255.0
Make IP from Wireless as Preferred DNS Server
Change subnet from VirtualBox to 255.255.0.0 (because aa different with xx, so I use subnet class B --> 255.255.0.0)
And I successfullly login in genymotion to choose n download new virtual device.
So, this is my final setting for VirtualBox network:
IP address: 192.168.cc.dd
Subnet: 255.255.0.0
Default gateway: -empty-
Preferred DNS server: 192.168.aa.bb --> IP my internet connection (2.1)
Alternate DNS server: -empty-
Hope my answer can help U.
The way i fixed it:
1.- Unplug LAN cable, connect to my WiFi network
2.- Retry to sign in to Genymotion
And it worked :-)
If "Remember my credentials" is checked, try logging in with it unchecked. It asked me my credentials every time, but it works.
I faced the similar problem, I just unchecked the http proxy setting in Setting->Network->Use http Proxy, and logged in. The problem is solved.
If this does not work go to Genymotion Site and try edit the password and try again.
Hope this will help.
(worked with my case)
In your GenyMotion go to:
Settings -> Network
Uncheck Use HTTP Proxy
Just login to the website, https://www.genymotion.com (on your browser) and your problem will be fixed.
If doesn't: Search for your WiFi's server IP (ex. 192.168.1.1).
Go open your VirtualBox>Preferences>Network>Host-Only Network.
Edit: VirtualBox Host-Only Ethernet Adapter
Change IPv4 Address to your Internet's IP and also all other similar to the former number you've replaced.

Categories

Resources