Port mapping of Android simulator to PC

Source: Internet
Author: User

Read Catalogue

  • I. Overview
  • Ii. Steps of implementation
Back to top one, overview

The Android system sets the PC IP to 10.0.2.2 For communication, and the PC does not specify an IP for the Android emulator system, so the PC does not have direct access to the Android emulator via IP, to realize the phase between PC and Android simulator. The use of port redirection (redir) is necessary for mutual communication.

Back to top Ii. implementation steps

1. Install Telnet

What is Telnet?

The Telnet protocol is a member of the TCP/IP protocol family and is the standard protocol and primary way for Internet remote Login services, providing users with the ability to perform remote host work on the local computer.

We can test the port number on the TCP side of the peer through the Telnet destination IP port number, which is not enabled. In addition, the default port number for the Telnet service destination is 23.

2. Running the simulator

3. Open the Windows command line and execute

  

The port number is the port number of the emulator, which is located in the title bar of the Android emulator window. After execution, enter Android console.

  

3. Execute commands under Android console

Redir Add tcp:5000:6000

Then execute the redir list to view the execution results:

  

This maps the 5000 port number on the PC side to the 6000 port of the Android emulator, and if the PC5000 port receives the data, it goes to port 6000 of the emulator.

4. Delete Port mappings

Use the command redir del to remove port mappings

Http://www.cnblogs.com/xujian2014/p/4935144.html

Port mapping for Android Simulator to PC (RPM)

Related Article

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.