I have setup virtual box for android emulator. Everything was fine till now, but when I am trying to connect to add to virtual box it is throwing me the message:
unable to connect to 10.0.2.15/24:5555
I have Win 7 machine
Please help me to resolve this.
I am answering the question so that any one can use it if they similar error
Removed the virtual device and installed the again. This time I changed the network adaptor from NAT to Bridge Adapter in settings.
Pressed Alt+F1 and typed netcfg, Noted down the IP and got successfully connected from command prompt using adb connect to IP.
Related
img
here is the image. I can't find my app's process, but others I can see. why did this happen? what should do? Thanks.
Some possible solutions:
On your notification bar, expand it and click the connection. Then select connect as Camera (PTP) (not as media device)
Try with another USB cable.
Go to your SDK manager and install Google USB Driver (I see you updated your answer regarding this)
Follow the instructions on OEM USD Drivers
if you get errors like below:
Unable to get view server version from device;
Unable to get view server protocol version from device
Unable to get the focused window from device
Unable to debug device
try to check these points below:
if signed app running on the phone, DDMS can't get the process info;
otherwise, can.
if use Virtual Device, then the DDMS&HierarchyView is useful;
reinstall app from IDE (if app process running stop it from IDE or force stop if through android setting)
if nothing happened try restart ADB
$ adb kill-server
$ adb start-server
when I tried to open genymotion in android studio ,
Unable to start the virtual device.
VirtualBox cannot start the virtual device. To find out the cause of the problem, start the virtual device from VirtualBox.
more information, check the log files.
Please refer to: www.genymotion.com/faq/logs
or that said :
According to your error log,
:Failed to open/create the internal network
'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter #2'
(VERR_SUPDRV_COMPONENT_NOT_FOUND). Failed to attach the network LUN
(VERR_SUPDRV_COMPONENT_NOT_FOUND). Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap Interface: IConsole
{872da645-4a9b-1727-bee2-5585105b9eed}
Open "Network Connections" from control panel, select the "VirtualBox Host-Only Network" right click and check if "VirtualBox NDIS6 Bridged Networking Driver" is enabled from properties.
If the settings looks alright but the device doesn't starts, Uninstall both of the VirtualBox and Genymotion, reinstall a new package that contains both of the VirtualBox & Genymotion together in a single package. See here,
PS: Try restarting your PC making installing/uninstalling the VirtualBox.
My OS is Windows 7 Pro, and I installed Android Studio 2.1, which is the latest version at the moment, and I followed the instruction from this video tutoril to install and setup Genymotion, I did each step exactly as the video shows, but in the end I cannot run my app on the virtual device created in Genymotion(but in the video, it works fine), what I got is:
As shown in the screenshot, the emulator on the left is started from the Geny plugin in AS, and the right dialog is what I got after I click Run button, it seems that the virtual device is not recognized by AS.
The Event Log is:
11:18:01 PM error: could not install smartsocket listener: cannot
bind to 127.0.0.1:5037: Only one usage of each socket address
(protocol/network address/port) is normally permitted. (10048)
11:18:02 PM could not read ok from ADB Server 11:18:02 PM * failed to
start daemon * 11:18:02 PM error: cannot connect to daemon 11:18:02 PM
'C:\Users\Vincent\AppData\Local\Android\Sdk\platform-tools\adb.exe,start-server'
failed -- run manually if necessary
What I have tried so far:
Firstly, I found this post: Android Studio Unable to Find Genymotion Device, which gives a link of a discussion in google forum: https://groups.google.com/forum/#!topic/genymotion-users/ov5ANqGf3DI.
From the discussion, one named Jordan said that two things need to be done: "bridged adapter" and "port forwarding". But in the setting panel of VirtualBox on my PC, what I found is:
If I set Adapter2 as bridged adapter, the 'Port Forwarding' button will be disabled. So I cannot do both things at the same time. I tried bridged adapter first, it didn't work, and then I set it back to NAT as default, added the port forwarding rule, ran the adb command as explained in that post.
BTW, the approach they told to find the ip address didnt work for me, I could not install play store into that virtual device, so I figured out the virtual device's ip address from VirtualBox.
Anyway, neither of them works so far.
Secondly, I tried the approach in this blog: http://scrumsofanarchy.com/adb-over-wi-fi-with-genymotion-android-emulator/, and ended up with nothing, coz basically I cannot install any app into the virtual device.
Thirdly, I tried the approach in this post as well: android studio - emulator doesn't work and genymotion doesn't get recognized. My Genymotion is using the SDK installed by AS now, but that doesnt fix the issue.
I am running out of options now, any help is appreciated, thanks!
Just install GPU Debugging Tools 3.1 in Android SDK Mangaer ;-)
Genymotion is giving me this error after the Windows 10 upgrade:
Unable to load virtual box engine
How to fix this?
I solved this issue. It's working fine now.
I'm using:
+ Window 10
+ VirtualBox-5.0.2-102096-Win
+ Genymotion-2.5.3
Step 1: We should set Run as this program as an administrator & Compatibility mode Window 7 for those file.
C:\Program Files\Oracle\VirtualBox
+ VBoxHeadless.exe
+ VBoxManage.exe
+ VirtualBox.exe
C:\Program Files\Genymobile\Genymotion
+ genymotion.exe
Step 2: My Computer -> Manage-> Device Manager-> Network adapters
Remove all items with name: VirtualBox Host-Only Ethenet Adapter #...
Step 3: Open Virtual Box and go to File -> Preferences -> Network -> Host Only Networks
Remove all and create new host with information:
Adapter Tab:
IPv4 Address: 192.168.1.201
IPv4 Network Mask: 255.255.255.0
DHCP Server Tab:
Server Address: 192.168.1.100
Server Mask: 255.255.255.0
Lower Address Bound: 192.168.1.101
Upper Address Bound: 192.168.1.199
Step 4: Run Genymotion again. It's will work.
=====> You can see here
I used to have the same issue. I've download VirtualBox 5 an reinstall it (or repair) over the old install. Reboot and that's it.
Worked for me:
-Changed Network on VB to HOST ONLY
-Changed on Win 10 network configuration to obtain dynamic IP
1.Remember machine images' paths/locations in VirtualBox. Bakup them.
2.Go to
[enter link description here][1]http://www.tenforums.com/tutorials/2087-hyper-v-virtualization-setup-use-windows-10-a.html
Only part two.Follow those instructions.
3.remove machines from VirtualBox(but dont check 'delete files'). Remove adapters from 'network adapters' in device manager. Thier name starts with 'Virtual...'.
Close VirtualBox.
start genymotion.
Will work.
After Windows Anniversary update Genymotion stopped working,
It always raised an error dialog saying (not exact but something like this) "Failed to start the virtual machine, Please start Virtual box to see the error details".
I had tried many solutions some of them were saying open Virtual box and make some changes to it, but my issue was Virtual box itself was not starting up explicitly,
I had observed that process starts up and gets killed after few seconds, Then I realized, the problem is actual with a virtual machine.
And when I was looking for it I came across this thread which says there is Bug in the virtual box, just download and install the latest setup file for a Virtual box. Thereafter at least you will be able to start the virtual machine,
After this, if you face some issue you can follow aLoi Ho answer above
I tried all the possible options given on net and on this site, but none of them worked.
I am getting:
Launch error: Failed to connect to remote VM. Connection timed out.
when I am trying to debug my application on my mobile device.
the application runs properly with out any issue when I am running normally
I have used at lease these links by now:
How to resolve "Waiting for Debugger" message?
Eclipse issue - Launch error: Failed to connect to remote VM. Connection timed out
Eclipse Error: "Failed to connect to remote VM"
Launch error: Failed to connect to remote VM
https://forums.oracle.com/forums/thread.jspa?threadID=653343
None of the above seem to work.
Go to Window -> Preferences -> General -> Network Connections, and check if there is any proxy set here, change the 'Active Provider' to be 'Direct' and try again.
I dont know why, but this works for me:
First Run(or Debug) your application in an emulator and then Debug the application on the device (without closing the emulator).
let me know if this works for you.
I've been having the same frustrating problem. I finally found something that is working for me: making sure localhosts is being resolved correctly (and really explicitly).
Test to see if it works when your development machine is not connected to the net (no WiFi, no network cables). If it does work under those conditions, then it may be that you need to make sure that addresses are resolving to localhost properly. The messages that DDMS and adb.exe use for debugging and communicating to the VM must properly resolve to localhost on your machine. (Yes, it's odd that other commands using DDMS & adb work just fine but debugging doesn't. Seems that something in DDMS or adb needs to be standardized so they all work under the same conditions.)
If you need to make sure that things are resolving to localhost properly:
1) Make sure that this line is in your /Windows/System32/drivers/etc/hosts [windows] (or etc/hosts [*nix] file:
127.0.0.1 localhost
(you can have any amount of whitespace between "127.0.0.1" and "localhost")
2) If that doesn't work, then you may need to also add your PC's IPv4 address to the hosts file, and resolve it to localhost. (You can find out the IPv4 address for your machine with the ipconfig command.) If, for example, your machine's IPv4 address is 192.168.1.100 then you'd add the line
192.168.1.100 localhost
to your hosts file. (You can add it below the "127.0.0.1 localhost" line in the file.)
I had (1) in my hosts file but it still wasn't working (unless my PC wasn't connected to the net). I tried (2) on a bit of a guess, and that worked for me.
BTW: You can verify that adb (and your emulator if you're running one) is listening on ports by using the netstat -b command. (Note that on Win7 you need admin privileges for the -b option. I open a command window using "Run as Administrator.")
May seem like an obvious answer but make sure you don't have two emulators running - 5554; 5556; ... The debugger has difficulty setting the port when it doesn't know which one to connect to.