Android Phone Modify Hosts file

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.