Reputation: 171
I know that I have to edit the /system/etc/hosts to map an IP address to a host name, but it seems that I can't edit the file. Is it because my android phone is not rooted?
Kindly advise. Thanks.
Upvotes: 17
Views: 33760
Reputation: 704
You can use the following guide and application to setup rules for specific domains.
Hit sync rule before leaving to make sure the file is downloaded.
Tap and activate the mode you wish to be in, You can activate more than one at a time so be careful as this will override one or the other.
Source: https://silocitylabs.com/post/2018/03/02/changing-dns-settings-for-android-development/
Upvotes: 18
Reputation: 2445
Why do you need to edit the hosts file?
You can simply add your host to a local DNS (e.g. the DNS announced by a local DHCP-Server in your Wifi-Network) or even in the real global DNS.
Upvotes: -6