Android 多出来一个emulator-5554 offli
引用
Start Windows Powershell:
Start -> type 'powershell' -> Press ENTER
Run the following command: adb devices
PS C:\Users\CJBS>adb devicesList of devices attachedemulator-5656 hostemulator-5652 host12b80FF443 device
In this case, 12b80FF443 is my physical device, and the emulator-* entries are garbage.
Per @Brigham, "The way that Android detects emulators is by scanning ports starting at port 5555.". The port number is indicated after the emulator name (in this case 5656 and 5652). The port number to check is the emulator port number plus 1. So in this case:-
5656 + 1 = 5657
5652 + 1 = 5653
So let's see which program is using these ports. In this case, the ports to check both start with "565". So I'll search for ports in use starting with 565. Execute: **netstat -a -n -o | Select-String ":565"
**
PS C:\Users\CJBS> netstat -a -n -o | Select-String ":565" TCP 127.0.0.1:5653 127.0.0.1:5653 ESTABLISHED 5944 TCP 127.0.0.1:5657 127.0.0.1:5657 ESTABLISHED 5944
The final field in this output is the PID (Process ID) - in this case it's PID 5944 for both of these two ports. So let's see what this process ID is. Execute: **tasklist /v | Select-String 5944
**. Replace 5944 with the output of the previous command:
PS C:\Users\CJBS> tasklist /v | Select-String 5944adb.exe 5944 Console 1 6,800 K Running MyPCName\CJBS 0:06:03 ADB Power Notification Window
What a surprise. It's ADB. As noted by other answers, it could be other programs, too.
Now, just kill this process ID. Execute **kill 5944
**, replacing 5944 with the PID in the previous command.
PS C:\Users\CJBS> kill 5944
To confirm that the spurious emulator is gone, re-run the following command: adb devices
PS C:\Users\CJBS>adb devicesList of devices attached* daemon not running. starting it now on port 5037 ** daemon started successfully *12b80FF443 device
ADB re-starts (as it was previously killed), and it detects no more fake emulators.