debugserver.h File Reference

## Description

Communicate with debugserver on the device.

## Macros

#define | DEBUGSERVER_SERVICE_NAME "com.apple.debugserver"
| Service identifier passed to lockdownd_start_service() to start the debugserver service.
#define | DEBUGSERVER_SECURE_SERVICE_NAME DEBUGSERVER_SERVICE_NAME ".DVTSecureSocketProxy"
| Service identifier passed to lockdownd_start_service() to start the secure debugserver service.

## Typedefs

typedef debugserver_client_private * | debugserver_client_t
| The client handle.
typedef debugserver_command_private * | debugserver_command_t
| The command handle.

## Enumerations

enum | debugserver_error_t { DEBUGSERVER_E_SUCCESS = 0 , DEBUGSERVER_E_INVALID_ARG = -1 , DEBUGSERVER_E_MUX_ERROR = -2 , DEBUGSERVER_E_SSL_ERROR = -3 , DEBUGSERVER_E_RESPONSE_ERROR = -4 , DEBUGSERVER_E_TIMEOUT = -5 , DEBUGSERVER_E_UNKNOWN_ERROR = -256 }
| Error Codes.

## Functions

LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_new (idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t *client)
| Connects to the debugserver service on the specified device.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_start_service (idevice_t device, debugserver_client_t *client, const char *label)
| Starts a new debugserver service on the specified device and connects to it.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_free (debugserver_client_t client)
| Disconnects a debugserver client from the device and frees up the debugserver client data.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_send (debugserver_client_t client, const char *data, uint32_t size, uint32_t *sent)
| Sends raw data using the given debugserver service client.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_receive_with_timeout (debugserver_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout)
| Receives raw data using the given debugserver client with specified timeout.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_receive (debugserver_client_t client, char *data, uint32_t size, uint32_t *received)
| Receives raw data from the debugserver service.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_send_command (debugserver_client_t client, debugserver_command_t command, char **response, size_t *response_size)
| Sends a command to the debugserver service.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_receive_response (debugserver_client_t client, char **response, size_t *response_size)
| Receives and parses response of debugserver service.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_set_ack_mode (debugserver_client_t client, int enabled)
| Controls status of ACK mode when sending commands or receiving responses.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_set_receive_params (debugserver_client_t client, int(*cancel_receive)(), int receive_loop_timeout)
| Sets behavior when awaiting a response from the server.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_set_argv (debugserver_client_t client, int argc, char *argv[], char **response)
| Sets the argv which launches an app.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_client_set_environment_hex_encoded (debugserver_client_t client, const char *env, char **response)
| Adds or sets an environment variable.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_command_new (const char *name, int argc, char *argv[], debugserver_command_t *command)
| Creates and initializes a new command object.
LIBIMOBILEDEVICE_API debugserver_error_t | debugserver_command_free (debugserver_command_t command)
| Frees memory of command object.
LIBIMOBILEDEVICE_API void | debugserver_encode_string (const char *buffer, char **encoded_buffer, uint32_t *encoded_length)
| Encodes a string into hex notation.
LIBIMOBILEDEVICE_API void | debugserver_decode_string (const char *encoded_buffer, size_t encoded_length, char **buffer)
| Decodes a hex encoded string.