5

I'm basically trying to simplify my development workflow a bit. I have a azure mobile services project running inside IIS on my windows host machine, which I can connect to from the Genymotion Android VM using an IP address (10.71.34.1).

What I'd like to be able to do is connect to the mobile services website using a host header (e.g. http://devmobservices rather than http://10.71.34.1:12345).

How can I modify the host file opn the Genymotion VM to allow me to do this?

(Also, if there's a better solution then please point me at that!)

Thanks

Matt

2 Answers 2

10

To modify the host file, you need first to mount the system partition in read-write.

After launching your Genymotion device, open a command line and type:

adb shell
mount -o remount,rw /system
echo "10.71.34.1   devmobservices" >> /etc/hosts

After that you will be able to reach your service through http://devmobservices:1234 address.

4

Thanks to the prior commenters for their assistance. Note that the location of adb is different on OS-X, so the actual commands would be:

/Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS/tools/adb shell

mount -o remount,rw /system

echo "10.71.34.1   devmobservices" >> /etc/hosts

Also, be sure the VM you want to modify is first running before entering the first command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.