The method of eliminating “more than one device and emulator” in ADB

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

When I connect my mobile phone to charge, I start the simulator to debug, and when I execute the ADB command, I report an error
C:\Users\gaojs>adb shell
error: more than one device and emulator
C:\Users\gaojs>adb install e:\good.apk
error: more than one device and emulator

In this case, we should first check whether there are multiple devices or simulators
C:\Users\gaojs> ADB devices
list of devices attached
emulator-5554 device
4dfadcb86b00cf05 device
if it is found that there are really multiple devices, it is necessary to specify the serial number of the device for the ADB command
C:\Users\gaojs> ADB – s emulator-5554 shell
as shown above, just add the – S parameter to the command

If there is only one device or simulator, and the offline status is found
that means that the bug of ADB itself is the cause, so we need to deal with it in the following way:
C: users/gaojs & gtadb kill-server
C:\Users\gaojs> taskkill/F/im adb.exe
the first command is to kill the service of ADB, and the second command is to kill the process of ADB

Similar Posts: