Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-11952] Return to the "localhost:XXXX" style of connecting to…
… emulators. For some reason, connecting to the emulator in this manner appears to be somwehat more reliable than connecting with the regular "emulator-XXXX" style. From the various JIRA issues opened against the most recent plugin releases, this instability seems to affect Mac OS X more than other operating systems. Now we use "localhost:XXXX", while sticking to a four-digit port number, as some tools seem to assume that the emulator port is always four-digits. While it's still a problem that ddmlib — as used by tools like the Maven Android plugin — only recognise emulators with the "emulator-XXXX" scheme, this should not be a problem, as the emulator itself at startup registers with adb in this style. While this means that running "adb devices" may show two connected devices (e.g. "emulator-5554" and "localhost:5555"), libraries like ddmlib will use the "emulator" variant, while build steps that call `adb` will automatically read the ANDROID_SERIAL environment vairable and use the "localhost" variant.
- Loading branch information