[Android reverse engineering] cannot connect to daemon at tcp:5037: cannot connect to 127.0.0.1:5037: Unable to connect because the target computer actively refuses. (100

reason:

Port 5037 is occupied

solve:

1. Find the occupancy of port 5037 through a string:

netstat -ano | findstr "5037"

Insert image description here
2. Search through the string to determine which task (program) it corresponds to:

tasklist | findstr "10592"

Insert image description here

3. Start the task manager and end this task (program)
Insert image description here

4. Thinking: Why does it prompt that the port is occupied by the adb.exe program even though I am using the adb command?

my answer:

It should be that there are multiple adb.exes on the computer (for example, emulators, mobile assistants, etc. will all have their own adb.exe. In other words, the programs are conflicting), so generally you use adb kill-server directly, and the only thing that kills
is adb.exe in the current environment variable, while other adbs are still running and occupy port 5037.

Note: Because adb is the bridge between computers and mobile phones, applications that can transfer data from computers to mobile phones generally use adb.

Guess you like

Origin blog.csdn.net/zhinengxiong6/article/details/127142566