I am trying to close instances of ADBMonkeyDevice and IDevice classes
by calling
ADBMonkeyDevice.dispose() method. But this method always throws "null
pointer" exception. I am disposing adbMonkeyDevice when my device is
no longer attached. When device comes online again I can not create
new instance of ADBMonkeyDevice class as it throws error

SEVERE: Adb rejected adb port forwarding command: cannot bind socket
com.android.ddmlib.AdbCommandRejectedException: cannot bind socket
        at com.android.ddmlib.AdbHelper.createForward(AdbHelper.java:537)
        at com.android.ddmlib.Device.createForward(Device.java:300)
        at
com.android.monkeyrunner.adb.AdbMonkeyDevice.createManager(AdbMonkeyDevice.java:
118)
        at
com.android.monkeyrunner.adb.AdbMonkeyDevice.<init>(AdbMonkeyDevice.java:
66)
        at
com.adobe.genie.deviceController.android.ADBDeviceBroker.initMonkeyDevice(ADBDeviceBroker.java:
77)
        at
com.adobe.genie.deviceController.android.ADBDeviceBroker.<init>(ADBDeviceBroker.java:
30)
        at
com.adobe.genie.deviceController.android.AndroidDeviceClient.<init>(AndroidDeviceClient.java:
30)
        at
com.adobe.genie.deviceController.deviceComm.DeviceClientList.deviceListUpdate(DeviceClientList.java:
354)
        at
com.adobe.genie.deviceController.DeviceControllerPollThread.updateDeviceClients(DeviceControllerPollThread.java:
159)
        at
com.adobe.genie.deviceController.DeviceControllerPollThread.run(DeviceControllerPollThread.java:
122)
AdbCommandRejectedException while initiating AdbMonkeyDevice: cannot
remove listener

This problem gets resolved only when I restart adb.
I want to dispose ADBMonkeyDevice when device is not connected and
want to instantiate it again when it is attached again. I do not want
to restart ADB in between.

Please help me on this one.

Regards,
Suman

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to