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

Emulator prompts to send usage statistics on every job run with "Keep emulators in the job workspace..." enabled

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      My notes:

      Jenkins killed the job after 15 minutes.

      I increased the job's "Timeout minutes" from 15 to 45 minutes.

      The emulator prompts to send usage statistics to Google on every run. I
      need to find a way to disable that. I don't see that problem after the
      first run when I run the steps ad hoc on my own machine. I bet seeing it
      is an artifact of how cleanly the Jenkins Android Emulator Plugin starts
      the emulator on every run. I hope there's a way to turn it off without
      compromising on starting from a clean state.

      The prompt comes from DDMS. The presence of a `ddms.cfg` file in
      `$ANDROID_SDK_HOME/.android` with the contents below prevents the
      prompt.

          #Wed Jan 08 10:23:13 EST 2014
          pingId=2977280607391965849
      

      The Jenkins Android Emulator Plugin has code that's clearly intended to
      set up `ddms.cfg` with `pingOptIn=false`. Is that not sufficient? Is it
      not executing? Is something else cleaning up `ddms.cfg` after it
      executes?

      I deleted the `.android` directory in the Jenkins job directory and
      re-ran the job. It prompted me to send usage statistics when the
      emulator launched. Before dismissing the dialog, I looked at the newly
      created `.android` directory. It contains a `ddms.cfg` file containing
      only `pingOptIn=false`, just as I would expect from reading the Android
      Emulator Plugin's source code. I suspect that that configuration was
      once sufficient to prevent the dialog and isn't sufficient anymore. It
      seems `pingId` is required now.

      Empirically, the following `ddms.cfg` is sufficient on my machine:

          pingId=0
      

      I should change the Android Emulator Plugin to create `ddms.cfg` with:

          pingOptIn=false
          pingId=0
      

      I expect that will prevent the usage statistics dialog in both old and
      new versions of the Android SDK, assuming that `pingOptIn=false` worked
      in some older version.

      I'm using the following version of `emulator` installed via Android
      Studio 0.4.0:

          $ /Applications/Android\ Studio.app/sdk/tools/emulator -version
          Android emulator version 22.3.0 (build_id OPENMASTER-887826)
          Copyright (C) 2006-2011 The Android Open Source Project and many others.
          This program is a derivative of the QEMU CPU emulator (www.qemu.org).
          
            This software is licensed under the terms of the GNU General Public
            License version 2, as published by the Free Software Foundation, and
            may be copied, distributed, and modified under those terms.
          
            This program is distributed in the hope that it will be useful,
            but WITHOUT ANY WARRANTY; without even the implied warranty of
            MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
            GNU General Public License for more details.
      

        Attachments

          Activity

          Hide
          matthewlmcclure matthewlmcclure added a comment -

          I opened a pull request with a change that I believe addresses this issue.

          Show
          matthewlmcclure matthewlmcclure added a comment - I opened a pull request with a change that I believe addresses this issue.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Matt McClure
          Path:
          src/main/java/hudson/plugins/android_emulator/SdkInstaller.java
          http://jenkins-ci.org/commit/android-emulator-plugin/72ac1931eef0e23a1dcfc90d8a92b7522a294583
          Log:
          [FIXED JENKINS-21280] Update usage statistics opt out

          Empirically, emulator version 22.3.0 installed via Android Studio 0.4.0
          requires pingId=... to opt out. pingOptIn=false, as previously
          implemented is not sufficient.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Matt McClure Path: src/main/java/hudson/plugins/android_emulator/SdkInstaller.java http://jenkins-ci.org/commit/android-emulator-plugin/72ac1931eef0e23a1dcfc90d8a92b7522a294583 Log: [FIXED JENKINS-21280] Update usage statistics opt out Empirically, emulator version 22.3.0 installed via Android Studio 0.4.0 requires pingId=... to opt out. pingOptIn=false, as previously implemented is not sufficient.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/hudson/plugins/android_emulator/SdkInstaller.java
          http://jenkins-ci.org/commit/android-emulator-plugin/b414ba54032f5be7b869af4b495c702b6a402a00
          Log:
          Merge pull request #30 from matthewlmcclure/JENKINS-21280

          [FIXED JENKINS-21280] Update usage statistics opt out

          Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/6aedbd08fa5e...b414ba54032f

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/hudson/plugins/android_emulator/SdkInstaller.java http://jenkins-ci.org/commit/android-emulator-plugin/b414ba54032f5be7b869af4b495c702b6a402a00 Log: Merge pull request #30 from matthewlmcclure/ JENKINS-21280 [FIXED JENKINS-21280] Update usage statistics opt out Compare: https://github.com/jenkinsci/android-emulator-plugin/compare/6aedbd08fa5e...b414ba54032f
          Hide
          orrc Christopher Orr added a comment -

          Version 2.11 of the plugin has been released, which fixes this issue.

          Show
          orrc Christopher Orr added a comment - Version 2.11 of the plugin has been released, which fixes this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: