Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-20819

Be able to set emulator ports statically not randomly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Similar Issues:

      Description

      Right now, emulators are started like this:

      android-sdk/tools/emulator -no-boot-anim -ports 39935,58840 // and some other props
      

      This is not always what you want since while testing, there can be other tooling which connects to this device externally and when using ddmlib, it does not find that emulator since it scans 5554-5585 only but emulator is started outside this range.

      In android jenkins plugin, there is a "trick" how to avoid this, adb binary executes

      adb connect localhost:generated_avd_port
      

      but ddmlib is not able to mimic this behaviour so tooling which depends on it are lost in finding emulators.

      In order to use external tooling, user should be able to use ports which he specifies explicity via configuration of the plugin so random port generation will not be taken into accout. Random port generation should be uses by default when user do not specify them explicity.

      From implementation point of view, random port generation is done here

      https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/AndroidEmulatorContext.java#L51-L52

        Attachments

          Activity

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              smikloso Stefan Miklosovic
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: