Constructor
new Device(config)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
config |
* |
null
|
Members
authorized
TRUE if debugging is authorized, else FALSE
bridge
Default bridge for this devices
bridges :Array.<AdbWrapper>
Hold all bridges (adb+usb, adb+tcp, sdb+usb, ssh, jtag, ...) configured for this device
Type:
- Array.<AdbWrapper>
connected
Flag. TRUE if currently connected, else FALSE
enrolled
Flag. TRUE is the device is enrolled, else FALSE
frida :Object
Hold frida configuration specfic to the device
Type:
- Object
id
Real device ID
isEmulated
model
Device model
offline
Flag. TRUE is the device is offline, else FALSE
platform :DeviceProfile
Device profile built by DeviceProfiler
Type:
product
Device product name
profile :DeviceProfile
Device profile built by DeviceProfiler
Type:
selected
Flag. TRUE if this devices is default device for instrumentation
transportId
Transport ID
type
uid
Device internal UID
usbQualifier
USB qualifier. Change when computer-side USB port change. It help to differentiate several devices with same DeviceID
Methods
(static) fromJsonObject(pJsonObject, pOverride) → {String}
To unserialize a Device from JSON string
Parameters:
Name | Type | Description |
---|---|---|
pJsonObject |
* | |
pOverride |
* |
Returns:
JSON-serialized object
- Type
- String
addBridge(pBridge)
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()
To disconnect "logically" a device.
This flag is involved into connected device monitoring.
getFridaServerPath()
getUID() → {String}
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}
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}
To get authorized status
Returns:
TRUE if the device is authorized, else FALSE
- Type
- Boolean
isConnected() → {Boolean}
To get device status : connected / disconnected
Returns:
TRUE if the device is connected, else FALSE
- Type
- Boolean
isFridaReady() → {Boolean}
To get enrollment status
Returns:
Enrollement status : TRUE if the device is enrolled and frida ready, else FALSE
- Type
- Boolean
pull(pRemotePath, pLocalPath)
Parameters:
Name | Type | Description |
---|---|---|
pRemotePath |
Path | String | |
pLocalPath |
Path | String |
pullPackage(pPkgIdentifier, pLocalPath) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
pPkgIdentifier |
* | |
pLocalPath |
* |
Throws:
Returns:
Return TRUE if file has been successfully downloaded, else FALSE
- Type
- Boolean
pullTemp(pRemotePath)
To pull a fil from a device and store it into temporary folder
Parameters:
Name | Type | Description |
---|---|---|
pRemotePath |
String |
pushBinary(pLocalPath, pRemotePath)
To push an executable binary
Parameters:
Name | Type | Description |
---|---|---|
pLocalPath |
Path | String | |
pRemotePath |
Path | String |
(async) retrieveUIDfromDevice()
To retrieve UID from device through shell
sendIntent(data, callbacks, pIntentFilter, force)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
data |
Object | ||
callbacks |
Object |
null
|
|
pIntentFilter |
IntentFilter |
null
|
An intance of the intent filter |
force |
Boolean |
false
|
setFridaServer(pPath)
Parameters:
Name | Type | Description |
---|---|---|
pPath |
* |
setUID(deviceID, qualifier)
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}
To serialize the Device to JSON string
Parameters:
Name | Type | Description |
---|---|---|
pOverride |
Object | A collection overrided field |
Returns:
JSON-serialized object
- Type
- JsonObject