I'm writing automation for the LD Player emulator. I need to work with a large number of emulators (about 400). But not at the same time.
I've encountered a problem. After successfully processing 16 emulators, adb stopped seeing the devices. I tried restarting it, but that didn't help.
I'm using android studio. I think the problem may be in the line
$ADB_LOCAL_TRANSPORT_MAX_PORT max emulator scan port (default 5585, 16 emus)
But I didn't find where to change this.
Actually here is my problem. The server is running, there are no devices. In the emulator settings, root rights and adb are enabled. Windows OS. In the emulator Android 7.1, Samsung (but most likely the phone model is not important)
C:\Users\MoT>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
Command
C:\Users\MoT>adb devices mast return somethink like that
C:\Users\MoT>adb devices adb server version (31) doesn't match this client (41); killing...
I wouldn't necessarily call "uninstalling Android Studio" a "solution". See transport_local.cpp
; one can set environmental variable ADB_LOCAL_TRANSPORT_MAX_PORT
to override the scan-range limit. The problem is, that you're already running the wrong version of ADB server: adb server version doesn't match this client, which usually can be solved with adb kill-server
.