• Home
  • API Documentation
Show / Hide Table of Contents
  • iMobileDevice
    • ILibiMobileDevice
    • LibiMobileDevice
    • NativeLibraries
    • NativeStringArrayMarshaler
    • NativeStringMarshaler
    • Utf8Marshal
  • iMobileDevice.Afc
    • AfcApi
    • AfcClientHandle
    • AfcClientHandleDelegateMarshaler
    • AfcDictionaryMarshaler
    • AfcError
    • AfcErrorExtensions
    • AfcException
    • AfcFileMode
    • AfcLinkType
    • AfcLockOp
    • AfcNativeMethods
    • IAfcApi
  • iMobileDevice.DebugServer
    • DebugServerApi
    • DebugServerClientHandle
    • DebugServerClientHandleDelegateMarshaler
    • DebugServerCommandHandle
    • DebugServerCommandHandleDelegateMarshaler
    • DebugServerError
    • DebugServerErrorExtensions
    • DebugServerException
    • DebugServerNativeMethods
    • IDebugServerApi
  • iMobileDevice.DiagnosticsRelay
    • DiagnosticsRelayAction
    • DiagnosticsRelayApi
    • DiagnosticsRelayClientHandle
    • DiagnosticsRelayClientHandleDelegateMarshaler
    • DiagnosticsRelayError
    • DiagnosticsRelayErrorExtensions
    • DiagnosticsRelayException
    • DiagnosticsRelayNativeMethods
    • IDiagnosticsRelayApi
  • iMobileDevice.FileRelay
    • FileRelayApi
    • FileRelayClientHandle
    • FileRelayClientHandleDelegateMarshaler
    • FileRelayError
    • FileRelayErrorExtensions
    • FileRelayException
    • FileRelayNativeMethods
    • IFileRelayApi
  • iMobileDevice.HeartBeat
    • HeartBeatApi
    • HeartBeatClientHandle
    • HeartBeatClientHandleDelegateMarshaler
    • HeartBeatError
    • HeartBeatErrorExtensions
    • HeartBeatException
    • HeartBeatNativeMethods
    • IHeartBeatApi
  • iMobileDevice.HouseArrest
    • HouseArrestApi
    • HouseArrestClientHandle
    • HouseArrestClientHandleDelegateMarshaler
    • HouseArrestError
    • HouseArrestErrorExtensions
    • HouseArrestException
    • HouseArrestNativeMethods
    • IHouseArrestApi
  • iMobileDevice.iDevice
    • iDeviceApi
    • iDeviceConnectionHandle
    • iDeviceConnectionHandleDelegateMarshaler
    • iDeviceDebugCallBack
    • iDeviceError
    • iDeviceErrorExtensions
    • iDeviceEvent
    • iDeviceEventCallBack
    • iDeviceEventType
    • iDeviceException
    • iDeviceHandle
    • iDeviceHandleDelegateMarshaler
    • iDeviceListMarshaler
    • iDeviceNativeMethods
    • iDeviceSocketType
    • IiDeviceApi
  • iMobileDevice.InstallationProxy
    • IInstallationProxyApi
    • InstallationProxyApi
    • InstallationProxyClientHandle
    • InstallationProxyClientHandleDelegateMarshaler
    • InstallationProxyError
    • InstallationProxyErrorExtensions
    • InstallationProxyException
    • InstallationProxyNativeMethods
    • InstallationProxyStatusCallBack
  • iMobileDevice.Lockdown
    • ILockdownApi
    • LockdownApi
    • LockdownClientHandle
    • LockdownClientHandleDelegateMarshaler
    • LockdownError
    • LockdownErrorExtensions
    • LockdownException
    • LockdownMarshaler
    • LockdownNativeMethods
    • LockdownPairRecord
    • LockdownPairRecordHandle
    • LockdownPairRecordHandleDelegateMarshaler
    • LockdownServiceDescriptor
    • LockdownServiceDescriptorHandle
    • LockdownServiceDescriptorHandleDelegateMarshaler
  • iMobileDevice.Misagent
    • IMisagentApi
    • MisagentApi
    • MisagentClientHandle
    • MisagentClientHandleDelegateMarshaler
    • MisagentError
    • MisagentErrorExtensions
    • MisagentException
    • MisagentNativeMethods
  • iMobileDevice.Mobileactivation
    • IMobileactivationApi
    • MobileactivationApi
    • MobileactivationClientHandle
    • MobileactivationClientHandleDelegateMarshaler
    • MobileactivationError
    • MobileactivationErrorExtensions
    • MobileactivationException
    • MobileactivationNativeMethods
  • iMobileDevice.MobileBackup
    • IMobileBackupApi
    • MobileBackupApi
    • MobileBackupClientHandle
    • MobileBackupClientHandleDelegateMarshaler
    • MobileBackupError
    • MobileBackupErrorExtensions
    • MobileBackupException
    • MobileBackupFlags
    • MobileBackupNativeMethods
  • iMobileDevice.MobileBackup2
    • IMobileBackup2Api
    • MobileBackup2Api
    • MobileBackup2ClientHandle
    • MobileBackup2ClientHandleDelegateMarshaler
    • MobileBackup2Error
    • MobileBackup2ErrorExtensions
    • MobileBackup2Exception
    • MobileBackup2NativeMethods
  • iMobileDevice.MobileImageMounter
    • IMobileImageMounterApi
    • MobileImageMounterApi
    • MobileImageMounterClientHandle
    • MobileImageMounterClientHandleDelegateMarshaler
    • MobileImageMounterError
    • MobileImageMounterErrorExtensions
    • MobileImageMounterException
    • MobileImageMounterNativeMethods
    • MobileImageMounterUploadCallBack
  • iMobileDevice.MobileSync
    • IMobileSyncApi
    • MobileSyncAnchors
    • MobileSyncAnchorsHandle
    • MobileSyncAnchorsHandleDelegateMarshaler
    • MobileSyncApi
    • MobileSyncClientHandle
    • MobileSyncClientHandleDelegateMarshaler
    • MobileSyncError
    • MobileSyncErrorExtensions
    • MobileSyncException
    • MobileSyncNativeMethods
    • MobileSyncSyncType
  • iMobileDevice.NotificationProxy
    • INotificationProxyApi
    • NotificationProxyApi
    • NotificationProxyClientHandle
    • NotificationProxyClientHandleDelegateMarshaler
    • NotificationProxyError
    • NotificationProxyErrorExtensions
    • NotificationProxyException
    • NotificationProxyNativeMethods
    • NotificationProxyNotifyCallBack
  • iMobileDevice.Pinvoke
    • IPinvokeApi
    • PinvokeApi
    • PinvokeError
    • PinvokeErrorExtensions
    • PinvokeException
    • PinvokeNativeMethods
  • iMobileDevice.Plist
    • IPlistApi
    • PlistApi
    • PlistDictIterHandle
    • PlistDictIterHandleDelegateMarshaler
    • PlistHandle
    • PlistHandleDelegateMarshaler
    • PlistNativeMethods
    • PlistType
  • iMobileDevice.PropertyListService
    • IPropertyListServiceApi
    • PropertyListServiceApi
    • PropertyListServiceClientHandle
    • PropertyListServiceClientHandleDelegateMarshaler
    • PropertyListServiceError
    • PropertyListServiceErrorExtensions
    • PropertyListServiceException
    • PropertyListServiceNativeMethods
  • iMobileDevice.Restore
    • IRestoreApi
    • RestoreApi
    • RestoreClientHandle
    • RestoreClientHandleDelegateMarshaler
    • RestoreError
    • RestoreErrorExtensions
    • RestoreException
    • RestoreNativeMethods
  • iMobileDevice.Screenshotr
    • IScreenshotrApi
    • ScreenshotrApi
    • ScreenshotrClientHandle
    • ScreenshotrClientHandleDelegateMarshaler
    • ScreenshotrError
    • ScreenshotrErrorExtensions
    • ScreenshotrException
    • ScreenshotrNativeMethods
  • iMobileDevice.Service
    • ConstructorFunc
    • IServiceApi
    • ServiceApi
    • ServiceClientHandle
    • ServiceClientHandleDelegateMarshaler
    • ServiceError
    • ServiceErrorExtensions
    • ServiceException
    • ServiceNativeMethods
  • iMobileDevice.SpringBoardServices
    • ISpringBoardServicesApi
    • SpringBoardServicesApi
    • SpringBoardServicesClientHandle
    • SpringBoardServicesClientHandleDelegateMarshaler
    • SpringBoardServicesError
    • SpringBoardServicesErrorExtensions
    • SpringBoardServicesException
    • SpringBoardServicesInterfaceOrientation
    • SpringBoardServicesNativeMethods
  • iMobileDevice.SyslogRelay
    • ISyslogRelayApi
    • SyslogRelayApi
    • SyslogRelayClientHandle
    • SyslogRelayClientHandleDelegateMarshaler
    • SyslogRelayError
    • SyslogRelayErrorExtensions
    • SyslogRelayException
    • SyslogRelayNativeMethods
    • SyslogRelayReceiveCallBack
  • iMobileDevice.Usbmuxd
    • IUsbmuxdApi
    • UsbmuxdApi
    • UsbmuxdDeviceInfo
    • UsbmuxdEvent
    • UsbmuxdEventCallBack
    • UsbmuxdEventType
    • UsbmuxdNativeMethods
    • UsbmuxdSocketType
  • iMobileDevice.WebInspector
    • IWebInspectorApi
    • WebInspectorApi
    • WebInspectorClientHandle
    • WebInspectorClientHandleDelegateMarshaler
    • WebInspectorError
    • WebInspectorErrorExtensions
    • WebInspectorException
    • WebInspectorNativeMethods

Class DebugServerNativeMethods

Inheritance
System.Object
DebugServerNativeMethods
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: iMobileDevice.DebugServer
Assembly: iMobileDevice-net.dll
Syntax
public class DebugServerNativeMethods

Methods

debugserver_client_free(IntPtr)

Disconnects a debugserver client from the device and frees up the debugserver client data.

Declaration
public static DebugServerError debugserver_client_free(IntPtr client)
Parameters
Type Name Description
System.IntPtr client

The debugserver client to disconnect and free.

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client is NULL, or an DEBUGSERVER_E_* error code otherwise.

debugserver_client_new(iDeviceHandle, LockdownServiceDescriptorHandle, out DebugServerClientHandle)

Connects to the debugserver service on the specified device.

Declaration
public static DebugServerError debugserver_client_new(iDeviceHandle device, LockdownServiceDescriptorHandle service, out DebugServerClientHandle client)
Parameters
Type Name Description
iDeviceHandle device

The device to connect to.

LockdownServiceDescriptorHandle service

The service descriptor returned by lockdownd_start_service.

DebugServerClientHandle client

Pointer that will point to a newly allocated debugserver_client_t upon successful return. Must be freed using debugserver_client_free() after use.

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client is NULL, or an DEBUGSERVER_E_* error code otherwise.

debugserver_client_receive(DebugServerClientHandle, Byte[], UInt32, ref UInt32)

Receives raw data from the debugserver service.

Declaration
public static DebugServerError debugserver_client_receive(DebugServerClientHandle client, byte[] data, uint size, ref uint received)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

System.Byte[] data

Buffer that will be filled with the data received

System.UInt32 size

Number of bytes to receive

System.UInt32 received

Number of bytes received (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client or plist is NULL

Remarks

The default read timeout is 10 seconds.

debugserver_client_receive_response(DebugServerClientHandle, out IntPtr)

Receives and parses response of debugserver service.

Declaration
public static DebugServerError debugserver_client_receive_response(DebugServerClientHandle client, out IntPtr response)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

System.IntPtr response

Response received for last command (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client is NULL

| Improve this Doc View Source

debugserver_client_receive_response(DebugServerClientHandle, out String)

Declaration
public static DebugServerError debugserver_client_receive_response(DebugServerClientHandle client, out string response)
Parameters
Type Name Description
DebugServerClientHandle client
System.String response
Returns
Type Description
DebugServerError

debugserver_client_receive_with_timeout(DebugServerClientHandle, Byte[], UInt32, ref UInt32, UInt32)

Receives raw data using the given debugserver client with specified timeout.

Declaration
public static DebugServerError debugserver_client_receive_with_timeout(DebugServerClientHandle client, byte[] data, uint size, ref uint received, uint timeout)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client to use for receiving

System.Byte[] data

Buffer that will be filled with the data received

System.UInt32 size

Number of bytes to receive

System.UInt32 received

Number of bytes received (can be NULL to ignore)

System.UInt32 timeout

Maximum time in milliseconds to wait for data.

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when one or more parameters are invalid, DEBUGSERVER_E_MUX_ERROR when a communication error occurs, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified error occurs.

debugserver_client_send(DebugServerClientHandle, Byte[], UInt32, ref UInt32)

Sends raw data using the given debugserver service client.

Declaration
public static DebugServerError debugserver_client_send(DebugServerClientHandle client, byte[] data, uint size, ref uint sent)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client to use for sending

System.Byte[] data

Data to send

System.UInt32 size

Size of the data to send

System.UInt32 sent

Number of bytes sent (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when one or more parameters are invalid, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified error occurs.

debugserver_client_send_command(DebugServerClientHandle, DebugServerCommandHandle, out IntPtr)

Sends a command to the debugserver service.

Declaration
public static DebugServerError debugserver_client_send_command(DebugServerClientHandle client, DebugServerCommandHandle command, out IntPtr response)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

DebugServerCommandHandle command

Command to process and send

System.IntPtr response

Response received for the command (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client or command is NULL

| Improve this Doc View Source

debugserver_client_send_command(DebugServerClientHandle, DebugServerCommandHandle, out String)

Declaration
public static DebugServerError debugserver_client_send_command(DebugServerClientHandle client, DebugServerCommandHandle command, out string response)
Parameters
Type Name Description
DebugServerClientHandle client
DebugServerCommandHandle command
System.String response
Returns
Type Description
DebugServerError

debugserver_client_set_ack_mode(DebugServerClientHandle, Int32)

Controls status of ACK mode when sending commands or receiving responses.

Declaration
public static DebugServerError debugserver_client_set_ack_mode(DebugServerClientHandle client, int enabled)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

System.Int32 enabled

A boolean flag indicating whether the internal ACK mode handling should be enabled or disabled.

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error code otherwise.

| Improve this Doc View Source

debugserver_client_set_argv(DebugServerClientHandle, Int32, ReadOnlyCollection<String>, out String)

Declaration
public static DebugServerError debugserver_client_set_argv(DebugServerClientHandle client, int argc, ReadOnlyCollection<string> argv, out string response)
Parameters
Type Name Description
DebugServerClientHandle client
System.Int32 argc
System.Collections.ObjectModel.ReadOnlyCollection<System.String> argv
System.String response
Returns
Type Description
DebugServerError

debugserver_client_set_argv(DebugServerClientHandle, Int32, IntPtr, out IntPtr)

Sets the argv which launches an app.

Declaration
public static DebugServerError debugserver_client_set_argv(DebugServerClientHandle client, int argc, IntPtr argv, out IntPtr response)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

System.Int32 argc

Number of arguments

System.IntPtr argv

Array starting with the executable to be run followed by it's arguments

System.IntPtr response

Response received for the command (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client is NULL

debugserver_client_set_environment_hex_encoded(DebugServerClientHandle, String, out IntPtr)

Adds or sets an environment variable.

Declaration
public static DebugServerError debugserver_client_set_environment_hex_encoded(DebugServerClientHandle client, string env, out IntPtr response)
Parameters
Type Name Description
DebugServerClientHandle client

The debugserver client

System.String env

The environment variable in "KEY=VALUE" notation

System.IntPtr response

Response received for the command (can be NULL to ignore)

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when client is NULL

| Improve this Doc View Source

debugserver_client_set_environment_hex_encoded(DebugServerClientHandle, String, out String)

Declaration
public static DebugServerError debugserver_client_set_environment_hex_encoded(DebugServerClientHandle client, string env, out string response)
Parameters
Type Name Description
DebugServerClientHandle client
System.String env
System.String response
Returns
Type Description
DebugServerError

debugserver_client_start_service(iDeviceHandle, out DebugServerClientHandle, String)

Starts a new debugserver service on the specified device and connects to it.

Declaration
public static DebugServerError debugserver_client_start_service(iDeviceHandle device, out DebugServerClientHandle client, string label)
Parameters
Type Name Description
iDeviceHandle device

The device to connect to.

DebugServerClientHandle client

Pointer that will point to a newly allocated debugserver_client_t upon successful return. Must be freed using debugserver_client_free() after use.

System.String label

The label to use for communication. Usually the program name. Pass NULL to disable sending the label in requests to lockdownd.

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error code otherwise.

debugserver_command_free(IntPtr)

Frees memory of command object.

Declaration
public static DebugServerError debugserver_command_free(IntPtr command)
Parameters
Type Name Description
System.IntPtr command

The command object

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when command is NULL

| Improve this Doc View Source

debugserver_command_new(String, Int32, ReadOnlyCollection<String>, out DebugServerCommandHandle)

Declaration
public static DebugServerError debugserver_command_new(string name, int argc, ReadOnlyCollection<string> argv, out DebugServerCommandHandle command)
Parameters
Type Name Description
System.String name
System.Int32 argc
System.Collections.ObjectModel.ReadOnlyCollection<System.String> argv
DebugServerCommandHandle command
Returns
Type Description
DebugServerError

debugserver_command_new(String, Int32, IntPtr, out DebugServerCommandHandle)

Creates and initializes a new command object.

Declaration
public static DebugServerError debugserver_command_new(string name, int argc, IntPtr argv, out DebugServerCommandHandle command)
Parameters
Type Name Description
System.String name

The name of the command which is sent in plain text

System.Int32 argc

Number of items in the token array

System.IntPtr argv

Array of tokens for the command ment to be encoded

DebugServerCommandHandle command

New command object

Returns
Type Description
DebugServerError

DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when name or command is NULL

debugserver_decode_string(String, UInt32, out IntPtr)

Decodes a hex encoded string.

Declaration
public static void debugserver_decode_string(string encodedBuffer, uint encodedLength, out IntPtr buffer)
Parameters
Type Name Description
System.String encodedBuffer
System.UInt32 encodedLength
System.IntPtr buffer

Decoded string to be freed by the caller

| Improve this Doc View Source

debugserver_decode_string(String, UInt32, out String)

Declaration
public static void debugserver_decode_string(string encodedBuffer, uint encodedLength, out string buffer)
Parameters
Type Name Description
System.String encodedBuffer
System.UInt32 encodedLength
System.String buffer

debugserver_encode_string(String, out IntPtr, ref UInt32)

Encodes a string into hex notation.

Declaration
public static void debugserver_encode_string(string buffer, out IntPtr encodedBuffer, ref uint encodedLength)
Parameters
Type Name Description
System.String buffer

String to encode into hex notiation

System.IntPtr encodedBuffer
System.UInt32 encodedLength
| Improve this Doc View Source

debugserver_encode_string(String, out String, ref UInt32)

Declaration
public static void debugserver_encode_string(string buffer, out string encodedBuffer, ref uint encodedLength)
Parameters
Type Name Description
System.String buffer
System.String encodedBuffer
System.UInt32 encodedLength
  • Improve this Doc
  • View Source
Back to top Copyright (c) 2015-2017 Quamotion bvba. All rights reserved