Sometimes, we need to test software in the intranet environment, the intranet will be more trouble when the domain name resolution, Android phone directly modify the hosts file can bring convenience.
The purpose of the Hosts file is actually to say that the domain name resolves to an IP address, such as the presence of 192.168.4.77 in your hosts file. ppo.xxuo.cn so when your phone accesses ppo.xxuo.cn, the server address is resolved to 192.168.4.77, if the hosts file has no content, the DNS server data is used to resolve the domain name.
To get to the point, modify the Android phone's hosts step: 1, root;2, modify the Hosts file permissions to writable; 3. Configure IP address resolution rules.
Root This step will not allow me to say more, different Android phone and different root mode, Android phone Hosts file is stored in/system/etc/, only need to use the RE manager to the Hosts file permissions The text can be written , connect your Android phone to your computer, and on the command line, type: adb shell Enter, type su, confirm on phone, and then vi/system/etc/hosts to modify the contents of the Hosts file. The contents of the Hosts file are as follows:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
:: 1 localhost
After the change, save the exit and restart your phone to take effect.