PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] How do I modify the host file on a Genymotion VM from windows?

 September 21, 2022     android, genymotion, virtual-machine, virtualbox, virtualhost     No comments   

Issue

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


Solution

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.



Answered By - eyal-lezmy
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing