...
#include <libimobiledevice/libimobiledevice.h>
static char *udid = NULL;
idevice_t device = NULL;
if (idevice_new_with_options(&device, NULL, IDEVICE_LOOKUP_USBMUX) != IDEVICE_E_SUCCESS) {
printf("ERROR: No device found!\n");
return -1;
}
if (idevice_get_udid(device, &udid) != IDEVICE_E_SUCCESS) {
printf("ERROR: Unable to get the device UDID.\n");
idevice_free(device);
return -1;
}
printf("Connected with UDID: %s\n", udid);
idevice_free(device);
free(udid);
...
...
#include <libimobiledevice/lockdown.h>
#include <plist/plist.h>
lockdownd_client_t lockdown = NULL;
lockdownd_client_new_with_handshake(device, &lockdown, "myapp");
plist_t node = NULL;
char *value = NULL;
if(lockdownd_get_value(lockdown, NULL, "DeviceColor", &node) != LOCKDOWN_E_SUCCESS) {
lockdownd_client_free(lockdown);
idevice_free(device);
printf("ERROR: Unable to retrieve setting key DeviceColor from device.\n");
return -1;
}
plist_get_string_val(node, &value);
printf("%s value is: %s\n", "DeviceColor", value);
plist_free(node);
free(value);
lockdownd_client_free(lockdown);
...
$ ideviceinfo -k ProductVersion
12.4
$ ideviceinfo -s
BasebandCertId: xxxxxxxxxx
BasebandKeyHashInformation:
AKeyStatus: 2
SKeyHash: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SKeyStatus: 0
BasebandSerialNumber: xxxxxxxx
BasebandVersion: 7.80.04
BoardId: 4
BuildVersion: 16G77
ChipID: 28672
DeviceClass: iPhone
DeviceColor: #e1e4e3
DeviceName: iPhone 6 Plus
DieID: xxxxxxxxxxxxxxx
HardwareModel: N56AP
HasSiDP: true
PartitionType: GUID_partition_scheme
ProductName: iPhone OS
ProductType: iPhone7,1
ProductVersion: 12.4
ProductionSOC: true
ProtocolVersion: 2
TelephonyCapability: true
UniqueChipID: xxxxxxxxxxxxxxx
UniqueDeviceID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
WiFiAddress: xx:xx:xx:xx:xx:xx
$ ideviceactivation state
ActivationState: Activated
$ idevicediagnostics restart
Restarting device.