It would be great to have SetDNS support for the Android mobile devices. This would allow redirection of requests to temporary testing setups for domains already in production.
Doing DNS spoofing “right” (the way we do in desktop where we keep the DNS times and just change the answer) is hard on mobile and is something we are working on but in the meantime you can get most of what you’d need just by using the custom command-line feature (which does work for the android agents). Using --host-rules you could map domains to your test host as needed: List of Chromium Command Line Switches « Peter Beverloo
Thanks for the quick response and the pointer on the Chrome command line feature!
I tried --host-rules MAP www.example.com 192.168.1.76 in the Chrome command line feature and I’m getting back (Invalid command-line option: “192.168.1.76”). I was using another hostname and IP but that shows the result. I tried various ways to escape it " ', etc but no luck. It seems like it does not like the spaces that this command line requires.
Any chance you have an example of the command that works with WPT?