Trang chủ Kiểm thử phần mềm How to connect Android Mobile device via TCP/IP

How to connect Android Mobile device via TCP/IP

0

Getting started

Before starting to connect Android Mobile device to PC/laptop via Wi-Fi, make sure your environment and equipment as below

  • Windows OS
  • Android Mobile device
  • ADB is already installed on your machine

In case, you do not have ADB, please refer this link How to Install ADB (Android Debug Bridge) on Windows 10 & Mac (minitool.com)

Note: Laptop/PC and Android Mobile device need to be connected to the same Wi-Fi network and Enable USB Debugging on Your Android Phone

Summarize:

Part 1: Get network Ip information

Part 2: Connect to computer/laptop via Ip

Part 3: Display mobile screen on computer/laptop


Part 1: Get network Ip information

Step 1. Go to setting

Step 2. Go to Network & internet on Settings

Step 3. Click on setting icon as below to see detail infomation of the Wi-Fi network

Step 4. Find the IP address session.

This is the Ip you use to connect to the computer

Part 2: Connect to computer/laptop via Ip

Before starting, make sure you have ADB on your machine.

Connect mobile device to machine via USB port and check the device with command below.

When you connect successfully, the command will return a list of devices that are connecting to your computer.

adb devices

Then use below command to create tcpip port for your mobile device
Note: You can use other 4 digits, usually will use 5555 as below

adb tcpip 5555

And then you can disconnect your phone and computer using USB, and then use ‘adb devices’ to check that there is no device connect with your machine now.

adb devices

Then connect to the phone through the port 5555 you just created above with the command tcpip

adb connect to 192.168.1.9:5555

After that, you can check which devices are currently connect with your machine by ‘adb devices’ command

adb devices

Part 3: Display mobile screen on computer/laptop

In the article I use windows operating system, you go to GitHub to download scrcpy to display your mobile screen.

Link download:

Releases · Genymobile/scrcpy (github.com)

0 BÌNH LUẬN

BÌNH LUẬN

Vui lòng nhập bình luận của bạn
Vui lòng nhập tên của bạn ở đây

Exit mobile version