Icon

Comments have been closed on this page. Please use AppMon & UEM Open Q & A forum for questions about this plugin.

Icon

In Dynatrace 6.1, the auto-instrumentation UI is included with the product. Please see the following page for more information: Auto-Instrumentation for Android

Overview

Name and Version

Android Auto-Instrumentation UI 1.0

Compatible with

dynaTrace 6

Author

dynaTrace Software

License

dynaTrace Experimental Software License

Support Level

Supported

Download

setup.exe

Description

The Android Auto-Instrumentation UI provides an easy to use interface to configure an app for instrumentation.

Installation

To install the Android Auto-Instrumentation UI, download the attached setup.exe onto your Windows PC and launch and navigate through the installer.

Usage

Once installed, attach your Android device to your PC with a USB cable and go to the Start Menu and launch the shortcut Compuware->Android Auto-Instrumentation UI.  After it is launched you will need to provide your Monitoring Server URL and then you can begin to instrument your apps.

Screenshots

  1. Anonymous (login to see details)

    Hi, 

    Could not wait and started testing this app. I can see all of my apps but when selecting one on my android, after a while of gathering application information, I get the message: " unable to harvest application information ". The log points me to the child process log.

    ideas ? 

    gil.

     

  2. Anonymous (login to see details)

    Hi

    I'd to gather more information if possible.

    1. What APK and version is causing the issue?
    2. Does any APK work correctly or does this happen with all items?
    3. Can you provide both the Instrumentation and Main logs from the GET HELP section.  These should be small enough to cut and paste in.
    4. Are you launching the application from the START menu or clicking on the AndroidAPK.jar directly?
  3. Anonymous (login to see details)

    Hi,

    I'm having problems getting the APK signed.

    I think it's got something to do with AndroidAPK.tmpDir. On Windows, my %TEMP% directory is set to %HOME%\AppData\Local\Temp. But AndroidAPK.createAppWorkingDir() wants to set the tmpDir to %HOME%\AppData\Roaming\Compuware\AutoInstrument.

    The first time that the GUI is run, everything is fine, because AndroidAPK.createAppWorkingDir() creates the proper directory structure, and sets AndroidAPK.tmpDir to %HOME%\AppData\Roaming\Compuware\AutoInstrument.

    However, on subsequent launches, AndroidAPK.createAppWorkingDir() doesn't set the tmpDir variable because the directory already exists. When the GUI tries to perform the auto-instrumentation, it tries to copy the APK file to tmpDir, and this fails. The auto-instrumentation continues, but the working directory is set to the parent directory of the APK file.

    When the GUI tries to sign the APK, it looks for the instrumented APK in tmpDir. Since the instrumented APK file isn't there, the signing process fails.

  4. Anonymous (login to see details)

    I was unable to reproduce this based on the provided information.  Usually, when the signing process fails it is because JAVA_HOME is pointing to a JAVA JRE instead of a JAVA JDK.  We won't change JAVA_HOME if its found.  Verify that JAVA_HOME is pointing to a JAVA JDK.

    createAppWorkingDir() is called once at the beginning of the session and set.  It always uses %APPDATA% as its parent.  It sets tmpDir if found or if not found builds it and then sets it.  Worse case, I'd expect if a "second" working directory was created, that directory would be used throughout the session.

    1. Which apk is signing correctly and which one will not?
    2. What Windows OS is the application running on?
    3. The instrumentation and signing occur in one step.  Do you see a folder created under the %APPDATA%Compuware/AutoInstrumentation/[APK NAME]/dist ? What is in this folder?
    4. Cut and paste the Instrumentation log found in the GET HELP section.
    5. Cut and paste the Main log from the GET HELP section.  If the instrumentation log is to large to cut and paste, a support ticket will need to be opened.  Send at least the signing step as this may be enough.
    1. Anonymous (login to see details)

      1. When %HOME%\AppData\Roaming\Compuware\AutoInstrument doesn't exist, everything works fine. createAppWorkingDir() creates the directory, and tmpDir is set correctly. When %HOME%\AppData\Roaming\Compuware\AutoInstrument does exist, APK signing doesn't work. I suspect this is because tmpDir is set to java.io.tmpDir (which refers to %HOME%\AppData\Local\Temp on my machine).

      2. I'm running this on Windows 7.

      3. When %HOME%\AppData\Roaming\Compuware\AutoInstrument does exist, APPNAME\dist is created in the parent directory of the source APK (the logs have a message which say that the copying of the source APK failed). However, the signing script is looking for the APK to sign in %HOME%\AppData\Roaming\Compuware\AutoInstrument\APPNAME\dist.

      Thanks for looking at this. I don't have access to my laptop now, so I can't send the logs. I'll upload the logs on Monday.

  5. Anonymous (login to see details)

    One more follow up question.  What version of JAVA is being used on the laptop?  If it's not the version provided by the installer, set JAVA_HOME to that and see it the results change.  It should be something like : C:\Program Files\Compuware\AutoInstrumentation\jre7 

    1. Anonymous (login to see details)

      You were right! My JAVA_HOME environment variable was pointing to JDK 1.6 - it must have been set by some other application.

      I created a launch script which sets JAVA_HOME to the built in JRE, and it works now. Thanks!

      The other workaround was to just launch the GUI with "-Djava.io.tmpdir" set to the proper location.

  6. Anonymous (login to see details)

     

    Has anyone used this utility with 5.6?

  7. Anonymous (login to see details)

    Just an FYI. This tool is now built-in in upcoming dynaTrace 6.1. You can already test it out by downloading our dynaTrace 6.1 Beta Free Trial

  8. Anonymous (login to see details)


    Hi all.

    I´ve just installed the "Android Auto-Instrumentation UI" onto my PC.

     

    I have attached a HTC Mobile Phone and a SAMSUNG Tablet but I cannot see anything on the "Select Applications" Section.

     

    Is there anything I have to configure to be able to access to devices via USB ?

     

    Thank you very much in advance.

    1. Anonymous (login to see details)

      Hi

      The application itself does not require configuration but the phone/tablet will most likely need to have USB debugging enabled

  9. Anonymous (login to see details)

    Hi Rob.

    I have installed the "Android Auto-Instrumentation UI" Application onto  two different PCs and it is not working for me yet.

    I have attached my HTC Mobile Phone via USB and have enabled the USB debugging mode.

    It works with "Android Studio" but it doesn´t work with the "Android Auto-Instrumentation UI" Application, I cannot see any Applications on the "Select Applications" Section.

    Besides, I have installed a new dynaTrace Server 6.0 and have configured the "Monitoring URL" on the "Android Auto-Instrumentation UI".

    My dynaTrace Server is: "dynatracesrv05" and its IP Address is: 10.7.41.123

    I´ve trying with these two URLs but none of them is working:

    http://dynatracesrv05:2021

    http://10.7.41.123:2021

    I´m getting the Error: "The connection could not be established"

     

    Please any advice ?

     

    Thanks a lot in advance.

     


     

    1. Anonymous (login to see details)

      It looks like the IP address mentioned is internal to your network.  I was not able to connect using that IP/hostname in my UI either while others continue to connect successfully for me.  I was also unable to ping the IP/hostname you provided.  I spoke to development and they suggested that your port may need to change to something such as 8020, 8021, or 8080.  Try pinging that IP/hostname to make sure that you can connect to it and use that URL in the browser to see if you can receive a response.

      1. Anonymous (login to see details)

        Hi Rob.

        Very good news !!! I´ve been able to run it ... it is working !!

        I´ve found this valuable information on the "APM Community" regarding "UEM Health Check":  

        https://community.compuwareapm.com/community/display/DOCDT60/UEM+Health+Check

        After reading it I realized that before instrumenting our Mobile Application We have to "prepare" the target Web Application We are going to access from the Mobile device.

        My target Web Application is:

        http://localhost:8080

        I have done the following:

        PHASE #1: PREPARING THE TARGET WEB APPLICATION:

        A. Create this Directory in the root Directory where the target Web Application is installed:

        dynaTraceMonitor

        For example:

        D:\myapplication\webapp\dynaTraceMonitor

        B. Go to dynaTrace then to: "Our System Profile -> User Experience -> JavaScript Agent" and change the "Agent location" to:

        /dynaTraceMonitor

        (This value can be specified for each different Application in dynaTrace)

        C. Restart the target Web Application

        D. Open a browser and go to:

        http://localhost:8080/dynaTraceMonitor

        You should get this String:

        FL(Java,NoParams)

        PHASE #2: INSTRUMENTING THE ANDROID MOBILE APPLICATION:

        A. Copy the Android .apk File to be instrumented to a local Directory in your PC

        B. Enable the "debugging mode" on your Mobile Phone/Tablet

        C. Attach your Mobile Phone/Tablet via USB

        D. Open the "Android Auto-Instrumentation" Application

        E. On: "Monitoring Server URL" enter:

        http://localhost:8080

        F. Click on: "Test"

        You should get this Message:

        "The URL has connected successfully"

        G. Click on: "Get Started"

        H. Select the "Local File" Tab

        I. Click on: "Add Local Folder" and go to the Folder where We copied the .apk File to be instrumented

        J. Select the .apk File and Click on: "Instrument"

        K: At the end of the instrumentation Process you will be prompted:

        Would you like the instrumented application installed to your connected device ?

        L. Click on: "Yes"

        The instrumented application will be copied to your Mobile/Phone

        M. Go to your Mobile/Phone and execute the instrumented Application