Device

Device

This class represents a device

Constructor

new Device(config)

Source:
Author:
  • Georges-B MICHEL
Parameters:
Name Type Default Description
config * null

Members

authorized

Source:

TRUE if debugging is authorized, else FALSE

bridge

Source:

Default bridge for this devices

bridges :Array.<AdbWrapper>

Source:

Hold all bridges (adb+usb, adb+tcp, sdb+usb, ssh, jtag, ...) configured for this device

Type:

connected

Source:

Flag. TRUE if currently connected, else FALSE

enrolled

Source:

Flag. TRUE is the device is enrolled, else FALSE

frida :Object

Source:

Hold frida configuration specfic to the device

Type:
  • Object

id

Source:

Real device ID

isEmulated

Source:
Deprecated:
  • Yes

model

Source:

Device model

offline

Source:

Flag. TRUE is the device is offline, else FALSE

platform :DeviceProfile

Source:

Device profile built by DeviceProfiler

Type:

product

Source:

Device product name

profile :DeviceProfile

Source:

Device profile built by DeviceProfiler

Type:

selected

Source:
Deprecated:
  • Yes

Flag. TRUE if this devices is default device for instrumentation

transportId

Source:
Deprecated:
  • Yes

Transport ID

type

Source:

uid

Source:

Device internal UID

usbQualifier

Source:

USB qualifier. Change when computer-side USB port change. It help to differentiate several devices with same DeviceID

Methods

(static) fromJsonObject(pJsonObject, pOverride) → {String}

Source:

To unserialize a Device from JSON string

Parameters:
Name Type Description
pJsonObject *
pOverride *
Returns:

JSON-serialized object

Type
String

addBridge(pBridge)

Source:

To add a bridge to the device

A bridge a way to send command or interact with the device.

Parameters:
Name Type Description
pBridge AdbWrapper

disconnect()

Source:

To disconnect "logically" a device.

This flag is involved into connected device monitoring.

getFridaServerPath()

Source:

getUID() → {String}

Source:

To get device UID

TODO : fix typo

Warning : Device UID is the Dexcalibur internal UID. It is not the DeviceID as returned by the device.

Returns:

Internal device UID

Type
String

hasFile(file) → {boolean}

Source:

To check if the given file path exists on the device

Parameters:
Name Type Description
file string

The file path to check

Returns:

Returns TRUE if the file exists on the device, else FALSE

Type
boolean

isAuthorized() → {Boolean}

Source:

To get authorized status

Returns:

TRUE if the device is authorized, else FALSE

Type
Boolean

isConnected() → {Boolean}

Source:

To get device status : connected / disconnected

Returns:

TRUE if the device is connected, else FALSE

Type
Boolean

isFridaReady() → {Boolean}

Source:

To get enrollment status

Returns:

Enrollement status : TRUE if the device is enrolled and frida ready, else FALSE

Type
Boolean

pull(pRemotePath, pLocalPath)

Source:
Parameters:
Name Type Description
pRemotePath Path | String
pLocalPath Path | String

pullPackage(pPkgIdentifier, pLocalPath) → {Boolean}

Source:
Parameters:
Name Type Description
pPkgIdentifier *
pLocalPath *
Throws:
BridgeException
Returns:

Return TRUE if file has been successfully downloaded, else FALSE

Type
Boolean

pullTemp(pRemotePath)

Source:

To pull a fil from a device and store it into temporary folder

Parameters:
Name Type Description
pRemotePath String

pushBinary(pLocalPath, pRemotePath)

Source:

To push an executable binary

Parameters:
Name Type Description
pLocalPath Path | String
pRemotePath Path | String

(async) retrieveUIDfromDevice()

Source:

To retrieve UID from device through shell

sendIntent(data, callbacks, pIntentFilter, force)

Source:
Deprecated:
  • Yes
Parameters:
Name Type Default Description
data Object
callbacks Object null
pIntentFilter IntentFilter null

An intance of the intent filter

force Boolean false

setFridaServer(pPath)

Source:
Parameters:
Name Type Description
pPath *

setUID(deviceID, qualifier)

Source:

To setup internal device UID

Since several device can have the same DeviceID value, UID is built by mixing several DeviceID with several data from qualifier array

Parameters:
Name Type Description
deviceID String

Value of DeviceID as returned by the device

qualifier Array.<String>

Additional data

toJsonObject(pOverride) → {JsonObject}

Source:

To serialize the Device to JSON string

Parameters:
Name Type Description
pOverride Object

A collection overrided field

Returns:

JSON-serialized object

Type
JsonObject