开发者

How can I get my android emulator use my computer's VPN interface?

My company requires VPN to connect to our dev systems and for the first time I'm trying to work on an android app from home. Turns out the emulator doesn't want t开发者_运维知识库o use the VPN interface so even though I have connectivity to our dev systems on my VPN-connected laptop the emulator that's running on it does not.

I have thought of 3 solutions to this:

  1. run a VPN client on the emulator, but I was hoping for a simpler solution than that
  2. setting up a proxy server on my local machine
  3. forwarding a port on my local machine

2 and 3 can probably work, but I'd still like to know if there is an easy way to get the emulator to use the VPN interface without a workaround.

I'm running OS X 10.7 and I've already tried adjusting the interface priority order with network>>set service order.

I suppose I can dust off the old dell and try it there, but I would expect the same results.


First start your vpn connection and then restart the emulator, now the emulator should use the host vpn connection.

it's mostly because of the DNS issue, according to the android doc:

At startup, the emulator reads the list of DNS servers that your system is currently using. It then stores the IP addresses of up to four servers on this list and sets up aliases to them on the emulated addresses 10.0.2.3, 10.0.2.4, 10.0.2.5 and 10.0.2.6 as needed.


How can I get my android emulator use my computer's VPN interface?

I encountered this issue and tried something on dns settings but I could not solve it. As @machado said in the comment section below you should boot the emulator via "Cold Boot Now" option. I hope this helps.


What I do on my mac is just make sure 'send all traffic over vpn' is checked. You'll find this setting after you click advanced while having your vpn connection selected in network preferences.

Works well for my situation, but may not depending on the type of VPN you're connecting to.

How can I get my android emulator use my computer's VPN interface?


I had the same issue and solved it by connecting to cisco vpn after the android emulator has started and connected to the internet.

Works for me in windows 7


I setup a vpn connection on Windows. Then I started the emulator. The emulator and everything on my pc started to use that vpn connection.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜