Class ADBDevice


  • public class ADBDevice
    extends java.lang.Object
    • Method Detail

      • updateDeviceInfo

        public boolean updateDeviceInfo​(ADBDeviceInfo info)
      • getSerial

        public java.lang.String getSerial()
      • removeForward

        public boolean removeForward​(java.lang.String localPort)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • forwardJDWP

        public ADBDevice.ForwardResult forwardJDWP​(java.lang.String localPort,
                                                   java.lang.String jdwpPid)
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • launchApp

        public int launchApp​(java.lang.String fullAppName)
                      throws java.io.IOException,
                             java.lang.InterruptedException
        Returns:
        pid otherwise -1
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getBinaryLogcat

        public byte[] getBinaryLogcat()
                               throws java.io.IOException
        Returns:
        binary output of logcat
        Throws:
        java.io.IOException
      • getBinaryLogcat

        public byte[] getBinaryLogcat​(java.lang.String timestamp)
                               throws java.io.IOException
        Returns:
        binary output of logcat after provided timestamp Timestamp is in the format 09-08 02:18:03.131
        Throws:
        java.io.IOException
      • clearLogcat

        public void clearLogcat()
                         throws java.io.IOException
        Binary output of logcat -c
        Throws:
        java.io.IOException
      • getTimezone

        public java.lang.String getTimezone()
                                     throws java.io.IOException
        Returns:
        Timezone for the attached android device
        Throws:
        java.io.IOException
      • getAndroidReleaseVersion

        public java.lang.String getAndroidReleaseVersion()
      • getProp

        public java.util.List<java.lang.String> getProp​(java.lang.String entry)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getProcessByPkg

        public java.util.List<ADB.Process> getProcessByPkg​(java.lang.String pkg)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getProcessList

        public java.util.List<ADB.Process> getProcessList()
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • listenForJDWP

        public boolean listenForJDWP​(ADB.JDWPProcessListener listener)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • stopListenForJDWP

        public void stopListenForJDWP()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object