Package jadx.gui.device.protocol
Class ADBDevice
- java.lang.Object
-
- jadx.gui.device.protocol.ADBDevice
-
public class ADBDevice extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classADBDevice.ForwardResult
-
Constructor Summary
Constructors Constructor Description ADBDevice(ADBDeviceInfo info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearLogcat()Binary output of logcat -cbooleanequals(java.lang.Object obj)ADBDevice.ForwardResultforwardJDWP(java.lang.String localPort, java.lang.String jdwpPid)java.lang.StringgetAndroidReleaseVersion()byte[]getBinaryLogcat()byte[]getBinaryLogcat(java.lang.String timestamp)ADBDeviceInfogetDeviceInfo()java.util.List<ADB.Process>getProcessByPkg(java.lang.String pkg)java.util.List<ADB.Process>getProcessList()java.util.List<java.lang.String>getProp(java.lang.String entry)java.lang.StringgetSerial()java.lang.StringgetTimezone()inthashCode()intlaunchApp(java.lang.String fullAppName)booleanlistenForJDWP(ADB.JDWPProcessListener listener)booleanremoveForward(java.lang.String localPort)voidstopListenForJDWP()java.lang.StringtoString()booleanupdateDeviceInfo(ADBDeviceInfo info)
-
-
-
Constructor Detail
-
ADBDevice
public ADBDevice(ADBDeviceInfo info)
-
-
Method Detail
-
getDeviceInfo
public ADBDeviceInfo getDeviceInfo()
-
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.IOExceptionjava.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.IOExceptionBinary 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-