LoginSignup
11
11

More than 5 years have passed since last update.

GenymotionでVagrant(LAN環境)のホスト名を解決する方法

Posted at

Macbook内のVagrantで立てたサーバに、Genymotion上のエミュレータでホスト名を解決する方法を書いておきます。仮想端末は起動した状態で作業してください。

こちらの方のエントリにすべてが書いてあったが英語だったので。

shell
adb pull /system/etc/hosts /tmp/hosts
echo "192.168.57.1 test.example.com" >> /tmp/hosts
adb remount
adb push /tmp/hosts /system/etc

192.168.57.1とtest.example.comはご自身の環境に置き換えてください。

やってることは単純でマウントしたAndroidデバイスのホストファイルをMac側で書き換えて上書きしているだけ。簡単でした!

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11