Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator doesn't use Windows host file?

m3 http://img245.imageshack.us/img245/461/65254534.jpg

Chrome using the windows' HOST file:

m1 http://img266.imageshack.us/img266/9380/59750633.jpg

Android emulator:

m2 http://img821.imageshack.us/img821/7363/19470766.jpg

edit

"On Windows, the emulator obtains the addresses by calling the GetNetworkParams() API. Note that this usually means that the emulator ignores the content of your "hosts" file (/etc/hosts on Linux/OS X, %WINDOWS%/system32/HOSTS on Windows)."

how can I use static IPs in the emulator?

like image 365
Sirber Avatar asked Aug 12 '10 14:08

Sirber


1 Answers

I got this article, it explains how to edit the hosts file. I don't know if it works yet, bit it might help.

BROKEN (Feb 2015) - http://www.bradcurtis.com/2011/02/13/hosts-file-google-android-emulator/ (Leaving it in case it recovers)

If I'm not wrong, they moved the link here, I'm not sure if it's the same article, I haven't touched this since may 2012. http://www.bradcurtis.com/hosts-files-and-the-google-android-emulator/ (Mirror Link https://web.archive.org/web/20180615121728/http://www.bradcurtis.com/hosts-files-and-the-google-android-emulator/)


EDIT: Adds a new link that works and talks about the ame issue (Not sure if it's the same article.

like image 63
J-Rou Avatar answered Nov 14 '22 23:11

J-Rou