· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Android Mirroring/Mmdlib Jar

mmdlib

AndroidDebugBridge


  • AndroidDebugBridge is a part of ddms Java library. It provides Java interface to what we can do with adb command line.
  • To get an ADB client using this library, one can use a sequence of init and createBridge methods.
  • AndroidDebugBridge also has terminate method. And its documentation says that this method must be called when you are done with the client.

  • client, bridge, device
    • Client property changed
    • a new AndroidDebugBridge is connected
    • a IDevice is connected, disconnected, or when its properties or its Client list changed

  • AndroidDebugBridge object attempted to connect to the adb daemon.
  • AndroidDebugBridge object attempted to restart the adb daemon.
  • Returns the socket address of the ADB server on the host.

  • https://events.linuxfoundation.org/images/stories/pdf/lf_abs12_kobayashi.pdf
  • http://stackoverflow.com/questions/12634280/what-is-a-adb-daemon

When you start an adb client, the client first checks whether there is an adb server process already running. If there isn't, it starts the server process. When the server starts, it binds to local TCP port 5037 and listens for commands sent from adb clients—all adb clients use port 5037 to communicate with the adb server.

The server then sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585, the range used by emulators/devices. Where the server finds an adb daemon, it sets up a connection to that port. 

  • public final class AndroidDebugBridge
    • public static AndroidDebugBridge createBridge(String osLocation, boolean forceNewBridge)
    /**
     * Creates a new debug bridge from the location of the command line tool.
     * <p/>
     * Any existing server will be disconnected, unless the location is the same and
     * <code>forceNewBridge</code> is set to false.
     * @param osLocation the location of the command line tool 'adb'
     * @param forceNewBridge force creation of a new bridge even if one with the same location
     * already exists.
     * @return a connected bridge.
     */
            try {
                sThis = new AndroidDebugBridge(osLocation);
                sThis.start();
            } catch (InvalidParameterException e) {
                sThis = null;
            }

구성

Files contained in ddmlib-22.0-sources.jar: 

META-INF/MANIFEST.MF
com.android.ddmlib.AdbCommandRejectedException.java
com.android.ddmlib.AdbHelper.java
com.android.ddmlib.AllocationInfo.java
com.android.ddmlib.AndroidDebugBridge.java
com.android.ddmlib.BadPacketException.java
com.android.ddmlib.CanceledException.java
com.android.ddmlib.ChunkHandler.java
com.android.ddmlib.Client.java
com.android.ddmlib.ClientData.java
com.android.ddmlib.CollectingOutputReceiver.java
com.android.ddmlib.DdmConstants.java
com.android.ddmlib.DdmPreferences.java
com.android.ddmlib.DebugPortManager.java
com.android.ddmlib.Debugger.java
com.android.ddmlib.Device.java
com.android.ddmlib.DeviceMonitor.java
com.android.ddmlib.EmulatorConsole.java
com.android.ddmlib.FileListingService.java
com.android.ddmlib.GetPropReceiver.java
com.android.ddmlib.HandleAppName.java
com.android.ddmlib.HandleExit.java
com.android.ddmlib.HandleHeap.java
com.android.ddmlib.HandleHello.java
com.android.ddmlib.HandleNativeHeap.java
com.android.ddmlib.HandleProfiling.java
com.android.ddmlib.HandleTest.java
com.android.ddmlib.HandleThread.java
com.android.ddmlib.HandleViewDebug.java
com.android.ddmlib.HandleWait.java
com.android.ddmlib.HeapSegment.java
com.android.ddmlib.IDevice.java
com.android.ddmlib.IShellEnabledDevice.java
com.android.ddmlib.IShellOutputReceiver.java
com.android.ddmlib.IStackTraceInfo.java
com.android.ddmlib.InstallException.java
com.android.ddmlib.JdwpPacket.java
com.android.ddmlib.Log.java
com.android.ddmlib.MonitorThread.java
com.android.ddmlib.MultiLineReceiver.java
com.android.ddmlib.NativeAllocationInfo.java
com.android.ddmlib.NativeLibraryMapInfo.java
com.android.ddmlib.NativeStackCallInfo.java
com.android.ddmlib.NullOutputReceiver.java
com.android.ddmlib.RawImage.java
com.android.ddmlib.ShellCommandUnresponsiveException.java
com.android.ddmlib.SyncException.java
com.android.ddmlib.SyncService.java
com.android.ddmlib.ThreadInfo.java
com.android.ddmlib.TimeoutException.java
com.android.ddmlib.log.EventContainer.java
com.android.ddmlib.log.EventLogParser.java
com.android.ddmlib.log.EventValueDescription.java
com.android.ddmlib.log.GcEventContainer.java
com.android.ddmlib.log.InvalidTypeException.java
com.android.ddmlib.log.InvalidValueTypeException.java
com.android.ddmlib.log.LogReceiver.java
com.android.ddmlib.logcat.LogCatFilter.java
com.android.ddmlib.logcat.LogCatListener.java
com.android.ddmlib.logcat.LogCatMessage.java
com.android.ddmlib.logcat.LogCatMessageParser.java
com.android.ddmlib.logcat.LogCatReceiverTask.java
com.android.ddmlib.testrunner.IRemoteAndroidTestRunner.java
com.android.ddmlib.testrunner.ITestRunListener.java
com.android.ddmlib.testrunner.InstrumentationResultParser.java
com.android.ddmlib.testrunner.RemoteAndroidTestRunner.java
com.android.ddmlib.testrunner.TestIdentifier.java
com.android.ddmlib.testrunner.TestResult.java
com.android.ddmlib.testrunner.TestRunResult.java
com.android.ddmlib.testrunner.XmlTestRunListener.java
com.android.ddmlib.utils.ArrayHelper.java



sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2016-09-03 05:56:01
Processing time 0.0021 sec