summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cython/imobiledevice.pxd2
-rw-r--r--cython/imobiledevice.pyx36
-rw-r--r--dev/housearresttest.c10
-rw-r--r--dev/ideviceclient.c10
-rw-r--r--dev/lckdclient.c10
-rw-r--r--docs/idevice_id.16
-rw-r--r--docs/idevicebackup.14
-rw-r--r--docs/idevicebackup2.14
-rw-r--r--docs/idevicedate.14
-rw-r--r--docs/ideviceenterrecovery.16
-rw-r--r--docs/ideviceimagemounter.14
-rw-r--r--docs/ideviceinfo.14
-rw-r--r--docs/idevicepair.14
-rw-r--r--docs/idevicescreenshot.14
-rw-r--r--docs/idevicesyslog.14
-rw-r--r--include/libimobiledevice/libimobiledevice.h6
-rw-r--r--include/libimobiledevice/lockdown.h2
-rw-r--r--src/idevice.c26
-rw-r--r--src/idevice.h2
-rw-r--r--src/lockdown.c24
-rw-r--r--src/lockdown.h2
-rw-r--r--src/mobilebackup2.c4
-rw-r--r--src/restore.c14
-rw-r--r--src/restore.h2
-rw-r--r--src/userpref.c53
-rw-r--r--src/userpref.h8
-rw-r--r--tools/idevice_id.c18
-rw-r--r--tools/idevicebackup.c34
-rw-r--r--tools/idevicebackup2.c66
-rw-r--r--tools/idevicedate.c16
-rw-r--r--tools/ideviceenterrecovery.c16
-rw-r--r--tools/ideviceimagemounter.c12
-rw-r--r--tools/ideviceinfo.c16
-rw-r--r--tools/idevicepair.c60
-rw-r--r--tools/idevicescreenshot.c18
-rw-r--r--tools/idevicesyslog.c16
36 files changed, 264 insertions, 263 deletions
diff --git a/cython/imobiledevice.pxd b/cython/imobiledevice.pxd
index 048f226..d0d1ada 100644
--- a/cython/imobiledevice.pxd
+++ b/cython/imobiledevice.pxd
@@ -28,7 +28,7 @@ cdef extern from "libimobiledevice/libimobiledevice.h":
IDEVICE_DEVICE_REMOVE
ctypedef struct idevice_event_t:
idevice_event_type event
- char *uuid
+ char *udid
int conn_type
ctypedef idevice_event_t* const_idevice_event_t "const idevice_event_t*"
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx
index 654288e..ffaa3c1 100644
--- a/cython/imobiledevice.pyx
+++ b/cython/imobiledevice.pyx
@@ -44,9 +44,9 @@ cdef extern from "libimobiledevice/libimobiledevice.h":
idevice_error_t idevice_get_device_list(char ***devices, int *count)
idevice_error_t idevice_device_list_free(char **devices)
void idevice_set_debug_level(int level)
- idevice_error_t idevice_new(idevice_t *device, char *uuid)
+ idevice_error_t idevice_new(idevice_t *device, char *udid)
idevice_error_t idevice_free(idevice_t device)
- idevice_error_t idevice_get_uuid(idevice_t device, char** uuid)
+ idevice_error_t idevice_get_udid(idevice_t device, char** udid)
idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle)
idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection)
idevice_error_t idevice_disconnect(idevice_connection_t connection)
@@ -75,14 +75,14 @@ cdef class iDeviceEvent:
raise TypeError("iDeviceEvent cannot be instantiated")
def __str__(self):
- return 'iDeviceEvent: %s (%s)' % (self.event == IDEVICE_DEVICE_ADD and 'Add' or 'Remove', self.uuid)
+ return 'iDeviceEvent: %s (%s)' % (self.event == IDEVICE_DEVICE_ADD and 'Add' or 'Remove', self.udid)
property event:
def __get__(self):
return self._c_event.event
- property uuid:
+ property udid:
def __get__(self):
- return self._c_event.uuid
+ return self._c_event.udid
property conn_type:
def __get__(self):
return self._c_event.conn_type
@@ -137,13 +137,13 @@ cdef class iDeviceConnection(Base):
from libc.stdlib cimport *
cdef class iDevice(Base):
- def __cinit__(self, object uuid=None, *args, **kwargs):
- cdef char* c_uuid = NULL
- if isinstance(uuid, basestring):
- c_uuid = <bytes>uuid
- elif uuid is not None:
- raise TypeError("iDevice's constructor takes a string or None as the uuid argument")
- self.handle_error(idevice_new(&self._c_dev, c_uuid))
+ def __cinit__(self, object udid=None, *args, **kwargs):
+ cdef char* c_udid = NULL
+ if isinstance(udid, basestring):
+ c_udid = <bytes>udid
+ elif udid is not None:
+ raise TypeError("iDevice's constructor takes a string or None as the udid argument")
+ self.handle_error(idevice_new(&self._c_dev, c_udid))
def __dealloc__(self):
if self._c_dev is not NULL:
@@ -169,18 +169,18 @@ cdef class iDevice(Base):
if c_conn != NULL:
idevice_disconnect(c_conn)
- property uuid:
+ property udid:
def __get__(self):
cdef:
- char* uuid
+ char* udid
idevice_error_t err
- err = idevice_get_uuid(self._c_dev, &uuid)
+ err = idevice_get_udid(self._c_dev, &udid)
try:
self.handle_error(err)
- return uuid
+ return udid
except Exception, e:
- if uuid != NULL:
- free(uuid)
+ if udid != NULL:
+ free(udid)
property handle:
def __get__(self):
cdef uint32_t handle
diff --git a/dev/housearresttest.c b/dev/housearresttest.c
index 7282a8c..951ebe4 100644
--- a/dev/housearresttest.c
+++ b/dev/housearresttest.c
@@ -35,7 +35,7 @@ static void print_usage(int argc, char **argv)
printf("Usage: %s [OPTIONS] APPID\n", (name ? name + 1: argv[0]));
printf("Test the house_arrest service.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -t, --test\t\ttest creating, writing, and deleting a file\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
@@ -48,7 +48,7 @@ int main(int argc, char **argv)
house_arrest_client_t hac = NULL;
house_arrest_error_t res;
int i;
- char *uuid = NULL;
+ char *udid = NULL;
const char *appid = NULL;
int test_file_io = 0;
@@ -58,13 +58,13 @@ int main(int argc, char **argv)
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- uuid = strdup(argv[i]);
+ udid = strdup(argv[i]);
continue;
}
else if (!strcmp(argv[i], "-t") || !strcmp(argv[i], "--test")) {
@@ -86,7 +86,7 @@ int main(int argc, char **argv)
return 0;
}
- if (idevice_new(&dev, uuid) != IDEVICE_E_SUCCESS) {
+ if (idevice_new(&dev, udid) != IDEVICE_E_SUCCESS) {
printf("no device connected?!\n");
goto leave_cleanup;
}
diff --git a/dev/ideviceclient.c b/dev/ideviceclient.c
index c7bde4d..d467ee8 100644
--- a/dev/ideviceclient.c
+++ b/dev/ideviceclient.c
@@ -83,12 +83,12 @@ int main(int argc, char *argv[])
return -1;
}
- char *uuid = NULL;
- if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) {
- printf("DeviceUniqueID : %s\n", uuid);
+ char *udid = NULL;
+ if (IDEVICE_E_SUCCESS == idevice_get_udid(phone, &udid)) {
+ printf("DeviceUniqueID : %s\n", udid);
}
- if (uuid)
- free(uuid);
+ if (udid)
+ free(udid);
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "ideviceclient")) {
idevice_free(phone);
diff --git a/dev/lckdclient.c b/dev/lckdclient.c
index 5ca72f8..cc89634 100644
--- a/dev/lckdclient.c
+++ b/dev/lckdclient.c
@@ -88,12 +88,12 @@ int main(int argc, char *argv[])
return -1;
}
- char *uuid = NULL;
- if (IDEVICE_E_SUCCESS == idevice_get_uuid(phone, &uuid)) {
- printf("DeviceUniqueID : %s\n", uuid);
+ char *udid = NULL;
+ if (IDEVICE_E_SUCCESS == idevice_get_udid(phone, &udid)) {
+ printf("DeviceUniqueID : %s\n", udid);
}
- if (uuid)
- free(uuid);
+ if (udid)
+ free(udid);
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "lckdclient")) {
idevice_free(phone);
diff --git a/docs/idevice_id.1 b/docs/idevice_id.1
index c06fb5e..02d830d 100644
--- a/docs/idevice_id.1
+++ b/docs/idevice_id.1
@@ -3,18 +3,18 @@
idevice_id \- Prints device name or a list of attached iPhone/iPod Touch devices.
.SH SYNOPSIS
.B idevice_id
-[OPTIONS] [UUID]
+[OPTIONS] [UDID]
.SH DESCRIPTION
Prints device name or a list of attached iPhone/iPod Touch devices.
-The UUID is a 40-digit hexadecimal number of the device
+The UDID is a 40-digit hexadecimal number of the device
for which the name should be retrieved.
.SH OPTIONS
.TP
.B \-l, \-\-list
-list UUID of all attached devices
+list UDID of all attached devices
.TP
.B \-d, \-\-debug
enable communication debugging.
diff --git a/docs/idevicebackup.1 b/docs/idevicebackup.1
index 5ae867e..5ce9568 100644
--- a/docs/idevicebackup.1
+++ b/docs/idevicebackup.1
@@ -11,8 +11,8 @@ Create or restore backup from the current or specified directory.
.SH OPTIONS
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-d, \-\-debug
enable communication debugging.
diff --git a/docs/idevicebackup2.1 b/docs/idevicebackup2.1
index a638b8f..e4f97f8 100644
--- a/docs/idevicebackup2.1
+++ b/docs/idevicebackup2.1
@@ -11,8 +11,8 @@ Create or restore backup from the current or specified directory.
.SH OPTIONS
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-d, \-\-debug
enable communication debugging.
diff --git a/docs/idevicedate.1 b/docs/idevicedate.1
index 15c9895..5a3156e 100644
--- a/docs/idevicedate.1
+++ b/docs/idevicedate.1
@@ -14,8 +14,8 @@ Show information about the first connected iPhone/iPod Touch.
.B \-d, \-\-debug
enable communication debugging.
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-s, \-\-set TIMESTAMP
set UTC time described by TIMESTAMP
diff --git a/docs/ideviceenterrecovery.1 b/docs/ideviceenterrecovery.1
index a543092..79de05c 100644
--- a/docs/ideviceenterrecovery.1
+++ b/docs/ideviceenterrecovery.1
@@ -1,13 +1,13 @@
.TH "ideviceenterrecovery" 1
.SH NAME
-ideviceenterrecovery \- Makes a device with the supplied 40-digit UUID enter recovery mode immediately.
+ideviceenterrecovery \- Makes a device with the supplied 40-digit UDID enter recovery mode immediately.
.SH SYNOPSIS
.B ideviceenterrecovery
-[OPTIONS] UUID
+[OPTIONS] UDID
.SH DESCRIPTION
-Makes a device with the supplied 40-digit UUID enter recovery mode immediately.
+Makes a device with the supplied 40-digit UDID enter recovery mode immediately.
.SH OPTIONS
.TP
diff --git a/docs/ideviceimagemounter.1 b/docs/ideviceimagemounter.1
index 55d81e9..ab65b6f 100644
--- a/docs/ideviceimagemounter.1
+++ b/docs/ideviceimagemounter.1
@@ -14,8 +14,8 @@ Mounts the specified disk image on the iPhone/iPod Touch device.
.B \-d, \-\-debug
enable communication debugging.
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-l, \-\-list
list mount information
diff --git a/docs/ideviceinfo.1 b/docs/ideviceinfo.1
index e350dd0..adfa00f 100644
--- a/docs/ideviceinfo.1
+++ b/docs/ideviceinfo.1
@@ -14,8 +14,8 @@ Show information about the first connected iPhone/iPod Touch.
.B \-d, \-\-debug
enable communication debugging.
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-q, \-\-domain NAME
set domain of query to NAME. Default: None.
diff --git a/docs/idevicepair.1 b/docs/idevicepair.1
index da76b7f..3e6ca1d 100644
--- a/docs/idevicepair.1
+++ b/docs/idevicepair.1
@@ -11,8 +11,8 @@ Manage pairings with iPhone/iPod Touch/iPad devices and this host.
.SH OPTIONS
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-d, \-\-debug
enable communication debugging.
diff --git a/docs/idevicescreenshot.1 b/docs/idevicescreenshot.1
index cf0ed15..73d2c09 100644
--- a/docs/idevicescreenshot.1
+++ b/docs/idevicescreenshot.1
@@ -17,8 +17,8 @@ NOTE: A mounted developer disk image is required on the device, otherwise
.B \-d, \-\-debug
enable communication debugging.
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID.
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID.
.TP
.B \-h, \-\-help
prints usage information
diff --git a/docs/idevicesyslog.1 b/docs/idevicesyslog.1
index 178d7c5..e53587b 100644
--- a/docs/idevicesyslog.1
+++ b/docs/idevicesyslog.1
@@ -14,8 +14,8 @@ Relay syslog of a connected iPhone/iPod Touch.
.B \-d, \-\-debug
enable communication debugging.
.TP
-.B \-u, \-\-uuid UUID
-target specific device by its 40-digit device UUID
+.B \-u, \-\-udid UDID
+target specific device by its 40-digit device UDID
.TP
.B \-h, \-\-help
prints usage information.
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h
index d0923d6..f7b747a 100644
--- a/include/libimobiledevice/libimobiledevice.h
+++ b/include/libimobiledevice/libimobiledevice.h
@@ -66,7 +66,7 @@ enum idevice_event_type {
/** Provides information about the occured event. */
typedef struct {
enum idevice_event_type event; /**< The event type. */
- const char *uuid; /**< The device unique id. */
+ const char *udid; /**< The device unique id. */
int conn_type; /**< The connection type. Currently only 1 for usbmuxd. */
} idevice_event_t;
@@ -83,7 +83,7 @@ idevice_error_t idevice_get_device_list(char ***devices, int *count);
idevice_error_t idevice_device_list_free(char **devices);
/* device structure creation and destruction */
-idevice_error_t idevice_new(idevice_t *device, const char *uuid);
+idevice_error_t idevice_new(idevice_t *device, const char *udid);
idevice_error_t idevice_free(idevice_t device);
/* connection/disconnection */
@@ -97,7 +97,7 @@ idevice_error_t idevice_connection_receive(idevice_connection_t connection, char
/* misc */
idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle);
-idevice_error_t idevice_get_uuid(idevice_t device, char **uuid);
+idevice_error_t idevice_get_udid(idevice_t device, char **udid);
#ifdef __cplusplus
}
diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h
index 97df6b0..4e7a4e8 100644
--- a/include/libimobiledevice/lockdown.h
+++ b/include/libimobiledevice/lockdown.h
@@ -94,7 +94,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client);
/* Helper */
void lockdownd_client_set_label(lockdownd_client_t client, const char *label);
-lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t control, char **uuid);
+lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t control, char **udid);
lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name);
lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count);
lockdownd_error_t lockdownd_data_classes_free(char **classes);
diff --git a/src/idevice.c b/src/idevice.c
index d2769de..a6091f2 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -49,7 +49,7 @@ static void usbmux_event_cb(const usbmuxd_event_t *event, void *user_data)
idevice_event_t ev;
ev.event = event->event;
- ev.uuid = event->device.uuid;
+ ev.udid = event->device.uuid;
ev.conn_type = CONNECTION_USBMUXD;
if (event_cb) {
@@ -99,7 +99,7 @@ idevice_error_t idevice_event_unsubscribe()
/**
* Get a list of currently available devices.
*
- * @param devices List of uuids of devices that are currently available.
+ * @param devices List of udids of devices that are currently available.
* This list is terminated by a NULL pointer.
* @param count Number of devices found.
*
@@ -136,9 +136,9 @@ idevice_error_t idevice_get_device_list(char ***devices, int *count)
}
/**
- * Free a list of device uuids.
+ * Free a list of device udids.
*
- * @param devices List of uuids to free.
+ * @param devices List of udids to free.
*
* @return Always returnes IDEVICE_E_SUCCESS.
*/
@@ -156,7 +156,7 @@ idevice_error_t idevice_device_list_free(char **devices)
}
/**
- * Creates an idevice_t structure for the device specified by uuid,
+ * Creates an idevice_t structure for the device specified by udid,
* if the device is available.
*
* @note The resulting idevice_t structure has to be freed with
@@ -164,17 +164,17 @@ idevice_error_t idevice_device_list_free(char **devices)
*
* @param device Upon calling this function, a pointer to a location of type
* idevice_t. On successful return, this location will be populated.
- * @param uuid The UUID to match.
+ * @param udid The UDID to match.
*
* @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
*/
-idevice_error_t idevice_new(idevice_t * device, const char *uuid)
+idevice_error_t idevice_new(idevice_t * device, const char *udid)
{
usbmuxd_device_info_t muxdev;
- int res = usbmuxd_get_device_by_uuid(uuid, &muxdev);
+ int res = usbmuxd_get_device_by_uuid(udid, &muxdev);
if (res > 0) {
idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_private));
- phone->uuid = strdup(muxdev.uuid);
+ phone->udid = strdup(muxdev.uuid);
phone->conn_type = CONNECTION_USBMUXD;
phone->conn_data = (void*)(long)muxdev.handle;
*device = phone;
@@ -200,7 +200,7 @@ idevice_error_t idevice_free(idevice_t device)
ret = IDEVICE_E_SUCCESS;
- free(device->uuid);
+ free(device->udid);
if (device->conn_type == CONNECTION_USBMUXD) {
device->conn_data = 0;
@@ -471,12 +471,12 @@ idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle)
/**
* Gets the unique id for the device.
*/
-idevice_error_t idevice_get_uuid(idevice_t device, char **uuid)
+idevice_error_t idevice_get_udid(idevice_t device, char **udid)
{
- if (!device || !uuid)
+ if (!device || !udid)
return IDEVICE_E_INVALID_ARG;
- *uuid = strdup(device->uuid);
+ *udid = strdup(device->udid);
return IDEVICE_E_SUCCESS;
}
diff --git a/src/idevice.h b/src/idevice.h
index 65fdae0..130d11e 100644
--- a/src/idevice.h
+++ b/src/idevice.h
@@ -63,7 +63,7 @@ struct idevice_connection_private {
};
struct idevice_private {
- char *uuid;
+ char *udid;
enum connection_type conn_type;
void *conn_data;
};
diff --git a/src/lockdown.c b/src/lockdown.c
index 2dd20a4..68a74b5 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -236,8 +236,8 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client)
}
}
- if (client->uuid) {
- free(client->uuid);
+ if (client->udid) {
+ free(client->udid);
}
if (client->label) {
free(client->label);
@@ -549,12 +549,12 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *
* Returns the unique id of the device from lockdownd.
*
* @param client An initialized lockdownd client.
- * @param uuid Holds the unique id of the device. The caller is responsible
+ * @param udid Holds the unique id of the device. The caller is responsible
* for freeing the memory.
*
* @return LOCKDOWN_E_SUCCESS on success
*/
-lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t client, char **uuid)
+lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid)
{
lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR;
plist_t value = NULL;
@@ -563,7 +563,7 @@ lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t client, char **uu
if (ret != LOCKDOWN_E_SUCCESS) {
return ret;
}
- plist_get_string_val(value, uuid);
+ plist_get_string_val(value, udid);
plist_free(value);
value = NULL;
@@ -648,7 +648,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli
property_list_service_client_t plistclient = NULL;
if (property_list_service_client_new(device, 0xf27e, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
- debug_info("could not connect to lockdownd (device %s)", device->uuid);
+ debug_info("could not connect to lockdownd (device %s)", device->udid);
return LOCKDOWN_E_MUX_ERROR;
}
@@ -657,10 +657,10 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli
client_loc->ssl_enabled = 0;
client_loc->session_id = NULL;
- if (idevice_get_uuid(device, &client_loc->uuid) != IDEVICE_E_SUCCESS) {
- debug_info("failed to get device uuid.");
+ if (idevice_get_udid(device, &client_loc->udid) != IDEVICE_E_SUCCESS) {
+ debug_info("failed to get device udid.");
}
- debug_info("device uuid: %s", client_loc->uuid);
+ debug_info("device udid: %s", client_loc->udid);
client_loc->label = label ? strdup(label) : NULL;
@@ -719,7 +719,7 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown
ret = LOCKDOWN_E_INVALID_CONF;
}
- if (LOCKDOWN_E_SUCCESS == ret && !userpref_has_device_public_key(client_loc->uuid))
+ if (LOCKDOWN_E_SUCCESS == ret && !userpref_has_device_public_key(client_loc->udid))
ret = lockdownd_pair(client_loc, NULL);
/* in any case, we need to validate pairing to receive trusted host status */
@@ -925,10 +925,10 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_
if (!pairing_mode) {
if (!strcmp("Unpair", verb)) {
/* remove public key from config */
- userpref_remove_device_public_key(client->uuid);
+ userpref_remove_device_public_key(client->udid);
} else {
/* store public key in config */
- userpref_set_device_public_key(client->uuid, public_key);
+ userpref_set_device_public_key(client->udid, public_key);
}
}
} else {
diff --git a/src/lockdown.h b/src/lockdown.h
index a08b040..289053a 100644
--- a/src/lockdown.h
+++ b/src/lockdown.h
@@ -31,7 +31,7 @@ struct lockdownd_client_private {
property_list_service_client_t parent;
int ssl_enabled;
char *session_id;
- char *uuid;
+ char *udid;
char *label;
};
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c
index 1e39efa..4263e1c 100644
--- a/src/mobilebackup2.c
+++ b/src/mobilebackup2.c
@@ -418,8 +418,8 @@ leave:
* @param client
* @param request The request to send to the backup service.
* Currently, this is one of "Backup", "Restore", "Info", or "List".
- * @param target_identifier UUID of the target device.
- * @param source_identifier UUID of backup data?
+ * @param target_identifier UDID of the target device.
+ * @param source_identifier UDID of backup data?
* @param options Additional options in a plist of type PLIST_DICT.
*
* @return MOBILEBACKUP2_E_SUCCESS if the request was successfully sent,
diff --git a/src/restore.c b/src/restore.c
index f4a2ed3..a9ab8b9 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -112,8 +112,8 @@ restored_error_t restored_client_free(restored_client_t client)
}
}
- if (client->uuid) {
- free(client->uuid);
+ if (client->udid) {
+ free(client->udid);
}
if (client->label) {
free(client->label);
@@ -370,22 +370,22 @@ restored_error_t restored_client_new(idevice_t device, restored_client_t *client
property_list_service_client_t plistclient = NULL;
if (property_list_service_client_new(device, 0xf27e, &plistclient) != PROPERTY_LIST_SERVICE_E_SUCCESS) {
- debug_info("could not connect to restored (device %s)", device->uuid);
+ debug_info("could not connect to restored (device %s)", device->udid);
return RESTORE_E_MUX_ERROR;
}
restored_client_t client_loc = (restored_client_t) malloc(sizeof(struct restored_client_private));
client_loc->parent = plistclient;
- client_loc->uuid = NULL;
+ client_loc->udid = NULL;
client_loc->label = NULL;
if (label != NULL)
client_loc->label = strdup(label);
- ret = idevice_get_uuid(device, &client_loc->uuid);
+ ret = idevice_get_udid(device, &client_loc->udid);
if (RESTORE_E_SUCCESS != ret) {
- debug_info("failed to get device uuid.");
+ debug_info("failed to get device udid.");
}
- debug_info("device uuid: %s", client_loc->uuid);
+ debug_info("device udid: %s", client_loc->udid);
if (RESTORE_E_SUCCESS == ret) {
*client = client_loc;
diff --git a/src/restore.h b/src/restore.h
index d790d01..cf9307c 100644
--- a/src/restore.h
+++ b/src/restore.h
@@ -29,7 +29,7 @@
struct restored_client_private {
property_list_service_client_t parent;
- char *uuid;
+ char *udid;
char *label;
plist_t info;
};
diff --git a/src/userpref.c b/src/userpref.c
index 2f4e55b..a0c3545 100644
--- a/src/userpref.c
+++ b/src/userpref.c
@@ -432,26 +432,26 @@ void userpref_get_host_id(char **host_id)
/**
* Determines whether this device has been connected to this system before.
*
- * @param uid The device uid as given by the device.
+ * @param udid The device UDID as given by the device.
*
* @return 1 if the device has been connected previously to this configuration
* or 0 otherwise.
*/
-int userpref_has_device_public_key(const char *uuid)
+int userpref_has_device_public_key(const char *udid)
{
int ret = 0;
const char *config_path;
char *config_file;
struct stat st;
- if (!uuid) return 0;
+ if (!udid) return 0;
/* first get config file */
config_path = userpref_get_config_dir();
- config_file = (char*)malloc(strlen(config_path)+1+strlen(uuid)+4+1);
+ config_file = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
strcpy(config_file, config_path);
strcat(config_file, DIR_SEP_S);
- strcat(config_file, uuid);
+ strcat(config_file, udid);
strcat(config_file, ".pem");
if ((stat(config_file, &st) == 0) && S_ISREG(st.st_mode))
@@ -461,21 +461,21 @@ int userpref_has_device_public_key(const char *uuid)
}
/**
- * Fills a list with UUIDs of devices that have been connected to this
+ * Fills a list with UDIDs of devices that have been connected to this
* system before, i.e. for which a public key file exists.
*
* @param list A pointer to a char** initially pointing to NULL that will
- * hold a newly allocated list of UUIDs upon successful return.
+ * hold a newly allocated list of UDIDs upon successful return.
* The caller is responsible for freeing the memory. Note that if
* no public key file was found the list has to be freed too as it
* points to a terminating NULL element.
- * @param count The number of UUIDs found. This parameter can be NULL if it
+ * @param count The number of UDIDs found. This parameter can be NULL if it
* is not required.
*
* @return USERPREF_E_SUCCESS on success, or USERPREF_E_INVALID_ARG if the
* list parameter is not pointing to NULL.
*/
-userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
+userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count)
{
struct slist_t {
char *name;
@@ -483,7 +483,7 @@ userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
};
DIR *config_dir;
const char *config_path;
- struct slist_t *uuids = NULL;
+ struct slist_t *udids = NULL;
unsigned int i;
unsigned int found = 0;
@@ -500,7 +500,7 @@ userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
config_dir = opendir(config_path);
if (config_dir) {
struct dirent *entry;
- struct slist_t *listp = uuids;
+ struct slist_t *listp = udids;
while ((entry = readdir(config_dir))) {
char *ext = strstr(entry->d_name, ".pem");
if (ext && ((ext - entry->d_name) == 40) && (strlen(entry->d_name) == 44)) {
@@ -511,7 +511,7 @@ userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
ne->next = NULL;
if (!listp) {
listp = ne;
- uuids = listp;
+ udids = listp;
} else {
listp->next = ne;
listp = listp->next;
@@ -523,10 +523,10 @@ userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
}
*list = (char**)malloc(sizeof(char*) * (found+1));
i = 0;
- while (uuids) {
- (*list)[i++] = uuids->name;
- struct slist_t *old = uuids;
- uuids = uuids->next;
+ while (udids) {
+ (*list)[i++] = udids->name;
+ struct slist_t *old = udids;
+ udids = udids->next;
free(old);
}
(*list)[i] = NULL;
@@ -542,17 +542,18 @@ userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count)
* Mark the device (as represented by the key) as having connected to this
* configuration.
*
+ * @param udid The device UDID as given by the device
* @param public_key The public key given by the device
*
* @return 1 on success and 0 if no public key is given or if it has already
* been marked as connected previously.
*/
-userpref_error_t userpref_set_device_public_key(const char *uuid, key_data_t public_key)
+userpref_error_t userpref_set_device_public_key(const char *udid, key_data_t public_key)
{
if (NULL == public_key.data)
return USERPREF_E_INVALID_ARG;
- if (userpref_has_device_public_key(uuid))
+ if (userpref_has_device_public_key(udid))
return USERPREF_E_SUCCESS;
/* ensure config directory exists */
@@ -560,10 +561,10 @@ userpref_error_t userpref_set_device_public_key(const char *uuid, key_data_t pub
/* build file path */
const char *config_path = userpref_get_config_dir();
- char *pem = (char*)malloc(strlen(config_path)+1+strlen(uuid)+4+1);
+ char *pem = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
strcpy(pem, config_path);
strcat(pem, DIR_SEP_S);
- strcat(pem, uuid);
+ strcat(pem, udid);
strcat(pem, ".pem");
/* store file */
@@ -580,23 +581,23 @@ userpref_error_t userpref_set_device_public_key(const char *uuid, key_data_t pub
}
/**
- * Remove the public key stored for the device with uuid from this host.
+ * Remove the public key stored for the device with udid from this host.
*
- * @param uuid The uuid of the device
+ * @param udid The udid of the device
*
* @return USERPREF_E_SUCCESS on success.
*/
-userpref_error_t userpref_remove_device_public_key(const char *uuid)
+userpref_error_t userpref_remove_device_public_key(const char *udid)
{
- if (!userpref_has_device_public_key(uuid))
+ if (!userpref_has_device_public_key(udid))
return USERPREF_E_SUCCESS;
/* build file path */
const char *config_path = userpref_get_config_dir();
- char *pem = (char*)malloc(strlen(config_path)+1+strlen(uuid)+4+1);
+ char *pem = (char*)malloc(strlen(config_path)+1+strlen(udid)+4+1);
strcpy(pem, config_path);
strcat(pem, DIR_SEP_S);
- strcat(pem, uuid);
+ strcat(pem, udid);
strcat(pem, ".pem");
/* remove file */
diff --git a/src/userpref.h b/src/userpref.h
index e5dcd1f..7ff91b3 100644
--- a/src/userpref.h
+++ b/src/userpref.h
@@ -64,10 +64,10 @@ LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_get_keys_and_certs(gnutls_x5
#endif
LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_set_keys_and_certs(key_data_t * root_key, key_data_t * root_cert, key_data_t * host_key, key_data_t * host_cert);
LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_get_certs_as_pem(key_data_t *pem_root_cert, key_data_t *pem_host_cert);
-LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_set_device_public_key(const char *uuid, key_data_t public_key);
-userpref_error_t userpref_remove_device_public_key(const char *uuid);
-LIBIMOBILEDEVICE_INTERNAL int userpref_has_device_public_key(const char *uuid);
-userpref_error_t userpref_get_paired_uuids(char ***list, unsigned int *count);
+LIBIMOBILEDEVICE_INTERNAL userpref_error_t userpref_set_device_public_key(const char *udid, key_data_t public_key);
+userpref_error_t userpref_remove_device_public_key(const char *udid);
+LIBIMOBILEDEVICE_INTERNAL int userpref_has_device_public_key(const char *udid);
+userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count);
void userpref_get_host_id(char **host_id);
#endif
diff --git a/tools/idevice_id.c b/tools/idevice_id.c
index 1facb60..44a542a 100644
--- a/tools/idevice_id.c
+++ b/tools/idevice_id.c
@@ -13,11 +13,11 @@ static void print_usage(int argc, char **argv)
char *name = NULL;
name = strrchr(argv[0], '/');
- printf("Usage: %s [OPTIONS] [UUID]\n", (name ? name + 1: argv[0]));
+ printf("Usage: %s [OPTIONS] [UDID]\n", (name ? name + 1: argv[0]));
printf("Prints device name or a list of attached iPhone/iPod Touch devices.\n\n");
- printf(" The UUID is a 40-digit hexadecimal number of the device\n");
+ printf(" The UDID is a 40-digit hexadecimal number of the device\n");
printf(" for which the name should be retrieved.\n\n");
- printf(" -l, --list\t\tlist UUID of all attached devices\n");
+ printf(" -l, --list\t\tlist UDID of all attached devices\n");
printf(" -d, --debug\t\tenable communication debugging\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
@@ -32,8 +32,8 @@ int main(int argc, char **argv)
int ret = 0;
int i;
int mode = MODE_SHOW_ID;
- char uuid[41];
- uuid[0] = 0;
+ char udid[41];
+ udid[0] = 0;
/* parse cmdline args */
for (i = 1; i < argc; i++) {
@@ -51,21 +51,21 @@ int main(int argc, char **argv)
}
}
- /* check if uuid was passed */
+ /* check if udid was passed */
if (mode == MODE_SHOW_ID) {
i--;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
}
switch (mode) {
case MODE_SHOW_ID:
- idevice_new(&phone, uuid);
+ idevice_new(&phone, udid);
if (!phone) {
- fprintf(stderr, "ERROR: No device with UUID=%s attached.\n", uuid);
+ fprintf(stderr, "ERROR: No device with UDID=%s attached.\n", udid);
return -2;
}
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index 26771f8..7935477 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -288,8 +288,8 @@ static plist_t mobilebackup_factory_info_plist_new()
/* gather data from lockdown */
plist_t value_node = NULL;
plist_t root_node = NULL;
- char *uuid = NULL;
- char *uuid_uppercase = NULL;
+ char *udid = NULL;
+ char *udid_uppercase = NULL;
plist_t ret = plist_new_dict();
@@ -323,14 +323,14 @@ static plist_t mobilebackup_factory_info_plist_new()
plist_dict_insert_item(ret, "Serial Number", plist_copy(value_node));
value_node = plist_dict_get_item(root_node, "UniqueDeviceID");
- idevice_get_uuid(phone, &uuid);
- plist_dict_insert_item(ret, "Target Identifier", plist_new_string(uuid));
+ idevice_get_udid(phone, &udid);
+ plist_dict_insert_item(ret, "Target Identifier", plist_new_string(udid));
/* uppercase */
- uuid_uppercase = str_toupper(uuid);
- plist_dict_insert_item(ret, "Unique Identifier", plist_new_string(uuid_uppercase));
- free(uuid_uppercase);
- free(uuid);
+ udid_uppercase = str_toupper(udid);
+ plist_dict_insert_item(ret, "Unique Identifier", plist_new_string(udid_uppercase));
+ free(udid_uppercase);
+ free(udid);
/* FIXME: Embed files as <data> nodes */
plist_t files = plist_new_dict();
@@ -521,7 +521,7 @@ static int mobilebackup_info_is_current_device(plist_t info)
/* get basic device information in one go */
lockdownd_get_value(client, NULL, NULL, &root_node);
- /* verify UUID */
+ /* verify UDID */
value_node = plist_dict_get_item(root_node, "UniqueDeviceID");
node = plist_dict_get_item(info, "Target Identifier");
@@ -810,7 +810,7 @@ static void print_usage(int argc, char **argv)
printf(" restore\tRestores a device backup from DIRECTORY.\n\n");
printf("options:\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
}
@@ -819,9 +819,9 @@ int main(int argc, char *argv[])
{
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
- char uuid[41];
+ char udid[41];
uint16_t port = 0;
- uuid[0] = 0;
+ udid[0] = 0;
int cmd = -1;
int is_full_backup = 0;
char *backup_directory = NULL;
@@ -851,13 +851,13 @@ int main(int argc, char *argv[])
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
continue;
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -910,10 +910,10 @@ int main(int argc, char *argv[])
printf("Backup directory is \"%s\"\n", backup_directory);
- if (uuid[0] != 0) {
- ret = idevice_new(&phone, uuid);
+ if (udid[0] != 0) {
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
}
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index b0f9d55..4b7e79e 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -253,8 +253,8 @@ static plist_t mobilebackup_factory_info_plist_new()
/* gather data from lockdown */
plist_t value_node = NULL;
plist_t root_node = NULL;
- char *uuid = NULL;
- char *uuid_uppercase = NULL;
+ char *udid = NULL;
+ char *udid_uppercase = NULL;
plist_t ret = plist_new_dict();
@@ -299,16 +299,16 @@ static plist_t mobilebackup_factory_info_plist_new()
/* FIXME Sync Settings? */
value_node = plist_dict_get_item(root_node, "UniqueDeviceID");
- idevice_get_uuid(phone, &uuid);
- plist_dict_insert_item(ret, "Target Identifier", plist_new_string(uuid));
+ idevice_get_udid(phone, &udid);
+ plist_dict_insert_item(ret, "Target Identifier", plist_new_string(udid));
plist_dict_insert_item(ret, "Target Type", plist_new_string("Device"));
/* uppercase */
- uuid_uppercase = str_toupper(uuid);
- plist_dict_insert_item(ret, "Unique Identifier", plist_new_string(uuid_uppercase));
- free(uuid_uppercase);
- free(uuid);
+ udid_uppercase = str_toupper(udid);
+ plist_dict_insert_item(ret, "Unique Identifier", plist_new_string(udid_uppercase));
+ free(udid_uppercase);
+ free(udid);
char *data_buf = NULL;
uint64_t data_size = 0;
@@ -446,11 +446,11 @@ static int plist_write_to_filename(plist_t plist, const char *filename, enum pli
return 1;
}
-static int mb2_status_check_snapshot_state(const char *path, const char *uuid, const char *matches)
+static int mb2_status_check_snapshot_state(const char *path, const char *udid, const char *matches)
{
int ret = -1;
plist_t status_plist = NULL;
- char *file_path = build_path(path, uuid, "Status.plist", NULL);
+ char *file_path = build_path(path, udid, "Status.plist", NULL);
plist_read_from_filename(&status_plist, file_path);
free(file_path);
@@ -488,7 +488,7 @@ static int mobilebackup_info_is_current_device(plist_t info)
/* get basic device information in one go */
lockdownd_get_value(client, NULL, NULL, &root_node);
- /* verify UUID */
+ /* verify UDID */
value_node = plist_dict_get_item(root_node, "UniqueDeviceID");
node = plist_dict_get_item(info, "Target Identifier");
@@ -1171,7 +1171,7 @@ static void print_usage(int argc, char **argv)
printf(" unback\tunpack a completed backup in DIRECTORY/_unback_/\n\n");
printf("options:\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
}
@@ -1180,9 +1180,9 @@ int main(int argc, char *argv[])
{
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
- char uuid[41];
+ char udid[41];
uint16_t port = 0;
- uuid[0] = 0;
+ udid[0] = 0;
int cmd = -1;
int cmd_flags = 0;
int is_full_backup = 0;
@@ -1207,13 +1207,13 @@ int main(int argc, char *argv[])
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
continue;
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -1277,10 +1277,10 @@ int main(int argc, char *argv[])
return -1;
}
- if (uuid[0] != 0) {
- ret = idevice_new(&phone, uuid);
+ if (udid[0] != 0) {
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
}
@@ -1291,18 +1291,18 @@ int main(int argc, char *argv[])
printf("No device found, is it plugged in?\n");
return -1;
}
- char *newuuid = NULL;
- idevice_get_uuid(phone, &newuuid);
- strcpy(uuid, newuuid);
- free(newuuid);
+ char *newudid = NULL;
+ idevice_get_udid(phone, &newudid);
+ strcpy(udid, newudid);
+ free(newudid);
}
/* backup directory must contain an Info.plist */
- char *info_path = build_path(backup_directory, uuid, "Info.plist", NULL);
+ char *info_path = build_path(backup_directory, udid, "Info.plist", NULL);
if (cmd == CMD_RESTORE) {
if (stat(info_path, &st) != 0) {
free(info_path);
- printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UUID %s.\n", backup_directory, uuid);
+ printf("ERROR: Backup directory \"%s\" is invalid. No Info.plist found for UDID %s.\n", backup_directory, udid);
return -1;
}
}
@@ -1430,7 +1430,7 @@ checkpoint:
PRINT_VERBOSE(1, "Starting backup...\n");
/* make sure backup device sub-directory exists */
- char *devbackupdir = build_path(backup_directory, uuid, NULL);
+ char *devbackupdir = build_path(backup_directory, udid, NULL);
__mkdir(devbackupdir, 0755);
free(devbackupdir);
@@ -1453,7 +1453,7 @@ checkpoint:
/* request backup from device with manifest from last backup */
PRINT_VERBOSE(1, "Requesting backup from device...\n");
- err = mobilebackup2_send_request(mobilebackup2, "Backup", uuid, NULL, NULL);
+ err = mobilebackup2_send_request(mobilebackup2, "Backup", udid, NULL, NULL);
if (err == MOBILEBACKUP2_E_SUCCESS) {
if (is_full_backup) {
PRINT_VERBOSE(1, "Full backup mode.\n");
@@ -1475,7 +1475,7 @@ checkpoint:
/* TODO: verify battery on AC enough battery remaining */
/* verify if Status.plist says we read from an successful backup */
- if (!mb2_status_check_snapshot_state(backup_directory, uuid, "finished")) {
+ if (!mb2_status_check_snapshot_state(backup_directory, udid, "finished")) {
printf("ERROR: Cannot ensure we restore from a successful backup. Aborting.\n");
cmd = CMD_LEAVE;
break;
@@ -1495,7 +1495,7 @@ checkpoint:
plist_dict_insert_item(opts, "RestorePreserveSettings", plist_new_bool((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0));
PRINT_VERBOSE(1, "Preserve settings of device: %s\n", ((cmd_flags & CMD_FLAG_RESTORE_SETTINGS) == 0 ? "Yes":"No"));
- err = mobilebackup2_send_request(mobilebackup2, "Restore", uuid, uuid, opts);
+ err = mobilebackup2_send_request(mobilebackup2, "Restore", udid, udid, opts);
plist_free(opts);
if (err != MOBILEBACKUP2_E_SUCCESS) {
if (err == MOBILEBACKUP2_E_BAD_VERSION) {
@@ -1510,7 +1510,7 @@ checkpoint:
break;
case CMD_INFO:
PRINT_VERBOSE(1, "Requesting backup info from device...\n");
- err = mobilebackup2_send_request(mobilebackup2, "Info", uuid, NULL, NULL);
+ err = mobilebackup2_send_request(mobilebackup2, "Info", udid, NULL, NULL);
if (err != MOBILEBACKUP2_E_SUCCESS) {
printf("Error requesting backup info from device, error code %d\n", err);
cmd = CMD_LEAVE;
@@ -1518,7 +1518,7 @@ checkpoint:
break;
case CMD_LIST:
PRINT_VERBOSE(1, "Requesting backup list from device...\n");
- err = mobilebackup2_send_request(mobilebackup2, "List", uuid, NULL, NULL);
+ err = mobilebackup2_send_request(mobilebackup2, "List", udid, NULL, NULL);
if (err != MOBILEBACKUP2_E_SUCCESS) {
printf("Error requesting backup list from device, error code %d\n", err);
cmd = CMD_LEAVE;
@@ -1526,7 +1526,7 @@ checkpoint:
break;
case CMD_UNBACK:
PRINT_VERBOSE(1, "Starting to unpack backup...\n");
- err = mobilebackup2_send_request(mobilebackup2, "Unback", uuid, NULL, NULL);
+ err = mobilebackup2_send_request(mobilebackup2, "Unback", udid, NULL, NULL);
if (err != MOBILEBACKUP2_E_SUCCESS) {
printf("Error requesting unback operation from device, error code %d\n", err);
cmd = CMD_LEAVE;
@@ -1765,7 +1765,7 @@ files_out:
switch (cmd) {
case CMD_BACKUP:
PRINT_VERBOSE(1, "Received %d files from device.\n", file_count);
- if (mb2_status_check_snapshot_state(backup_directory, uuid, "finished")) {
+ if (mb2_status_check_snapshot_state(backup_directory, udid, "finished")) {
PRINT_VERBOSE(1, "Backup Successful.\n");
} else {
if (quit_flag) {
diff --git a/tools/idevicedate.c b/tools/idevicedate.c
index e4e0a33..43a4aee 100644
--- a/tools/idevicedate.c
+++ b/tools/idevicedate.c
@@ -44,7 +44,7 @@ static void print_usage(int argc, char **argv)
printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0]));
printf("Display the current date or set it on an iDevice.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -s, --set TIMESTAMP\tset UTC time described by TIMESTAMP\n");
printf(" -c, --sync\t\tset time of device to current system time\n");
printf(" -h, --help\t\tprints usage information\n");
@@ -57,10 +57,10 @@ int main(int argc, char *argv[])
idevice_t phone = NULL;
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
- char uuid[41];
+ char udid[41];
time_t setdate = 0;
plist_t node = NULL;
- uuid[0] = 0;
+ udid[0] = 0;
uint64_t datetime = 0;
time_t rawtime;
struct tm * tmp;
@@ -73,13 +73,13 @@ int main(int argc, char *argv[])
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
continue;
}
else if (!strcmp(argv[i], "-s") || !strcmp(argv[i], "--set")) {
@@ -124,10 +124,10 @@ int main(int argc, char *argv[])
}
}
- if (uuid[0] != 0) {
- ret = idevice_new(&phone, uuid);
+ if (udid[0] != 0) {
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
}
diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c
index 827946b..fc46e75 100644
--- a/tools/ideviceenterrecovery.c
+++ b/tools/ideviceenterrecovery.c
@@ -32,8 +32,8 @@ static void print_usage(int argc, char **argv)
char *name = NULL;
name = strrchr(argv[0], '/');
- printf("Usage: %s [OPTIONS] UUID\n", (name ? name + 1: argv[0]));
- printf("Makes a device with the supplied 40-digit UUID enter recovery mode immediately.\n\n");
+ printf("Usage: %s [OPTIONS] UDID\n", (name ? name + 1: argv[0]));
+ printf("Makes a device with the supplied 40-digit UDID enter recovery mode immediately.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
@@ -45,8 +45,8 @@ int main(int argc, char *argv[])
idevice_t phone = NULL;
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
- char uuid[41];
- uuid[0] = 0;
+ char udid[41];
+ udid[0] = 0;
/* parse cmdline args */
for (i = 1; i < argc; i++) {
@@ -65,11 +65,11 @@ int main(int argc, char *argv[])
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
- ret = idevice_new(&phone, uuid);
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
}
/* run query and output information */
- printf("Telling device with uuid %s to enter recovery mode.\n", uuid);
+ printf("Telling device with udid %s to enter recovery mode.\n", udid);
if(lockdownd_enter_recovery(client) != LOCKDOWN_E_SUCCESS)
{
printf("Failed to enter recovery mode.\n");
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c
index 4a650ee..a9f6142 100644
--- a/tools/ideviceimagemounter.c
+++ b/tools/ideviceimagemounter.c
@@ -43,7 +43,7 @@ static int indent_level = 0;
static int list_mode = 0;
static int xml_mode = 0;
-static char *uuid = NULL;
+static char *udid = NULL;
static char *imagetype = NULL;
static const char PKG_PATH[] = "PublicStaging";
@@ -56,7 +56,7 @@ static void print_usage(int argc, char **argv)
name = strrchr(argv[0], '/');
printf("Usage: %s [OPTIONS] IMAGE_FILE IMAGE_SIGNATURE_FILE\n\n", (name ? name + 1: argv[0]));
printf("Mounts the specified disk image on the device.\n\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -l, --list\t\tList mount information\n");
printf(" -t, --imagetype\tImage type to use, default is 'Developer'\n");
printf(" -x, --xml\t\tUse XML output\n");
@@ -69,7 +69,7 @@ static void parse_opts(int argc, char **argv)
{
static struct option longopts[] = {
{"help", 0, NULL, 'h'},
- {"uuid", 0, NULL, 'u'},
+ {"udid", 0, NULL, 'u'},
{"list", 0, NULL, 'l'},
{"imagetype", 0, NULL, 't'},
{"xml", 0, NULL, 'x'},
@@ -91,12 +91,12 @@ static void parse_opts(int argc, char **argv)
exit(0);
case 'u':
if (strlen(optarg) != 40) {
- printf("%s: invalid UUID specified (length != 40)\n",
+ printf("%s: invalid UDID specified (length != 40)\n",
argv[0]);
print_usage(argc, argv);
exit(2);
}
- uuid = strdup(optarg);
+ udid = strdup(optarg);
break;
case 'l':
list_mode = 1;
@@ -295,7 +295,7 @@ int main(int argc, char **argv)
}
}
- if (IDEVICE_E_SUCCESS != idevice_new(&device, uuid)) {
+ if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) {
printf("No device found, is it plugged in?\n");
return -1;
}
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index 6633459..ca4b246 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -256,7 +256,7 @@ static void print_usage(int argc, char **argv)
printf("Show information about a connected iPhone/iPod Touch.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
printf(" -s, --simple\t\tuse a simple connection to avoid auto-pairing with the device\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -q, --domain NAME\tset domain of query to NAME. Default: None\n");
printf(" -k, --key NAME\tonly query key specified by NAME. Default: All keys.\n");
printf(" -x, --xml\t\toutput information as xml plist instead of key/value pairs\n");
@@ -277,14 +277,14 @@ int main(int argc, char *argv[])
int i;
int simple = 0;
int format = FORMAT_KEY_VALUE;
- char uuid[41];
+ char udid[41];
char *domain = NULL;
char *key = NULL;
char *xml_doc = NULL;
uint32_t xml_length;
plist_t node = NULL;
plist_type node_type;
- uuid[0] = 0;
+ udid[0] = 0;
/* parse cmdline args */
for (i = 1; i < argc; i++) {
@@ -292,13 +292,13 @@ int main(int argc, char *argv[])
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
continue;
}
else if (!strcmp(argv[i], "-q") || !strcmp(argv[i], "--domain")) {
@@ -340,10 +340,10 @@ int main(int argc, char *argv[])
}
}
- if (uuid[0] != 0) {
- ret = idevice_new(&phone, uuid);
+ if (udid[0] != 0) {
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
}
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index 9eebc5c..d810365 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -28,7 +28,7 @@
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
-static char *uuid = NULL;
+static char *udid = NULL;
static void print_usage(int argc, char **argv)
{
@@ -45,7 +45,7 @@ static void print_usage(int argc, char **argv)
printf(" list list devices paired with this computer\n\n");
printf(" The following OPTIONS are accepted:\n");
printf(" -d, --debug enable communication debugging\n");
- printf(" -u, --uuid UUID target specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID target specific device by its 40-digit device UDID\n");
printf(" -h, --help prints usage information\n");
printf("\n");
}
@@ -54,7 +54,7 @@ static void parse_opts(int argc, char **argv)
{
static struct option longopts[] = {
{"help", 0, NULL, 'h'},
- {"uuid", 1, NULL, 'u'},
+ {"udid", 1, NULL, 'u'},
{"debug", 0, NULL, 'd'},
{NULL, 0, NULL, 0}
};
@@ -72,11 +72,11 @@ static void parse_opts(int argc, char **argv)
exit(EXIT_SUCCESS);
case 'u':
if (strlen(optarg) != 40) {
- printf("%s: invalid UUID specified (length != 40)\n", argv[0]);
+ printf("%s: invalid UDID specified (length != 40)\n", argv[0]);
print_usage(argc, argv);
exit(2);
}
- uuid = strdup(optarg);
+ udid = strdup(optarg);
break;
case 'd':
idevice_set_debug_level(1);
@@ -143,26 +143,26 @@ int main(int argc, char **argv)
if (op == OP_LIST) {
unsigned int i;
- char **uuids = NULL;
+ char **udids = NULL;
unsigned int count = 0;
- userpref_get_paired_uuids(&uuids, &count);
+ userpref_get_paired_udids(&udids, &count);
for (i = 0; i < count; i++) {
- printf("%s\n", uuids[i]);
- free(uuids[i]);
+ printf("%s\n", udids[i]);
+ free(udids[i]);
}
- if (uuids)
- free(uuids);
- if (uuid)
- free(uuid);
+ if (udids)
+ free(udids);
+ if (udid)
+ free(udid);
return EXIT_SUCCESS;
}
- if (uuid) {
- ret = idevice_new(&phone, uuid);
- free(uuid);
- uuid = NULL;
+ if (udid) {
+ ret = idevice_new(&phone, udid);
+ free(udid);
+ udid = NULL;
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return EXIT_FAILURE;
}
} else {
@@ -196,9 +196,9 @@ int main(int argc, char **argv)
}
}
- ret = idevice_get_uuid(phone, &uuid);
+ ret = idevice_get_udid(phone, &udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("ERROR: Could not get device uuid, error code %d\n", ret);
+ printf("ERROR: Could not get device udid, error code %d\n", ret);
result = EXIT_FAILURE;
goto leave;
}
@@ -208,13 +208,13 @@ int main(int argc, char **argv)
case OP_PAIR:
lerr = lockdownd_pair(client, NULL);
if (lerr == LOCKDOWN_E_SUCCESS) {
- printf("SUCCESS: Paired with device %s\n", uuid);
+ printf("SUCCESS: Paired with device %s\n", udid);
} else {
result = EXIT_FAILURE;
if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) {
printf("ERROR: Could not pair with the device because a passcode is set. Please enter the passcode on the device and retry.\n");
} else {
- printf("ERROR: Pairing with device %s failed with unhandled error code %d\n", uuid, lerr);
+ printf("ERROR: Pairing with device %s failed with unhandled error code %d\n", udid, lerr);
}
}
break;
@@ -222,13 +222,13 @@ int main(int argc, char **argv)
case OP_VALIDATE:
lerr = lockdownd_validate_pair(client, NULL);
if (lerr == LOCKDOWN_E_SUCCESS) {
- printf("SUCCESS: Validated pairing with device %s\n", uuid);
+ printf("SUCCESS: Validated pairing with device %s\n", udid);
} else {
result = EXIT_FAILURE;
if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) {
printf("ERROR: Could not validate with the device because a passcode is set. Please enter the passcode on the device and retry.\n");
} else if (lerr == LOCKDOWN_E_INVALID_HOST_ID) {
- printf("ERROR: Device %s is not paired with this host\n", uuid);
+ printf("ERROR: Device %s is not paired with this host\n", udid);
} else {
printf("ERROR: Pairing failed with unhandled error code %d\n", lerr);
}
@@ -239,14 +239,14 @@ int main(int argc, char **argv)
lerr = lockdownd_unpair(client, NULL);
if (lerr == LOCKDOWN_E_SUCCESS) {
/* also remove local device public key */
- userpref_remove_device_public_key(uuid);
- printf("SUCCESS: Unpaired with device %s\n", uuid);
+ userpref_remove_device_public_key(udid);
+ printf("SUCCESS: Unpaired with device %s\n", udid);
} else {
result = EXIT_FAILURE;
if (lerr == LOCKDOWN_E_INVALID_HOST_ID) {
- printf("ERROR: Device %s is not paired with this host\n", uuid);
+ printf("ERROR: Device %s is not paired with this host\n", udid);
} else {
- printf("ERROR: Unpairing with device %s failed with unhandled error code %d\n", uuid, lerr);
+ printf("ERROR: Unpairing with device %s failed with unhandled error code %d\n", udid, lerr);
}
}
break;
@@ -255,8 +255,8 @@ int main(int argc, char **argv)
leave:
lockdownd_client_free(client);
idevice_free(phone);
- if (uuid) {
- free(uuid);
+ if (udid) {
+ free(udid);
}
return result;
}
diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c
index 31717dd..8f75fd1 100644
--- a/tools/idevicescreenshot.c
+++ b/tools/idevicescreenshot.c
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
uint16_t port = 0;
int result = -1;
int i;
- char *uuid = NULL;
+ char *udid = NULL;
/* parse cmdline args */
for (i = 1; i < argc; i++) {
@@ -49,13 +49,13 @@ int main(int argc, char **argv)
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- uuid = strdup(argv[i]);
+ udid = strdup(argv[i]);
continue;
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -68,15 +68,15 @@ int main(int argc, char **argv)
}
}
- if (IDEVICE_E_SUCCESS != idevice_new(&device, uuid)) {
+ if (IDEVICE_E_SUCCESS != idevice_new(&device, udid)) {
printf("No device found, is it plugged in?\n");
- if (uuid) {
- free(uuid);
+ if (udid) {
+ free(udid);
}
return -1;
}
- if (uuid) {
- free(uuid);
+ if (udid) {
+ free(udid);
}
if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) {
@@ -133,7 +133,7 @@ void print_usage(int argc, char **argv)
printf("NOTE: A mounted developer disk image is required on the device, otherwise\n");
printf("the screenshotr service is not available.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
}
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index 3fc7922..abaef47 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -48,9 +48,9 @@ int main(int argc, char *argv[])
idevice_t phone = NULL;
idevice_error_t ret = IDEVICE_E_UNKNOWN_ERROR;
int i;
- char uuid[41];
+ char udid[41];
uint16_t port = 0;
- uuid[0] = 0;
+ udid[0] = 0;
signal(SIGINT, clean_exit);
signal(SIGTERM, clean_exit);
@@ -65,13 +65,13 @@ int main(int argc, char *argv[])
idevice_set_debug_level(1);
continue;
}
- else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--uuid")) {
+ else if (!strcmp(argv[i], "-u") || !strcmp(argv[i], "--udid")) {
i++;
if (!argv[i] || (strlen(argv[i]) != 40)) {
print_usage(argc, argv);
return 0;
}
- strcpy(uuid, argv[i]);
+ strcpy(udid, argv[i]);
continue;
}
else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
@@ -84,10 +84,10 @@ int main(int argc, char *argv[])
}
}
- if (uuid[0] != 0) {
- ret = idevice_new(&phone, uuid);
+ if (udid[0] != 0) {
+ ret = idevice_new(&phone, udid);
if (ret != IDEVICE_E_SUCCESS) {
- printf("No device found with uuid %s, is it plugged in?\n", uuid);
+ printf("No device found with udid %s, is it plugged in?\n", udid);
return -1;
}
}
@@ -166,7 +166,7 @@ void print_usage(int argc, char **argv)
printf("Usage: %s [OPTIONS]\n", (name ? name + 1: argv[0]));
printf("Relay syslog of a connected iPhone/iPod Touch.\n\n");
printf(" -d, --debug\t\tenable communication debugging\n");
- printf(" -u, --uuid UUID\ttarget specific device by its 40-digit device UUID\n");
+ printf(" -u, --udid UDID\ttarget specific device by its 40-digit device UDID\n");
printf(" -h, --help\t\tprints usage information\n");
printf("\n");
}