开发者

Eclipse Android X86 Cannot connect to 127.0.0.1

开发者 https://www.devze.com 2023-04-11 01:50 出处:网络
Running Eclipse Build id: 20110615-0604 开发者_JS百科 Android SDK & AVD Manager (setup in eclipse)

Running Eclipse Build id: 20110615-0604

开发者_JS百科

Android SDK & AVD Manager (setup in eclipse)

Android X86 2.3-RC1.eeepc.iso

Oracle VM VirtualBox Version 4.1.2.r73507 (installed and running android)

In the VM using Alt F1 and the command netcfg produces:

Android root@eeepc:/ # netcfg
lo UP 127.0.0.1  255.0.0.0  0x00000049

The path for Android is set in eclipse to C:\android\android-sdk

In the tools directory I use the command 'adb kill-server' I then use 'adb connect 127.0.0.1' which produces:

unable to connect to 127.0.0.1:5555

I have a virtual device setup already in Eclipse using the AVD manager and this works perfectly - though very slowly, hence the need to use X86.

When the working emulator is running the command 'adb devices' produces:

List of devices attached
emulator-5554 (the slow emulator)

When the slow emulator is running and I then use the command 'adk kill-server' and use the command 'adb connect 127.0.0.1' it produces:

C:\Android\android-sdk\platform-tools>adb connect 127.0.0.1
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 127.0.0.1:5555

So then I go back to:

C:\Android\android-sdk\platform-tools>adb kill-server

C:\Android\android-sdk\platform-tools>adb connect 127.0.0.1
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 127.0.0.1:5555

C:\Android\android-sdk\platform-tools>adb devices
List of devices attached
emulator-5554   device
127.0.0.1:5555  device

But the new X86 device, presumably at 127.0.0.1:5555 doesn't appear in the AVD manager. Should it? I'm stumped.

I've googled everywhere so any help would be greatly appreciated. Thanks.


Hello James, I tried a similar set up and I got the same error as you. I eventually gave up using virtualbox. After struggling for two days I switched to using vmware and I had to use a different image. I used the following image: http://android-x86.googlecode.com/files/android-x86-2.2-r2-eeepc.iso and for the vmware set up I followed this tutorial: http://vmetc.com/2010/12/27/install-androidx86-in-a-vmware-workstation-vm/

Do not skip over the part that says to edit the virtual machines configuration file. I hope this helps.

You might also want to consider using the android image provided by http://www.vmlite.com/ it worked right away for me and I connected using "adb connect 127.0.0.1"


I had the same problem of "unable to connect to 127.0.0.1:5555". I then found here:

http://www.android-x86.org/documents/debug-howto

...

2.using adb with a NAT'ed VM

•The steps above work nicely if you have a VM which is set up to use Bridged or Host-Only adapters •However, if you have a NAT'ed VM you cannot connect to the VM IP from the host •You will need to set up port forwarding for a host port to be forwarded to the VM port 5555 (which is adb) VBoxManage modifyvm --natpf1 adb,tcp,,,,5555 Example from one machine: VBoxManage modifyvm froyo --natpf1 adb,tcp,,5555,,5555 •Once this is done, you should see the local port (i.e. 5555 in this case) bound on the host via netstat -a •You can now connect to the VM by adb localhost:5555

That solved the problem for me. Good luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号