[arquillian-issues] [JBoss JIRA] (ARQ-1505) Wrong handling of Android Debug Bridge initialization

Stefan Miklosovic (JIRA) jira-events at lists.jboss.org
Thu Oct 3 11:53:02 EDT 2013


    [ https://issues.jboss.org/browse/ARQ-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12809214#comment-12809214 ] 

Stefan Miklosovic commented on ARQ-1505:
----------------------------------------

This seems to be resolved with changing this

AndroidDebugBridge.initIfNeeded(true);

to this

AndroidDebugBridge.initIfNeeded(false);

in AndroidBridgeImpl. That boolean argument is called "clientSupport" and from JavaDoc it says that:

{quote}
The library can be initialized in 2 ways:

    * Mode 1: clientSupport == true.
      The library monitors the devices and the applications running on them. It will connect to each application, as a debugger of sort, to be able to interact with them through JDWP packets.
    * Mode 2: clientSupport == false.
      The library only monitors devices. The applications are left untouched, letting other tools built on ddmlib to connect a debugger to them.

Only one tool can run in mode 1 at the same time.

Note that mode 1 does not prevent debugging of applications running on devices. Mode 1 lets debuggers connect to ddmlib which acts as a proxy between the debuggers and the applications to debug. See Client.getDebuggerListenPort().
{quote}

When setting it to false, that error is not displayed anymore, however I do not know what exaclty consequencies it has.
                
> Wrong handling of Android Debug Bridge initialization
> -----------------------------------------------------
>
>                 Key: ARQ-1505
>                 URL: https://issues.jboss.org/browse/ARQ-1505
>             Project: Arquillian
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Extension - Droidium
>    Affects Versions: droidium_1.0.0.Alpha1
>            Reporter: Karel Piwko
>
> When ADB is started, but the port is already occupied by a different tooling, it logs an E/ddms message, however it continues with the execution. 
> This is indeed faulty behaviour. The port should be configurable, if the port is occupied - it should fail with Unable to start container or unable to connect to the running container exception - similar to behavior you experience with other remote / managed containers. 
> {code}
>  org.arquillian.droidium.container.impl.AndroidBridgeImpl connect
> INFO: Connecting to the Android Debug Bridge at /home/kpiwko/apps/android-sdk-linux_x86/platform-tools/adb forceNewBridge = true
> 10:01:23 E/ddms: Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If it's being used by 
> something else, choose a new port number in the preferences.
> Sep 27, 2013 10:01:23 PM org.arquillian.droidium.container.impl.AndroidBridgeConnector initAndroidDebugBridge
> INFO: Android Debug Bridge was initialized in 350ms.
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list