Modifying the host file of the Android emulator

Source: Internet
Author: User

PS: Recently in using HTML5 to do mobile development, using the Android emulator, request API, need to modify the host file, find data, find a solution, the steps to record down.

1. Use the cmd command to access the appropriate SDK's Tools folder

2. Execute emulator-avd avdname -partition-size command start simulator

3. Use the CD . (Return to previous level) into the Platform-tools directory

4. Execute the adb root command and wait for the prompt to succeed

5. Execute adb remount command

5. Execute the adb pull/system/etc/hosts command to find the hosts file in the current directory after success

6. Modify the Hosts file and execute the adb push hosts/system/etc/hosts command to push

7. Execute adb shell command, wait for prompt to succeed

8. Execute cat/system/etc/hosts command, view hosts content, confirm success

PS: There must be a space between the command and the path.

@zhnoah
Source: http://www.cnblogs.com/zhnoah/
This article is owned by me and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original
The right to pursue legal liability.

Modifying the host file of the Android emulator

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.